Skip to content

Commit 1feab3b

Browse files
committed
Bugfixes
1 parent 7ff47c7 commit 1feab3b

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

bench_runner/scripts/workflow.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,13 @@ def _main(
257257
venv = Path("venv")
258258
cpython = Path("cpython")
259259

260+
if force_32bit and sys.platform != "win32":
261+
raise RuntimeError("32-bit builds are only supported on Windows")
262+
if perf and not sys.platform.startswith("linux"):
263+
raise RuntimeError("perf profiling is only supported on Linux")
264+
if pystats and not sys.platform.startswith("linux"):
265+
raise RuntimeError("Pystats is only supported on Linux")
266+
260267
checkout_cpython(fork, ref, cpython)
261268

262269
if not should_run(force, fork, ref, machine, False, flags, cpython=cpython):

bench_runner/templates/workflow_bootstrap.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,9 @@ def main():
6161
# Now that we've installed the full bench_runner library,
6262
# continue on in a new process...
6363

64-
last_arg = sys.argv.find("workflow_bootstrap.py")
64+
last_arg = sys.argv.index("workflow_bootstrap.py")
6565
if last_arg == -1:
66-
raise ValueError(
67-
"The script should be run from the command line with the workflow_bootstrap.py argument"
68-
)
66+
raise ValueError("Couldn't parse command line")
6967

7068
run_in_venv(venv, "bench_runner", ["workflow", *sys.argv[last_arg + 1 :]])
7169

0 commit comments

Comments
 (0)