diff options
author | Craig Tiller <ctiller@google.com> | 2015-01-14 12:48:54 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-01-14 12:50:10 -0800 |
commit | d86a394ce26407be1f20e467e746348e955e9de4 (patch) | |
tree | f1cf9fd9fa5357c2ccc1bcaa2d524785dd04419b /tools | |
parent | 29512b56d0d16bec59f95999afbabb0d6f6e4aab (diff) |
Fix return behavior of run_tools.py
If not running in forever mode, and a test fails, fail run_tests.py
also.
If running in forever mode and make fails, wait for the next run.
Diffstat (limited to 'tools')
-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)) |