tests: change all CLI test runners to use the new --test-instance
argument scheme
#17949
+65
−64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Back in PR #16111 (see commit 8978102) the
run-tests.py
script was changed to use an improved way of selecting the test instance, eg:that would run on
/dev/ttyACM0
. This has been a very nice improvement, makes it easier to specify the target.This PR updates all other test runners to use the same scheme:
run-multitests.py
-- previously used-i
, eg-i pyb:a0
run-natmodtests.py
-- previously used-d
and-p
, eg `-p -d /dev/ttyACM0'run-perfbench.py
-- previously used-d
and-p
The
run-internalbench.py
runner was already updated in 88cb6bcNow, everything uses the same scheme.
Testing
Tested locally running on the unix port and some boards attached to serial ports.
CI will also test this.
Octoprobe will need updating.
Trade-offs and Alternatives
Users will need to learn the new CLI options. And some existing ones had to be renamed because they clashed with
-t
.We could leave things as they are, but it's pretty awkward how the test runners all use different CLI options to select the test target.
There's still quite a bit of refactoring that could be done, to consolidate more code between the test runners. But in the interest of making small, manageable steps, I've only done the first step of converting the command line options.