aboutsummaryrefslogtreecommitdiff
path: root/src/benchmark.py
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2019-02-10 17:16:58 +0100
committerFlorian Fischer <florian.fl.fischer@fau.de>2019-02-10 17:16:58 +0100
commit94148135abcc397ad0ac4475cf8ef4fa7b73308a (patch)
tree66b067940831bf3006bfa0673a4601e494206c10 /src/benchmark.py
parent4c0830ffbc045290c167e482855cb25a639df0e0 (diff)
downloadallocbench-94148135abcc397ad0ac4475cf8ef4fa7b73308a.tar.gz
allocbench-94148135abcc397ad0ac4475cf8ef4fa7b73308a.zip
don't use subprocess.check_output to support python3 < 3.7.0
Diffstat (limited to 'src/benchmark.py')
-rw-r--r--src/benchmark.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/benchmark.py b/src/benchmark.py
index 583b05b..7bf709e 100644
--- a/src/benchmark.py
+++ b/src/benchmark.py
@@ -156,8 +156,10 @@ class Benchmark (object):
# 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]
+ binary = subprocess.run(["whereis", actual_cmd[0:binary_end]],
+ stdout=subprocess.PIPE,
+ universal_newlines=True).stdout.split()[1]
+
actual_cmd = binary + actual_cmd[binary_end:]
actual_cmd = t["cmd_prefix"] + " " + actual_cmd