[Test] Fix test status report if Python test crashes
This commit is contained in:
parent
051381d862
commit
f8ee065368
1 changed files with 5 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue