diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-02-11 16:48:32 -0800 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-02-11 16:48:32 -0800 |
commit | 6be5e587bdc211fa8677105659cecfb08ed16644 (patch) | |
tree | 7f9e88fdd4e9641135f8bb436367df890f68dfc8 /tools/run_tests/run_tests.py | |
parent | 2ea18ee6ebf47c12c3e6ca62c2cd21a84e8ff257 (diff) | |
parent | 2573958e844ecfb03203d486cbac7ce500401395 (diff) |
Merge pull request #480 from dklempner/runs_per_test
Disable test caching when runs_per_test > 1
Diffstat (limited to 'tools/run_tests/run_tests.py')
-rwxr-xr-x | tools/run_tests/run_tests.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index f59bff2a88..ab6728b4ee 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -180,14 +180,17 @@ forever = args.forever class TestCache(object): """Cache for running tests.""" - def __init__(self): + def __init__(self, use_cache_results): self._last_successful_run = {} + self._use_cache_results = use_cache_results def should_run(self, cmdline, bin_hash): if cmdline not in self._last_successful_run: return True if self._last_successful_run[cmdline] != bin_hash: return True + if not self._use_cache_results: + return True return False def finished(self, cmdline, bin_hash): @@ -228,7 +231,7 @@ def _build_and_run(check_cancelled, newline_on_success, cache): return 0 -test_cache = TestCache() +test_cache = TestCache(runs_per_test == 1) test_cache.maybe_load() if forever: |