-
Notifications
You must be signed in to change notification settings - Fork 8
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
riotctrl.shell: flush pexpect before prompt #21
Conversation
I also made some sample tests with the release tests. They also seem to still work. |
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK, please squash
c1b9e4e
to
14e2947
Compare
Squashed. |
14e2947
to
9149ce4
Compare
Squashed and fixed issue pointed out by the CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RE-ack
Thanks! |
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_test
in RIOT on the boards we found the issue for; namelynucleo-f411re
,b-l072z-lrwan1
, andb-l475e-iot01a
: