diff options
author | 2015-05-29 08:41:29 -0700 | |
---|---|---|
committer | 2015-05-29 08:45:55 -0700 | |
commit | 533b1a22b4a527107df2607227969102edba0a1f (patch) | |
tree | cd4cd42a9cd42455a72cc78e1f17891bfcdec913 /tools/run_tests/run_tests.py | |
parent | 7684bf5238978712e93e7ad4fe4ec514f50fdc84 (diff) |
Add fast stop
Allows run_tests to early out as soon as a test fails.
Plays well with -f.
Diffstat (limited to 'tools/run_tests/run_tests.py')
-rwxr-xr-x | tools/run_tests/run_tests.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 2428e21ca3..7d5d6b43b3 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -349,6 +349,10 @@ argp.add_argument('-l', '--language', choices=sorted(_LANGUAGES.keys()), nargs='+', default=sorted(_LANGUAGES.keys())) +argp.add_argument('-S', '--stop_on_failure', + default=False, + action='store_const', + const=True) argp.add_argument('-a', '--antagonists', default=0, type=int) args = argp.parse_args() @@ -376,11 +380,11 @@ else: def make_jobspec(cfg, targets): return jobset.JobSpec(['make', '-j', '%d' % (multiprocessing.cpu_count() + 1), - 'EXTRA_DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' % + 'EXTRA_DEFINES=GRPC_TEST_SLOWDOWN_MACHINE_FACTOR=%f' % args.slowdown, 'CONFIG=%s' % cfg] + targets) -build_steps = [make_jobspec(cfg, +build_steps = [make_jobspec(cfg, list(set(itertools.chain.from_iterable( l.make_targets() for l in languages)))) for cfg in build_configs] @@ -388,7 +392,7 @@ build_steps.extend(set( jobset.JobSpec(cmdline, environ={'CONFIG': cfg}) for cfg in build_configs for l in languages - for cmdline in l.build_steps())) + for cmdline in l.build_steps())) one_run = set( spec for config in run_configs @@ -454,6 +458,7 @@ def _build_and_run(check_cancelled, newline_on_success, travis, cache): if not jobset.run(all_runs, check_cancelled, newline_on_success=newline_on_success, travis=travis, maxjobs=args.jobs, + stop_on_failure=args.stop_on_failure, cache=cache): return 2 finally: |