Add fast stop
Allows run_tests to early out as soon as a test fails.
Plays well with -f.
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 764e058..76beb0b 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -349,6 +349,10 @@
choices=['all'] + sorted(_LANGUAGES.keys()),
nargs='+',
default=['all'])
+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()
@@ -457,6 +461,7 @@
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: