1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-29 16:31:18 +01:00
Francisco Molina 416c048737 tests: add test_utils_interactive_sync when possible
- 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
2019-11-27 15:07:42 +01:00
..
2019-10-10 10:47:38 +02:00
2019-11-23 22:39:07 +01:00
2019-10-10 10:47:38 +02:00
2019-11-23 22:39:07 +01:00
2019-11-23 22:39:07 +01:00
2019-11-23 22:39:07 +01:00
2019-11-23 22:39:07 +01:00
2019-11-23 22:39:07 +01:00
2019-11-23 22:39:36 +01:00
2019-11-23 22:39:36 +01:00
2019-11-23 15:06:54 +01:00
2019-11-23 22:39:07 +01:00
2019-11-23 22:39:07 +01:00
2019-11-23 22:39:07 +01:00
2019-11-23 22:39:36 +01:00
2019-11-23 22:39:37 +01:00
2019-11-23 22:39:37 +01:00
2019-11-23 22:39:07 +01:00
2018-12-04 00:01:42 +01:00
2019-11-23 22:39:07 +01:00
2019-11-23 22:39:07 +01:00
2019-11-23 22:39:07 +01:00
2019-11-23 22:39:07 +01:00

Running and creating tests

There are a number of tests included in RIOT. They are located in the tests folder. These tests allow basic functionality to be verified as well as provide an example of usage.

Running automated tests

Some tests can be performed automatically. The test automation scripts are defined in the <test_application>/tests/ folder. They are written in python and interact through the uart with the test application code running on a board to do the validation. It is recommended to flash the board with the test just before running it because some platforms cannot be reset while testing.

From the test application directory run:

BOARD=<board_of_your_choice> make flash test

An automated way of knowing if a test is available is to execute the 'test/available' target from the test application directory. It executes without error if tests run by 'make test' are present.

make test/available

Interaction through the uart

Tests implemented with testrunner use the cleanterm target that provides an interaction without adding extra text output or input handling. It can currently be expected to have unmodified line based interaction with the board.

The expected behavior is verified with the test in tests/test_tools.

Tests cannot rely on having on all boards and terminal programs:

  • unbuffered input
  • allowing sending special characters like ctrl+c/ctrl+d