Skip to content

Commit 8f6ca4e

Browse files
committed
check if trace_v3 commands are failing and write errors
1 parent 37df881 commit 8f6ca4e

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ RUN mv utils/try-summary /bin
3939
WORKDIR /srv/hs
4040
RUN python3 -m venv .venv
4141
COPY . .
42+
RUN .venv/bin/pip install -r requirements.txt
4243
ENTRYPOINT ["/srv/hs/entrypoint.sh"]

report/run_benchmark.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,26 @@ def do_trace_v3_run(test_base: Path, output_base: Path, env: dict, script_name:
128128
output_dir.mkdir(parents=True, exist_ok=True)
129129
env['OUTPUT_DIR'] = str(output_dir)
130130

131-
run(['trace_v3', 'install'], check=False)
131+
try:
132+
run(['trace_v3', 'install'], check=False)
133+
except FileNotFoundError:
134+
print("Error: trace_v3 not found on PATH. Rebuild Docker images to include trace_v3.")
135+
with open(output_base / "trace_v3_time", 'w') as f:
136+
f.write('0\n')
137+
return 1
132138

133139
cmd = ['trace_v3', '--', '/bin/sh', str(test_base / script_name)] + script_args
134140

135141
print(f"Running trace_v3 command: {' '.join(cmd)}")
136142

137143
before = time.time()
138-
result = run(cmd, stdout=PIPE, stderr=PIPE, env=env)
144+
try:
145+
result = run(cmd, stdout=PIPE, stderr=PIPE, env=env)
146+
except FileNotFoundError:
147+
print("Error: trace_v3 not found on PATH. Rebuild Docker images to include trace_v3.")
148+
with open(output_base / "trace_v3_time", 'w') as f:
149+
f.write('0\n')
150+
return 1
139151
duration = time.time() - before
140152

141153
with open(output_dir / "stdout", 'wb') as f:

0 commit comments

Comments
 (0)