-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Makefile.include: add cleanterm target and use it for tests #12107
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
Conversation
In the current implementation, I directly re-used Also, the introduction could be split from the usage in |
# TERMFLAGS must be exported for `jlink.sh term_rtt`. | ||
cleanterm: export PYTERMFLAGS += --noprefix | ||
cleanterm: $(filter flash, $(MAKECMDGOALS)) $(TERMDEPS) | ||
$(call check_cmd,$(TERMPROG),Terminal program) |
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.
should we keep on repeating bad patterns? I'm referring to checking the command.
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.
I still see it as a different task to remove the bad pattern that I did not want to mix with the other change here.
Overall, I think this is a good transition towards rawterm. The next step would be to remove all kinds of buffering and we would have arrived at rawterm. |
f8fbe9e
to
111d29b
Compare
Rebased as #12120 was merged. |
The compilation failures are
|
Works as advertised:
|
I personally like the change, I think the implementation should indeed be split from its usage in |
Also if the usage in test is included it should be documented in |
For me the goal of this PR is usage in All tests in CI already use
I will add something there :) |
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.
I think changes make sense and I'm happy with the current status. I would like someone else to take a look and also ACK this, @aabadie could you take a look?
I'll run all tests on a boar using this PR just be sure before ACK.
Looks good. Just found a minor typo. Please squash @cladmi ! |
No changes in tests results.
There is a new test failure for |
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.
f266b69
to
af260ae
Compare
I will rebase on the last master too, to simplify re-run the other tests like the |
Use PYTERMFLAGS for configuring the terminal.
It is similar to 'term' but with removing possible additional behaviors from pyterm. It currently removes the logging prefix.
Use a clean terminal without added decoration on the output for testing.
Get the output of a one line command without other garbage messages.
Disable repeating the command on empty line to allow sending empty lines.
Test receiving an empty line. It was before not possible with `pyterm` but is fixed by previous commit.
Add some documentation about tests using `cleanterm` and what guarantees it gives.
af260ae
to
66300b2
Compare
I would say, enable running all tests without caching, as murdock will not re-run tests on this change. |
The |
Murdock says OK after ¾h of labor |
Tests are also working locally on |
Thank you for the review. Now we can correctly get the return value of a shell command !!!! 🎉 |
Contribution description
It is similar to 'term' but with removing possible additional behaviors
from pyterm.
It currently removes the logging decorators and allow sending empty lines.
Use a clean terminal without added decoration on the output for testing.
Review procedure
pyterm
logging and special behavior are required features that cannot be removed as said in #12094This introduces a new target that handles it.
This is completely similar to
rawterm
from #11099 except that it only works around thepyterm
issues and will do nothing against line buffering.Testing procedure
Run
BOARD=your_board make -C tests/test_tools/ flash test
with different RIOT_TERMINAL, currently supported (not on all boards)pyterm
,socat
,picocom
. If possible one withterm_rtt
. But as it is internally usingpyterm
it will benefit from the changes automatically.RIOT_TERMINAL=pyterm samr21-xpro
RIOT_TERMINAL=picocom samr21-xpro
RIOT_TERMINAL=socat samr21-xpro
native
On IoT-LAB it works too
The configuration is handled by
jlink.sh term_rtt
:Tested without a board, we can see the logging format difference from
pyterm
.BOARD=hamilton make -C examples/hello-world/ term
BOARD=hamilton make -C examples/hello-world/ cleanterm
term behaves as before
BOARD=samr21-xpro RIOT_CI_BUILD=1 make --no-print-directory -C tests/test_tools/ term
Issues/PRs references
Replacement of #12094
This is completely similar to
rawterm
from #11099 except that it only works around thepyterm
issues and will do nothing against line buffering.