summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Scheibel <scheibel1@llnl.gov>2015-10-15 10:26:13 -0700
committerPeter Scheibel <scheibel1@llnl.gov>2015-10-15 10:26:13 -0700
commit2ae7839b666592e3acaf370d52f69376b80b28a7 (patch)
treefb5bdd6a334fc339dd078a44312a251e51228adc /lib
parent0d66362cee9849db77a9f3297aa697f21fe1acdd (diff)
downloadspack-2ae7839b666592e3acaf370d52f69376b80b28a7.tar.gz
spack-2ae7839b666592e3acaf370d52f69376b80b28a7.tar.bz2
spack-2ae7839b666592e3acaf370d52f69376b80b28a7.tar.xz
spack-2ae7839b666592e3acaf370d52f69376b80b28a7.zip
Edit function names to conform to naming conventions.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/testinstall.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/spack/spack/cmd/testinstall.py b/lib/spack/spack/cmd/testinstall.py
index 5e5288bfbd..ea092727fe 100644
--- a/lib/spack/spack/cmd/testinstall.py
+++ b/lib/spack/spack/cmd/testinstall.py
@@ -76,10 +76,10 @@ class JunitResultFormat(object):
self.root = ET.Element('testsuite')
self.tests = []
- def addTest(self, buildId, passed=True, buildInfo=None):
+ def add_test(self, buildId, passed=True, buildInfo=None):
self.tests.append((buildId, passed, buildInfo))
- def writeTo(self, stream):
+ def write_to(self, stream):
self.root.set('tests', '{0}'.format(len(self.tests)))
for buildId, passed, buildInfo in self.tests:
testcase = ET.SubElement(self.root, 'testcase')
@@ -102,11 +102,11 @@ class BuildId(object):
return "-".join(str(x) for x in (self.name, self.version, self.hashId))
-def createTestOutput(spec, handled, output):
+def create_test_output(spec, handled, output):
if spec in handled:
return handled[spec]
- childSuccesses = list(createTestOutput(dep, handled, output)
+ childSuccesses = list(create_test_output(dep, handled, output)
for dep in spec.dependencies.itervalues())
package = spack.db.get(spec)
handled[spec] = package.installed
@@ -125,7 +125,7 @@ def createTestOutput(spec, handled, output):
buildLog = F.read() #TODO: this may not return all output
#TODO: add the whole build log? it could be several thousand
# lines. It may be better to look for errors.
- output.addTest(bId, package.installed, buildLogPath + '\n' +
+ output.add_test(bId, package.installed, buildLogPath + '\n' +
spec.to_yaml() + buildLog)
#TODO: create a failed test if a dependency didn't install?
@@ -171,7 +171,7 @@ def testinstall(parser, args):
jrf = JunitResultFormat()
handled = {}
for spec in topLevelNewInstalls:
- createTestOutput(spec, handled, jrf)
+ create_test_output(spec, handled, jrf)
with open(args.output, 'wb') as F:
- jrf.writeTo(F)
+ jrf.write_to(F)