The aim is to allow faster test cycles on native for unit test style
apps (that don't need interaction) by bypassing the python test
framework using e.g.:
make RIOT_TERMINAL=native all term
This would work already before, but now is more convenient as no
manual press of the `s` key is needed to start the test.
For non-native boards we need the sync, as otherwise the board may
finish booting before the python test automation framework can capture
output. For `native` and `native64`, we actually control when the RIOT
app is started and do not need to sync.
On a typical machine this can reduce the test cycle by more than 4
seconds.
With this change:
$ time sh -c 'make BOARD=native -C tests/unittests tests-nanocoap -j && make BOARD=native RIOT_TERMINAL=native -C tests/unittests term'
[...]
main(): This is RIOT! (Version: 2024.10-devel-394-gd65dec-tests/no-sync-control)
...................................
OK (35 tests)
[...]
make: Leaving directory '/home/marian.buschsieweke@ml-pa.loc/Repos/software/RIOT/master/tests/unittests'
sh -c 0.30s user 0.24s system 113% cpu 0.476 total
Before t his change:
$ time sh -c 'make BOARD=native -C tests/unittests tests-nanocoap -j && make BOARD=native -C tests/unittests test'
[...]
main(): This is RIOT! (Version: 2024.10-devel-394-gd65dec-tests/no-sync-control)
Help: Press s to start test, r to print it is ready
READY
s
START
...................................
OK (35 tests)
[...]
make: Leaving directory '/home/marian.buschsieweke@ml-pa.loc/Repos/software/RIOT/master/tests/unittests'
sh -c 0.50s user 0.37s system 17% cpu 4.863 total
- Define test_utils_interactive_sync as DEFAULT_MODULE in Makefile.tests_common
- For tests disabling autoinit, add test_utils_interactive_sync to main
- Add DISABLE_MODULE += test_utils_interactive_sync for tests requiring
sudo, `tests/shell`, `tests/minimal` and `tests/stdin`
- Add shell_commands to tests/periph_wdt and tests/struct_tm_utility to
pull `r` and `s` commands
- Remove includes and usage in `tests/main.c` for tests that where
already using test_utils_interactive_sync