diff options
| author | Florian Fischer <florian.fl.fischer@fau.de> | 2019-02-09 12:43:32 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fl.fischer@fau.de> | 2019-02-09 12:43:32 +0100 |
| commit | cd9264be5594a7715dde29b3c0be82a00baf5fd1 (patch) | |
| tree | c3394267fae9551c2828e83ec37df9ada0c8601e /src/benchmark.py | |
| parent | 1d8b606aa3c862f5ec7a9a06273f3ff1b08671c6 (diff) | |
| download | allocbench-cd9264be5594a7715dde29b3c0be82a00baf5fd1.tar.gz allocbench-cd9264be5594a7715dde29b3c0be82a00baf5fd1.zip | |
always use cmd_prefix
Diffstat (limited to 'src/benchmark.py')
| -rw-r--r-- | src/benchmark.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/benchmark.py b/src/benchmark.py index 1aa5cf9..583b05b 100644 --- a/src/benchmark.py +++ b/src/benchmark.py @@ -150,11 +150,19 @@ class Benchmark (object): i += 1 print(i, "of", n, "\r", end='') - actual_cmd = self.measure_cmd + " " - perm_dict = perm._asdict() perm_dict.update(t) - actual_cmd += self.cmd.format(**perm_dict) + actual_cmd = self.cmd.format(**perm_dict) + + # Find absolute path of executable + binary_end = actual_cmd.find(" ") + binary = subprocess.check_output(["whereis", actual_cmd[0:binary_end]], + universal_newlines=True).split()[1] + actual_cmd = binary + actual_cmd[binary_end:] + + actual_cmd = t["cmd_prefix"] + " " + actual_cmd + + actual_cmd = self.measure_cmd + " " + actual_cmd res = subprocess.run(actual_cmd.split(), stderr=subprocess.PIPE, |
