{{ message }}
tests/run-tests.py: Add --trace-output option for board targets.#19329
Merged
dpgeorge merged 1 commit intoJun 25, 2026
Merged
Conversation
6690643 to
907027e
Compare
Octoprobe PR report
Failures |
907027e to
5dd5646
Compare
2 tasks
projectgus
approved these changes
Jun 25, 2026
projectgus
left a comment
Contributor
There was a problem hiding this comment.
Yes, this looks very useful. Should be able to retire at least one shell one-liner from my history!
This adds a new `--trace-output` option to `run-tests.py` which mimics the same option already in `run-multitests.py`. Using it, the output from the test running on a board is printed to stdout as it is received. This allows easier debugging of tests, to see the output in real time. For tests that have complicated run parameters, eg using via-mpy or needing a target wiring script, running them standalone (eg with `mpremote`) is not possible, so using `run-tests.py` becomes mandatory, hence the need to easily see the output without having to view the result file separately at the end. It's also useful to watch tests that pass but are long running. Signed-off-by: Damien George <damien@micropython.org>
5dd5646 to
e62bd41
Compare
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
This adds a new
--trace-outputoption (short-hand-c) torun-tests.pywhich mimics the same option already inrun-multitests.py. Using it, the output from the test running on a board is printed to stdout as it is received.This allows easier debugging of tests, to see the output in real time. For tests that have complicated run parameters, eg using via-mpy or needing a target wiring script, running them standalone (eg with
mpremote) is not possible, so usingrun-tests.pybecomes mandatory, hence the need to easily see the output without having to view the result file separately at the end. It's also useful to watch tests that pass but are long running.Testing
Tested on PYBD_SF6:
-c, gives lots of output and everything still passes as beforeGenerative AI
Not used.