Skip to content
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

tests: logging/dictionary: pytest only looks at last output #75623

Merged

Conversation

dcpleung
Copy link
Member

@dcpleung dcpleung commented Jul 8, 2024

There are instances where on hardware tests would result in multiple dictionary logging blocks. This is usually due to flashing and running via twister in separate steps. Once flashing is done, the device starts running and sending logging string to output, but twister is not ready to read them, thus leaving the strings in the host's UART buffer. Then twister starts its testing run by resetting the device which results in another dictionary logging block to show up. So the pytest script has to be updated to only look at the last dictionay logging block.

There are instances where on hardware tests would result in
multiple dictionary logging blocks. This is usually due to
flashing and running via twister in separate steps. Once
flashing is done, the device starts running and sending
logging string to output, but twister is not ready to read
them, thus leaving the strings in the host's UART buffer.
Then twister starts its testing run by resetting the device
which results in another dictionary logging block to show
up. So the pytest script has to be updated to only look at
the last dictionay logging block.

Signed-off-by: Daniel Leung <[email protected]>
@dcpleung
Copy link
Member Author

dcpleung commented Jul 8, 2024

Related to #75253

@dcpleung dcpleung marked this pull request as ready for review July 8, 2024 21:53
@aescolar aescolar added the bug The issue is a bug, or the PR is fixing a bug label Jul 9, 2024
@aescolar aescolar added this to the v3.7.0 milestone Jul 9, 2024
@nashif nashif added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Jul 9, 2024
@nashif nashif merged commit 0b76fd9 into zephyrproject-rtos:main Jul 9, 2024
25 checks passed
@dcpleung dcpleung deleted the logging/dictionary_multiple_outputs branch July 9, 2024 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Logging bug The issue is a bug, or the PR is fixing a bug Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants