[SCons] Continue running test suite if Python tests crash
If the Python test suite crashes, it won't save a results file, but we can still run the rest of the tests and report this specific failure.
This commit is contained in:
parent
d501189ce9
commit
3eba9641ab
1 changed files with 11 additions and 8 deletions
|
|
@ -98,15 +98,18 @@ def addPythonTest(testname, subdir, script, interpreter, outfile,
|
||||||
if not code:
|
if not code:
|
||||||
# Test was successful
|
# Test was successful
|
||||||
open(target[0].path, 'w').write(time.asctime()+'\n')
|
open(target[0].path, 'w').write(time.asctime()+'\n')
|
||||||
else:
|
|
||||||
testResults.failed[testname] = True
|
|
||||||
|
|
||||||
for line in open(outfile):
|
if os.path.exists(outfile):
|
||||||
status, name = line.strip().split(': ', 1)
|
# Determine individual test status
|
||||||
if status == 'PASS':
|
for line in open(outfile):
|
||||||
testResults.passed[':'.join((testname,name))] = 1
|
status, name = line.strip().split(': ', 1)
|
||||||
elif status in ('FAIL', 'ERROR'):
|
if status == 'PASS':
|
||||||
testResults.failed[':'.join((testname,name))] = 1
|
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
|
||||||
|
testResults.failed[testname] = True
|
||||||
|
|
||||||
testenv = localenv.Clone()
|
testenv = localenv.Clone()
|
||||||
passedFile = File(pjoin(subdir, '%s.passed' % testname))
|
passedFile = File(pjoin(subdir, '%s.passed' % testname))
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue