-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Remove tinytest framework, and --write-exp
and --list-tests
options from run-tests.py
#15788
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
Conversation
Code size report:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #15788 +/- ##
=======================================
Coverage 98.44% 98.44%
=======================================
Files 163 163
Lines 21296 21296
=======================================
Hits 20964 20964
Misses 332 332 ☔ View full report in Codecov by Sentry. |
I'm not actively using --list-tests and don't think I ever used --write-exp so as far as I'm concerned these can be removed. |
Thanks for the heads-up. We are using |
Ah, that's interesting. Do you find it easier/necessary to use tinytest over just running the tests through the serial port? |
We actually just use it for unit testing C code, not MicroPython stuff. |
Right. So you don't use Then it is better for you to just maintain a copy of the tinytest library. Not really much point in us having it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always a good day when you can delete code without losing functionality!
(And in general I think this set of changes to run all tests through the same codepaths is really beneficial!)
With the recent qemu (d9a0fdd and 0426934) and zephyr (05cad7b) changes to how their tests are run, two things became unused: - The tinytest framework, which embedded a set of tests and their expected output within firmware, so these tests could be run stand-alone. - The `--write-exp` and `--list-tests` options to `tests/run-tests.py`, which were needed primarily to generated the expected test output for tinytest (also the associated `tests/run-tests-exp.py/.sh` scripts are now unused). This commit removes the tinytest component and all its helper code. This eliminates a maintenance burden. Signed-off-by: Damien George <damien@micropython.org>
Removing the now-unused (see previous commit for details) `--write-exp` and `--list-tests` options helps to simplify the rather complex logic in `run-tests.py`. Signed-off-by: Damien George <damien@micropython.org>
c4eb247
to
1be38e8
Compare
Summary
With the recent qemu (#15624 and #15743) and zephyr (#15678) changes to how their tests are run, two things became unused:
--write-exp
and--list-tests
options totests/run-tests.py
, which were needed primarily to generated the expected test output for tinytest (also the associatedtests/run-tests-exp.py
/.sh
scripts are unused)This PR removes both of these things.
Rationale
Removing tinytest removes now-unused code and reduces a maintenance burden.
Removing
--write-exp
and--list-tests
options helps to simplify the rather complex logic inrun-tests.py
. In particular this opens the door to make it sorun-tests.py
can automatically detect the target/platform that it's running on (that's for a follow-up PR).Testing
All code removed here is unused. The existing tests and CI should not change.
Trade-offs and Alternatives
We could leave this functionality here, in case it's useful for people to use in their own project. But IMO that's a burden on this project that we don't need. And we'd need to add code to test these now-unused components, otherwise they will eventually break as other things change around them.