Repository navigation
qemu-arm/qemu-riscv: improve tinytest runner so it doesn't need to generate .exp files on disk - #15609
Closed
dpgeorge wants to merge 4 commits into
Closed
qemu-arm/qemu-riscv: improve tinytest runner so it doesn't need to generate .exp files on disk#15609dpgeorge wants to merge 4 commits into
dpgeorge wants to merge 4 commits into
Conversation
Signed-off-by: Damien George <[email protected]>
Signed-off-by: Damien George <[email protected]>
To be used only when `run-tests.py` is imported as a module by another Python script. Signed-off-by: Damien George <[email protected]>
TODO: - test zephyr changes Signed-off-by: Damien George <[email protected]>
dpgeorge
marked this pull request as draft
August 7, 2024 02:42
|
Code size report: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #15609 +/- ##
=======================================
Coverage 98.43% 98.43%
=======================================
Files 161 161
Lines 21281 21281
=======================================
Hits 20948 20948
Misses 333 333 ☔ View full report in Codecov by Sentry. |
Member
Author
|
Closing in favour of #15624. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The qemu-arm and qemu-riscv ports generate a whole lot of .exp files in the
tests/directory when you run the tests on these ports. This leaves the repo in an unclean state.This PR improves this situation by:
tools/tinytest-codegen.pyscript by calling out to Python to run them and collecting the resulting stdout outputbuild/genhdr/tests.hfileThis results in a clean repo after running the tests. It also means that
run-tests.pyno longer needs a special case to handle the allowed tests for qemu-arm/riscv targets.A bonus of this approach is that it's not much extra work to enable running the tests on qemu-* port using the via .mpy and via native emitter test framework that already exists in
run-tests.py.Note: this PR builds on #15577.
TODO:
Testing
The qemu-arm tests pass like they did before, but no stray .exp files are generated.
Trade-offs and Alternatives
It's a little slower this way when generating the .exp files but not by much.
An alternative to this approach would be to make the qemu-* ports have a stdio to the outside world for the REPL, then treat the qemu process as a board with a serial port, and run the test suite as it would normally be run for an attached hardware board.