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:
|
else:
|
||||||
atom_shell = os.path.join(SOURCE_ROOT, 'out', config, PROJECT_NAME)
|
atom_shell = os.path.join(SOURCE_ROOT, 'out', config, PROJECT_NAME)
|
||||||
|
|
||||||
|
returncode = 0
|
||||||
|
try:
|
||||||
subprocess.check_call([atom_shell, 'spec'] + sys.argv[1:])
|
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'):
|
if os.environ.has_key('OUTPUT_TO_FILE'):
|
||||||
output_to_file = os.environ['OUTPUT_TO_FILE']
|
output_to_file = os.environ['OUTPUT_TO_FILE']
|
||||||
with open(output_to_file, 'r') as f:
|
with open(output_to_file, 'r') as f:
|
||||||
print f.read()
|
print f.read()
|
||||||
|
|
||||||
|
return returncode
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
|
Loading…
Reference in a new issue