aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-02-09 12:43:32 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-02-09 12:43:32 +0100
commitcd9264be5594a7715dde29b3c0be82a00baf5fd1 (patch)
treec3394267fae9551c2828e83ec37df9ada0c8601e
parent1d8b606aa3c862f5ec7a9a06273f3ff1b08671c6 (diff)
downloadallocbench-cd9264be5594a7715dde29b3c0be82a00baf5fd1.tar.gz
allocbench-cd9264be5594a7715dde29b3c0be82a00baf5fd1.zip
always use cmd_prefix
-rw-r--r--src/benchmark.py14
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,