mirror of
https://github.com/Cantera/cantera.git
synced 2026-08-08 20:18:24 -05:00
[Test] Fix test status report if Python test crashes
This commit is contained in:
+5
-2
@@ -98,6 +98,7 @@ def addPythonTest(testname, subdir, script, interpreter, outfile,
|
||||
# Test was successful
|
||||
open(target[0].path, 'w').write(time.asctime()+'\n')
|
||||
|
||||
failures = 0
|
||||
if os.path.exists(outfile):
|
||||
# Determine individual test status
|
||||
for line in open(outfile):
|
||||
@@ -106,8 +107,10 @@ def addPythonTest(testname, subdir, script, interpreter, outfile,
|
||||
testResults.passed[':'.join((testname,name))] = 1
|
||||
elif status in ('FAIL', 'ERROR'):
|
||||
testResults.failed[':'.join((testname,name))] = 1
|
||||
else:
|
||||
# Total failure - unable to determine status of individual tests
|
||||
failures += 1
|
||||
|
||||
if code and failures == 0:
|
||||
# Failure, but unable to determine status of individual tests
|
||||
testResults.failed[testname] = True
|
||||
|
||||
testenv = localenv.Clone()
|
||||
|
||||
Reference in New Issue
Block a user