Skip to content

Pass the cluster mode arguments through to pybnf in the full test runner - #641

Merged
wshlavacek merged 1 commit into
mainfrom
full-tests-runnable-624
Aug 22, 2026
Merged

Pass the cluster mode arguments through to pybnf in the full test runner#641
wshlavacek merged 1 commit into
mainfrom
full-tests-runnable-624

Conversation

@wshlavacek

Copy link
Copy Markdown
Collaborator

The full test runner in tests/full_tests/run_all.py can run its tests on a
single machine or across a cluster. You pick the mode with a command line
argument. No argument runs locally. The argument ssh uses the automatic dask
ssh setup. The argument sf uses a manual cluster with a scheduler file.

The runner worked out the right pybnf arguments for each mode but never passed
them to pybnf. So the ssh and sf modes looked like they used the cluster but
really ran every test on a single machine.

This change fixes that. The argument handling now lives in two small functions.
parse_mode turns the command line into the extra arguments and the output file
name. build_pybnf_command builds the pybnf command and puts the extra arguments
at the end so they reach pybnf. The extra arguments are passed down to every
test.

I also added tests/test_full_test_runner.py, which tests both functions. One
test checks that the cluster arguments appear in the built command, so this bug
cannot come back without a test failing.

How to check: run

uv run pytest tests/test_full_test_runner.py

All six tests pass. Running the full suite across a cluster needs a SLURM
allocation, so I did not run that here.

This is the code half of issue 624. Pull request 640 covers the documentation
and cluster script half.

The run_all.py test runner worked out the command line arguments that select the
cluster mode, but it never passed them to pybnf. Because of this the ssh and sf
modes quietly ran every test on a single machine instead of across the cluster.

This change moves the argument handling into two small functions. parse_mode turns
the command line into the extra arguments and the output file name. build_pybnf_command
builds the pybnf command and adds the extra arguments to the end so they reach pybnf.
The run_all and run_test functions now take these values and pass the extra arguments
down to each test.

A new test file, tests/test_full_test_runner.py, covers both functions. One test
checks that the cluster arguments really appear in the built command, so the original
bug cannot come back unnoticed.
@wshlavacek
wshlavacek merged commit 3c335d0 into main Aug 22, 2026
7 checks passed
@wshlavacek
wshlavacek deleted the full-tests-runnable-624 branch August 22, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant