Run code coverage no matter if tests failed or succeeded.

pull/4217/head
Adele Zhou 9 years ago
parent 73081d1582
commit 803af15b58
  1. 9
      tools/run_tests/run_tests.py

@ -862,6 +862,7 @@ def _build_and_run(
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 @@ def _build_and_run(
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 @@ def _build_and_run(
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 @@ def _build_and_run(
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()

Loading…
Cancel
Save