aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-11 18:19:24 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-11 18:19:24 -0800
commitd9dd8fee0485ee3b3c2c5caa1df39b7c97330ac2 (patch)
treed4bcdc37bbed36b9cdce6d507292add4c72ab4d5 /tools/run_tests
parentbd217574fb7ec65f899103eb4e1f8719b83fa43a (diff)
parentd8b88dec9182705356af8a862445c28c41ab35c8 (diff)
Merge github.com:grpc/grpc into c++api
Diffstat (limited to 'tools/run_tests')
-rwxr-xr-xtools/run_tests/run_tests.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index cb54c0db82..ab6728b4ee 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -40,7 +40,7 @@ class ValgrindConfig(object):
self.allow_hashing = False
def job_spec(self, binary, hash_targets):
- return JobSpec(cmdline=['valgrind', '--tool=%s' % self.tool, binary],
+ return jobset.JobSpec(cmdline=['valgrind', '--tool=%s' % self.tool, binary],
hash_targets=None)
@@ -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: