Make sure output is written when test fails
This commit is contained in:
parent
3dcf69eab3
commit
b68a25835f
1 changed files with 7 additions and 1 deletions
|
@ -30,13 +30,19 @@ def main():
|
|||
else:
|
||||
atom_shell = os.path.join(SOURCE_ROOT, 'out', config, PROJECT_NAME)
|
||||
|
||||
subprocess.check_call([atom_shell, 'spec'] + sys.argv[1:])
|
||||
returncode = 0
|
||||
try:
|
||||
subprocess.check_call([atom_shell, 'spec'] + sys.argv[1:])
|
||||
except subprocess.CalledProcessError as e:
|
||||
returncode = e.returncode
|
||||
|
||||
if os.environ.has_key('OUTPUT_TO_FILE'):
|
||||
output_to_file = os.environ['OUTPUT_TO_FILE']
|
||||
with open(output_to_file, 'r') as f:
|
||||
print f.read()
|
||||
|
||||
return returncode
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
|
Loading…
Reference in a new issue