Added "inf" as a valid option to run_test.py's -n flag.
Especially useful in combination with -f.
diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py
index e2b03bd..61a95b0 100755
--- a/tools/run_tests/jobset.py
+++ b/tools/run_tests/jobset.py
@@ -339,13 +339,15 @@
maxjobs=None,
newline_on_success=False,
travis=False,
+ infinite_runs=False,
stop_on_failure=False,
cache=None):
js = Jobset(check_cancelled,
maxjobs if maxjobs is not None else _DEFAULT_MAX_JOBS,
newline_on_success, travis, stop_on_failure,
cache if cache is not None else NoCache())
- if not travis:
+ # We can't sort an infinite sequence of runs.
+ if not travis or infinite_runs:
cmdlines = shuffle_iteratable(cmdlines)
else:
cmdlines = sorted(cmdlines, key=lambda x: x.shortname)