aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/allocators.py5
-rw-r--r--src/benchmark.py6
2 files changed, 7 insertions, 4 deletions
diff --git a/src/allocators.py b/src/allocators.py
index dbf26d1..717c500 100644
--- a/src/allocators.py
+++ b/src/allocators.py
@@ -12,8 +12,9 @@ allocators = {"libc": {"cmd_prefix" : "",
for i, t in enumerate(maybe_allocators):
try:
- path = subprocess.check_output('whereis lib{} | cut -d":" -f2'.format(t),
- shell=True, text=True).strip()
+ path = subprocess.run('whereis lib{} | cut -d":" -f2'.format(t),
+ shell=True, stdout=subprocess.PIPE,
+ universal_newlines=True).stdout.strip()
if path != "":
allocators[t] = {"cmd_prefix": "", "binary_suffix": "",
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