[riot-notifications] [RIOT-OS/RIOT] [TRACKING] buildsystem: introduce "make rawterm" (#11099)

Juan I Carrano notifications at github.com
Mon Mar 4 16:33:08 CET 2019

### Contribution description

_This is a tracking issue._ It will be split.

Currently, the tests invoke "make term" for interacting with the board. "make term" starts the "pyterm" program which may be nice for a human user but is horrible for a machine: it does line buffering, local echo, inserts lots of unnecessary data in the output stream, has "magical" behaviors (like hitting enter on an empty line repeats the last command, wtf?!?!). Normally, when testing, you want to test the actual thing and  try to take out of the equation any external factors. In any case, it's pointless to use any readline-based terminal program when the output is not a pty/tty but a pipe.

Add to this that the tests are done using "dumb matching" with pexpect and the result is that you try to match, say, an integer, and you could be matching your own input, or pyterm's "logging" info.

We are introducing "make rawterm" which gives a "raw" terminal, meaning one that is transparent- whatever you give to the terminal input goes to the serial device, whatever arrives to the serial device- and nothing- else goes to the terminal output.

On the native side, I tried to fix the conceptual error of having TERMPROG be the riot executable and TERMFLAGS be the flags to RIOT.

Other facts to take into account:

- The CI (murdock) is using picocom. It would be highly desirable that the same tool is used in the developer's machine and in the CI.
- @MrKevinWeiss's RIOT PAL currently has to REMOVE the garbage inserted by pyterm.

### Testing procedure

I will provide some tests stolen from #11094 to show the issues with the non-raw terminals and how they interfere with testing.

- [ ] Make CI tests use "make rawterm"

### Issues/PRs references

Fixes: #10952 
Part of: #10994 
Related to: #11094
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * makefiles: introduce rawterm recipe and variables.
  * makefiles/serial: Add raw terminal programs
  * makefiles/serial: add rlwrap support.
  * boards/lobaro-lorabox: force RIOT_TERMINAL=pyterm
  * boards/msba2: force RIOT_TERMINAL=pyterm
  * boards/native: Use socat as a termprog.
  * examples,tests: replace TERMFLAGS by NATIVE_FLAGS for native.

-- File Changes --

    M Makefile.include (4)
    M boards/common/msba2/Makefile.include (2)
    M boards/lobaro-lorabox/Makefile.include (2)
    M boards/native/Makefile.include (35)
    M boards/ruuvitag/Makefile.include (3)
    M boards/thingy52/Makefile.include (3)
    M examples/gnrc_border_router/Makefile (2)
    M makefiles/info.inc.mk (2)
    M makefiles/tools/jlink.inc.mk (5)
    M makefiles/tools/serial.inc.mk (26)
    M makefiles/vars.inc.mk (22)
    M tests/gnrc_ipv6_ext/Makefile (2)
    M tests/gnrc_rpl_srh/Makefile (2)
    M tests/socket_zep/Makefile (2)
    M tests/socket_zep/tests/01-run.py (2)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190304/030d78b5/attachment-0001.html>

More information about the notifications mailing list