riotctrl.shell: flush pexpect before prompt#21
Merged
fjmolinas merged 2 commits intoRIOT-OS:masterfrom Mar 3, 2021
Merged
Conversation
Member
Author
|
I also made some sample tests with the release tests. They also seem to still work. |
fjmolinas
reviewed
Mar 2, 2021
riotctrl/shell/__init__.py
Outdated
| # it is not shown | ||
| self.riotctrl.term.expect_exact([self.prompt, pexpect.TIMEOUT], | ||
| timeout=self.PROMPT_TIMEOUT) | ||
| # flush pexpect up to 10000 characters to fix syncing issues with |
Contributor
There was a problem hiding this comment.
Suggested change
| # flush pexpect up to 10000 characters to fix syncing issues with | |
| # flush pexpect up to 10000(arbitrarily large value) characters to start with an empty buffer. | |
| # This fixes issues where REPLWrapper would capture previous commands output. |
Maybe the comment can be a little more detailed? Feel free to modify of course
c1b9e4e to
14e2947
Compare
Member
Author
|
Squashed. |
14e2947 to
9149ce4
Compare
Member
Author
|
Squashed and fixed issue pointed out by the CI. |
Member
Author
|
Thanks! |
This was referenced Mar 3, 2021
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.
For some boards there is a weird syncing error happening: The output of a command issued via a ShellInteraction comes after the next command command issued. Examples of this can be seen in this action or in this comment. With flushing pexpected completely before the prompt, this does not happen again. Thanks @fjmolinas for the hint!
For testing the tests here should pass, as well as
tests/congure_testin RIOT on the boards we found the issue for; namelynucleo-f411re,b-l072z-lrwan1, andb-l475e-iot01a: