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

[TRACKING] The RIOT shell as a testing interface #10994

Open
3 of 9 tasks
jcarrano opened this issue Feb 11, 2019 · 2 comments
Open
3 of 9 tasks

[TRACKING] The RIOT shell as a testing interface #10994

jcarrano opened this issue Feb 11, 2019 · 2 comments
Labels
Area: build system Area: Build system Area: tests Area: tests and testing framework Type: tracking The issue tracks and organizes the sub-tasks of a larger effort

Comments

@jcarrano
Copy link
Contributor

jcarrano commented Feb 11, 2019

Description

The RIOT testing system uses the shell quite extensively. While this is in itself a good idea, the current embodiment has a few issues:

  • A few bug in the shell.
  • Lack of a programmatic way of interacting with it (this was pointed out before in Programmatic shell access #4967,) It would be desirable to have a library for interacting with the shell that can also be used from the testing scripts
  • The build system / OS integration, via tools like pyterm which modify the input and output.
  • Parsing is done by each test scripts via pexpect. Without strict restrictions on what to expect (and in particular which output to reject) a common failure mode of tests is to time out waiting for text that is never going to show up.

The plan is to:

  • Fix the bugs.
  • Remove the requirement for pyterm, in favour of a dumber terminal (if someone needs command history, there is rlwrap for that.)
  • Write a module that abstracts shell interaction.
  • Define and implement an easily parseable format for command output.
  • Integrate all of that into the testing infrastructure.

Breakdown

@kaspar030
Copy link
Contributor

* Remove the requirement for pyterm, in favour of a dumber terminal (if someone needs command history, there is [rlwrap](https://linux.die.net/man/1/rlwrap) for that.)

This has already been done. pyterm was just too damn slow to startup on the RasPis used by the CI. Just provide e.g., "RIOT_TERMINAL=picocom". Currently needs support in makefiles/tools/serial.inc.mk.

@jcarrano
Copy link
Contributor Author

pyterm was just too damn slow to startup on the RasPis used by the CI

Then why have it on the CI only? If it is possible to remove it from the CI it should be possible to remove it from the official distribution.

In my view even picocom is unnecessary if the test script could directly read and write to the TTY. Once the tty device is configured, the terminal program is just copying bytes from /dev/ttyX to a pipe and back.

@miri64 miri64 added Area: build system Area: Build system Area: tests Area: tests and testing framework Type: tracking The issue tracks and organizes the sub-tasks of a larger effort labels Jul 30, 2019
@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 22, 2021
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: build system Area: Build system Area: tests Area: tests and testing framework Type: tracking The issue tracks and organizes the sub-tasks of a larger effort
Projects
None yet
Development

No branches or pull requests

4 participants