-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
unix: Add additional testing targets. #17921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
These are convenience targets for running specific tests as a developer. They are more useful that invoking run-tests directly as they take account of the VARIANT= specified on the make command-line. For instance, you can run all tests matching the regular expression "int" with `make VARIANT=... test//int`. (the new targets are all documented in README.md) Signed-off-by: Jeff Epler <jepler@gmail.com>
Code size report:
|
There are of course different naming conventions that could be used for the "run a test subset" rules test/% and test//%. Here's the reasoning that led to the current forms:
|
And would that pattern work with WindowsPaths \ as well ? |
That's a good question! I don't have any Windows machines available to test. Since most path like stuff is handled just fine by make even though Windows uses a different directory separator, I think the part where it gets the test selection into The run-tests script is careful to replace windows-style directory separators with forward slash ones before applying filters (see around line 884), so I think there's a good chance that It would be great if someone can actually test on Windows and advise how to update the readme about any caveats that may exist. If someone does I'll update it. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #17921 +/- ##
=======================================
Coverage 98.38% 98.38%
=======================================
Files 171 171
Lines 22295 22298 +3
=======================================
+ Hits 21936 21939 +3
Misses 359 359 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I found some time. under MSYS2 + the same changes to the windows makefile - the test selection also works fine. So while it works, I don't think its worth the effort to add to the windows makefile. |
Summary
These are convenience targets for running specific tests as a developer. They are more useful that invoking run-tests directly as they take account of the VARIANT= specified on the make command-line.
For instance, you can run all tests matching the regular expression "int" with
make VARIANT=... test//int
. (the new targets are all documented in README.md)Testing
I used each of the added targets locally and verified that they seemed to work as intended.
Trade-offs and Alternatives
This doesn't do anything that isn't possible to day by properly setting
MICROPY_MICROPYTHON
and invoking run-tests.py directly but I find it's a good QOL enhancement. CircuitPython carries something similar but not quite the same. (note to @dhalbert in the future: if this is accepted, you should take this version and drop the one in circuitpython)