1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

12 Commits

Author SHA1 Message Date
Marian Buschsieweke
cedfb63a88
tests: no default interactive sync for native
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
2024-11-08 13:24:32 +01:00
10fb6f10ab
tests/README.md: Add directory overview 2023-05-13 17:46:56 +02:00
krzysztof-cabaj
f13794fdcd tests/doc: reorganization and improvements to tests doc 2022-08-04 03:16:27 -04:00
Gaëtan Harter
54c4536945
tests: add 'test-as-root' and 'test-with-config' targets
These targets cannot be used in an automated testing workflow without
complex configuration or extend rights.

- Add new 'test-as-root' target for tests that require to be root or
start an external daemon as root
- Add new 'test-with-config' target for tests that require a specific
configuration to succeed (module configuration or hardware
configuration)
2021-01-25 21:10:06 +01:00
Francisco Molina
a31003a23c
tests: add interactive_sync adapted to shell 2020-03-17 17:23:27 +01:00
981cdeaa47 tests/README.md: add paragraph explaining expect() 2020-02-24 11:45:33 +01:00
1271274964
Merge pull request #12824 from fjmolinas/pr_pexpect_doc
tests/README: add automated tests guidelines
2019-11-27 18:52:09 +01:00
Francisco Molina
264b323c66 tests/README: add automated tests guidelines 2019-11-27 15:26:08 +01:00
Francisco Molina
34c6063520 tests/README.md: add automated test guideline 2019-11-27 15:07:43 +01:00
Gaëtan Harter
66300b2f72
tests/README.md: add documentation about uart interaction
Add some documentation about tests using `cleanterm` and what guarantees
it gives.
2019-10-01 14:13:02 +02:00
Gaëtan Harter
ec4d83727a
Makefile.include: add a 'test/available' target
This allows querying the build system if there are test available.

Before, one should rely on 'info-debug-variable-TESTS' to print the list
of test files. But was not reliable as sometime the build system printed
messages anyway.

    BOARD=esp32-wroom-32 make --silent --no-print-directory \
        -C examples/hello-world/ info-debug-variable-TESTS
    ESP32_SDK_DIR should be defined as /path/to/esp-idf directory
    ESP32_SDK_DIR is set by default to /opt/esp/esp-idf
    # empty line here

Now the return code can be trusted.
2019-03-25 16:17:26 +01:00
MrKevinWeiss
7bd633a8b2 tests/doc: Add intial how to test doc
This commit adds a README.md to the testing folder.
It explains the basic about how to run a test with testrunner.
It adds a reference so it will be displayed on the doxygen docs.
There currently is not obvious documentation for running tests.
2019-03-24 15:15:35 +01:00