summaryrefslogtreecommitdiff
path: root/client/benchmarks/runner.py
diff options
context:
space:
mode:
authorMark Wong2018-02-03 22:15:19 +0000
committerMark Wong2018-02-04 01:35:58 +0000
commit015daacf6a8b53a682b989888ae7b75ddc82ccd8 (patch)
treef47702565f0f755daf780ac7d07add0fbc0e3b89 /client/benchmarks/runner.py
parent00242ae477359b8fde72e5c00ba25fa0316a1400 (diff)
Move results directory check to start of client
Between the benchmark and collector modules, it's not clear who might have created the output directory first. Leave a warning in the benchmark modules for now, otherwise don't let it prevent the tests from running.
Diffstat (limited to 'client/benchmarks/runner.py')
-rw-r--r--client/benchmarks/runner.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/client/benchmarks/runner.py b/client/benchmarks/runner.py
index 41a3d7e..4d56187 100644
--- a/client/benchmarks/runner.py
+++ b/client/benchmarks/runner.py
@@ -56,10 +56,6 @@ class BenchmarkRunner(object):
issues = {}
- if os.path.exists(self._output):
- issues['global'] = ["output directory '%s' already exists" %
- (self._output,)]
-
for config_name in self._configs:
t = self._check_config(config_name)
if t:
@@ -124,7 +120,12 @@ class BenchmarkRunner(object):
def run(self):
'run all the configured benchmarks'
- os.mkdir(self._output)
+ # It's ok if the output directory already exists. One of the other
+ # collector modules may have started before the benchmark.
+ try:
+ os.mkdir(self._output)
+ except OSError as e:
+ log("WARNING: output directory already exists: %s" % self._output)
for config_name in self._configs:
self._run_config(config_name)