diff options
author | Nicolas Noble <nicolasnoble@users.noreply.github.com> | 2015-01-14 13:51:20 -0800 |
---|---|---|
committer | Nicolas Noble <nicolasnoble@users.noreply.github.com> | 2015-01-14 13:51:20 -0800 |
commit | a9ce4b4649fb9db4a39e53f0e15e3ed61b081250 (patch) | |
tree | 5d59ba61f163433103877d7533a08de9430ec3ba | |
parent | 087ebf5508c052fd4ab22d6add9cfde9f6cb0943 (diff) | |
parent | d86a394ce26407be1f20e467e746348e955e9de4 (diff) |
Merge pull request #29 from ctiller/forever
Fix return behavior of run_tools.py
-rwxr-xr-x | tools/run_tests/run_tests.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index bb25b38e57..b4d426f8de 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -80,17 +80,20 @@ def _build_and_run(check_cancelled): for cfg in build_configs for target in _MAKE_TEST_TARGETS), check_cancelled, maxjobs=1): - sys.exit(1) + return 1 # run all the tests - jobset.run(( + if not jobset.run(( config.run_command(x) for config in run_configs for filt in filters for x in itertools.chain.from_iterable(itertools.repeat( glob.glob('bins/%s/%s_test' % ( config.build_config, filt)), - runs_per_test))), check_cancelled) + runs_per_test))), check_cancelled): + return 2 + + return 0 if forever: @@ -102,5 +105,5 @@ if forever: while not have_files_changed(): time.sleep(1) else: - _build_and_run(lambda: False) + sys.exit(_build_and_run(lambda: False)) |