Skip to content
Snippets Groups Projects
Commit 21e6cb16 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

runner: also capture error in the "simple-command" case

More error handling.
parent a2bc4792
No related branches found
No related tags found
No related merge requests found
Pipeline #56199 passed
......@@ -177,6 +177,7 @@
"hyperfine",
"--export-json",
tmp_result.name,
'--show-output',
"--",
cmd.command,
]
......@@ -187,6 +188,6 @@
if cmd.cwd is not None:
cwd = os.path.join(cwd, cmd.cwd)
subprocess.check_call(
r = subprocess.run(
time_cmd,
cwd=cwd,
......@@ -191,5 +192,5 @@
time_cmd,
cwd=cwd,
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
......@@ -195,4 +196,13 @@
)
if r.returncode != 0:
raise errors.BenchmarkRunFailure(
command=cmd,
cwd=cwd,
return_code=r.returncode,
stdout=r.stdout,
stderr=r.stderr,
)
with open(tmp_result.name) as f:
return json.load(f)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment