Run code coverage no matter if tests failed or succeeded.
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 2d12ade..47f949b 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -862,6 +862,7 @@
port_server_port = 32767
_start_port_server(port_server_port)
resultset = None
+ num_test_failures = 0
try:
infinite_runs = runs_per_test == 0
one_run = set(
@@ -885,7 +886,7 @@
else itertools.repeat(massaged_one_run, runs_per_test))
all_runs = itertools.chain.from_iterable(runs_sequence)
- number_failures, resultset = jobset.run(
+ num_test_failures, resultset = jobset.run(
all_runs, check_cancelled, newline_on_success=newline_on_success,
travis=args.travis, infinite_runs=infinite_runs, maxjobs=args.jobs,
stop_on_failure=args.stop_on_failure,
@@ -902,8 +903,6 @@
do_newline=True)
else:
jobset.message('PASSED', k, do_newline=True)
- if number_failures:
- return 2
finally:
for antagonist in antagonists:
antagonist.kill()
@@ -913,8 +912,8 @@
number_failures, _ = jobset.run(
post_tests_steps, maxjobs=1, stop_on_failure=True,
newline_on_success=newline_on_success, travis=args.travis)
- if number_failures:
- return 3
+ if num_test_failures or number_failures:
+ return 2
if cache: cache.save()