diff options
author | 2015-06-22 15:00:56 -0700 | |
---|---|---|
committer | 2015-06-22 15:00:56 -0700 | |
commit | 6b3cb2a71f7ba8f23945d9919c05ff0037321981 (patch) | |
tree | 4e62fb23aac8c961eee6cc2a25ea2793f2957955 /tools/run_tests | |
parent | 1a256bd6d8a1b31b1791400cec7fd4faedef8e3d (diff) | |
parent | f7b7c89351da0c2cfd7a13ce556737e68d0312fa (diff) |
Merge pull request #2168 from ctiller/dont-do-nothing-infinite-times
Dont do nothing for eternity
Diffstat (limited to 'tools/run_tests')
-rwxr-xr-x | tools/run_tests/run_tests.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index b17e1ecbc0..5ed70f0b7e 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -513,6 +513,8 @@ def _build_and_run(check_cancelled, newline_on_success, travis, cache): # chance to run. massaged_one_run = list(one_run) # random.shuffle needs an indexable seq. random.shuffle(massaged_one_run) # which it modifies in-place. + if infinite_runs: + assert len(massaged_one_run) > 0, 'Must have at least one test for a -n inf run' runs_sequence = (itertools.repeat(massaged_one_run) if infinite_runs else itertools.repeat(massaged_one_run, runs_per_test)) all_runs = itertools.chain.from_iterable(runs_sequence) |