Skip to content

Commit 50e19d0

Browse files
committed
Bugfixes
1 parent bc6b24b commit 50e19d0

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

Diff for: bench_runner/scripts/workflow.py

+7
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):

Diff for: bench_runner/templates/workflow_bootstrap.py

+2-4
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

Diff for: tests/test_run_benchmarks.py

-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ def test_should_run_exists_force(benchmarks_checkout, monkeypatch):
246246
removed_paths = []
247247

248248
def remove(repo, path):
249-
nonlocal removed_paths
250249
removed_paths.append(path)
251250
(repo / path).unlink()
252251

0 commit comments

Comments
 (0)