QOL changes for test runner#79
Merged
jk-ozlabs merged 3 commits intoCodeConstruct:mainfrom Jun 3, 2025
Merged
Conversation
pytest-tap 3.5 prints all the captured stdout and stderr into comments
of the TAP output:
# --- Captured Err ---
# test-mctpd: log CodeConstruct#1
# test-mctpd: log CodeConstruct#2
# test-mctpd: ...
This just improves the situation over having no logs at all, or having
to rerun with pytest directly to see the log.
Signed-off-by: Khang D Nguyen <khangng@os.amperecomputing.com>
pytest-tap output is great for just summaries, but the log is very much unreadable if tests fail. Currently there is an unresolved issue related to terminalreporter, see [1]. [1] python-tap/pytest-tap#98 This commit adds a way to disable TAP. Newer versions of meson support an --interactive flag, like so: meson test -C obj --interactive This makes the test run directly in the terminal, not redirected to a file. When this happens, i.e stdout is a terminal, we run the test without TAP. Signed-off-by: Khang D Nguyen <khangng@os.amperecomputing.com>
Currently, to my knowledge, there is no way to filter tests when running
the testsuite through meson. Manually invoking pytest is the only way.
This PR allows such CLI invocation to be possible to filter tests
containing "recovery":
meson test -C obj --test-args="-k recovery"
Signed-off-by: Khang D Nguyen <khangng@os.amperecomputing.com>
jk-ozlabs
reviewed
Jun 3, 2025
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.
This PR is a collection of small QOL changes to the test runner:
mctpdsubprocess.--interactivetomeson.pytestvia--test-args.As a result, instead of
It can be now
and for filtering tests: