Skip to content
Snippets Groups Projects
Commit d86a394c authored by Craig Tiller's avatar Craig Tiller
Browse files

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.
parent 29512b56
No related branches found
No related tags found
No related merge requests found
......@@ -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))
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