Skip to content
Snippets Groups Projects
Commit fdee4423 authored by Kevin Brothaler's avatar Kevin Brothaler Committed by Digipom Inc
Browse files

Pass the tests only if we find an expected positive output (rather than...

Pass the tests only if we find an expected positive output (rather than checking for negative output to fail the tests).
parent a6f50bb6
No related branches found
No related tags found
No related merge requests found
......@@ -80,15 +80,15 @@ def run_app_on_simulator():
print 'Running app'
try:
test_run = subprocess.Popen(['xcrun', 'simctl', 'launch', '--console', 'booted', 'com.rust.unittests'], stdout=subprocess.PIPE, bufsize=1, universal_newlines=True)
test_run_failed = False
test_run_passed = False
for line in test_run.stdout:
sys.stdout.write(line)
if test_run_failed == False:
if test_run_passed == False:
# Based on all.rs test output
test_run_failed = 'some tests failed' in line
test_run_passed = 'PASSED' in line and 'tests' in line
sys.stdout.flush()
if test_run_failed == True:
if test_run_passed == False:
raise Exception('Some tests failed')
finally:
print 'Shutting down simulator'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment