From fdee442356d6a64ff6557093d10ca12289c1e3b5 Mon Sep 17 00:00:00 2001 From: Kevin Brothaler <admin@digipom.com> Date: Mon, 16 Jan 2017 19:07:18 -0400 Subject: [PATCH] Pass the tests only if we find an expected positive output (rather than checking for negative output to fail the tests). --- ci/ios/deploy_and_run_x86_64_binary_on_ios_simulator.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/ios/deploy_and_run_x86_64_binary_on_ios_simulator.py b/ci/ios/deploy_and_run_x86_64_binary_on_ios_simulator.py index 19e016ff..40c00bb5 100755 --- a/ci/ios/deploy_and_run_x86_64_binary_on_ios_simulator.py +++ b/ci/ios/deploy_and_run_x86_64_binary_on_ios_simulator.py @@ -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' -- GitLab