[Test/Matlab] Improve behavior when Matlab tests fail
Outright failures of the Matlab test suite which result in the test log file not being written no longer cause SCons to abort. Instead, they are logged as a major test failure, similar to the behavior of the Python test suite.
This commit is contained in:
parent
fd57936b18
commit
bdaabc0428
1 changed files with 7 additions and 1 deletions
|
|
@ -187,7 +187,13 @@ def addMatlabTest(script, testName, dependencies=None, env_vars=()):
|
|||
code = subprocess.call([pjoin(env['matlab_path'], 'bin', 'matlab')] +
|
||||
matlabOptions + ['-r', runCommand],
|
||||
env=environ, cwd=Dir('#test/matlab').abspath)
|
||||
results = open(outfile).read()
|
||||
try:
|
||||
results = open(outfile).read()
|
||||
except EnvironmentError: # TODO: replace with 'FileNotFoundError' after end of Python 2.7 support
|
||||
testResults.failed['Matlab' +
|
||||
' ***no results for entire test suite***'] = 100
|
||||
return
|
||||
|
||||
print('-------- Matlab test results --------')
|
||||
print(results)
|
||||
print('------ end Matlab test results ------')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue