1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/tests
2023-05-10 12:02:59 +02:00
..
backtrace tests/backtrace: make test regexp a bit more loose 2021-11-10 20:38:25 +01:00
bench_msg_pingpong examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
bench_mutex_pingpong examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
bench_periph_gpio_ll examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
bench_runtime_coreapis tests: Cleanup access to internal variables 2020-08-24 09:08:01 +02:00
bench_sched_nop tests: use coreclk() instead of CLOCK_CORECLOCK 2021-12-15 13:14:19 +01:00
bench_sizeof_coretypes examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
bench_sys_atomic_utils examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
bench_sys_base64 examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
bench_thread_flags_pingpong examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
bench_thread_yield_pingpong examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
bench_timers boards: introduce atmega328p-xplained-mini 2021-03-27 14:10:19 -03:00
bench_xtimer examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
bench_xtimer_load tests/*: CI blacklist microbit where it fails 2022-04-01 13:42:01 +02:00
bench_ztimer examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
bitarithm_timings tests/bitarithm_timings: shorten timeout from 5s to 200ms 2022-11-11 23:49:03 +01:00
blob
board_microbit tests/board_calliope-mini: merge into tests/microbit, add Kconfig 2021-11-26 10:39:40 +01:00
build_system_cflags_spaces treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
build_system_utils makefiles/utils/strings.mk: add version_greater_or_equal 2021-01-18 14:37:23 +01:00
buttons
cond_order boards/stm32g031-disco,examples,tests: Added STM32G031-DISCO board 2021-10-13 12:14:45 -04:00
core tests: move sys related applications to tests/sys/ subdirectory 2023-05-10 12:02:58 +02:00
cortexm_common_ldscript boards/{bluepill*,blackpill*}: rename and improve doc 2023-01-02 16:23:10 +01:00
cpp_exclude tests/{cpp_ext, cpp_exclude}: cleanup HAS_* 2022-05-11 21:24:50 +02:00
cpp_ext tests/{cpp_ext, cpp_exclude}: cleanup HAS_* 2022-05-11 21:24:50 +02:00
cpu_avr8_xmega_drivers tests/cpu_avr8_xmega_driver: fix BOARD name 2022-03-04 10:36:45 +01:00
cpu_cortexm_address_check examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
cpu_efm32_drivers tests/cpu_efm32_drivers: require efm32_coretemp feature 2020-11-18 17:27:17 +01:00
cpu_efm32_features tests/cpu_efm32_features: Add missing include stdio.h 2021-03-24 12:07:20 +01:00
dbgpin tests: add building BOARD defaults 2022-02-28 21:59:57 +01:00
deferred_yield_higher cpu/mips: Remove all mips 2022-09-27 13:42:37 +02:00
disp_dev tests: adapt to new disp_dev area coordinates 2022-04-13 12:52:03 +02:00
drivers treewide: replace occurrences of tests/driver_ with new path 2023-05-06 15:38:21 +02:00
embunit
emcute examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
entropy_source sys/entropy_source: add new module for entropy sources 2020-12-01 15:51:40 +01:00
external_board_dirs tests/driver_ws281x: add ESP32x CI boards to test ws281x_esp32_sw 2023-03-29 08:57:36 +02:00
external_board_native treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
external_module_dirs tests/external_modules: use AUTO_INIT_PRIORITY_AFTER 2022-10-17 10:38:14 +02:00
external_pkg_dirs buildsystem: implement EXTERNAL_PKG_DIRS feature 2022-02-01 18:06:54 +00:00
fault_handler tests/fault_handler: Suppress cppcheck errors 2021-11-25 13:08:51 +01:00
float
gcoap_dns tests: update Makefile.ci where tinyDTLS is used 2023-04-26 10:31:35 +02:00
gcoap_fileserver tests/gcoap_fileserver: set CONFIG_NATIVE_ISOLATE_FS 2023-04-26 00:53:15 +02:00
gnrc_dhcpv6_client examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_dhcpv6_client_6lbr examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_dhcpv6_client_stateless examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_dhcpv6_relay examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_gomach examples,tests: replace deprecated module names by new names 2022-09-16 13:15:46 +02:00
gnrc_ipv6_ext examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_ipv6_ext_frag examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_ipv6_ext_opt examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_ipv6_fwd_w_sub Merge pull request #18635 from benpicco/tests/gnrc_ipv6_nib_iface_up 2022-09-25 14:19:40 +02:00
gnrc_ipv6_nib tests/gnrc_ipv6_nib: up interface on initial initialization 2022-10-12 09:37:26 +02:00
gnrc_ipv6_nib_6ln tests: call gnrc_ipv6_nib_iface_up() after gnrc_ipv6_nib_init_iface() 2022-09-23 17:17:42 +02:00
gnrc_ipv6_nib_dns examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_lorawan examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_lorawan_11 examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_lwmac examples,tests: replace deprecated module names by new names 2022-09-16 13:15:46 +02:00
gnrc_mac_timeout boards/stm32g031-disco,examples,tests: Added STM32G031-DISCO board 2021-10-13 12:14:45 -04:00
gnrc_ndp boards/stm32g031-disco,examples,tests: Added STM32G031-DISCO board 2021-10-13 12:14:45 -04:00
gnrc_netif examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_netif_ieee802154 tests/gnrc_netif_ieee802154: disable test_utils_print_stack_usage 2022-03-29 21:49:35 +02:00
gnrc_netif_ipv6_wait_for_global_address tests/*: CI blacklist microbit where it fails 2022-04-01 13:42:01 +02:00
gnrc_rpl examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_rpl_p2p boards/stm32g031-disco,examples,tests: Added STM32G031-DISCO board 2021-10-13 12:14:45 -04:00
gnrc_rpl_srh gnrc_rpl_srh: check header fields consistency before substraction 2023-04-21 11:40:47 +02:00
gnrc_sixlowpan codespell: fix remaining issues 2022-09-16 14:00:35 +02:00
gnrc_sixlowpan_frag boards: introduce atmega328p-xplained-mini 2021-03-27 14:10:19 -03:00
gnrc_sixlowpan_frag_minfwd examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_sixlowpan_frag_sfr boards/{bluepill*,blackpill*}: rename and improve doc 2023-01-02 16:23:10 +01:00
gnrc_sixlowpan_frag_sfr_congure examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_sixlowpan_frag_sfr_congure_impl tests: add congure_abe to SFR CongURE test 2023-03-01 20:23:32 +01:00
gnrc_sixlowpan_iphc_w_vrb boards/stm32g031-disco,examples,tests: Added STM32G031-DISCO board 2021-10-13 12:14:45 -04:00
gnrc_sock_async_event sys/net/sock: Set SOCK_HAS_IPV6 in one place 2021-10-11 21:37:39 +02:00
gnrc_sock_dns examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_sock_dodtls tests: update Makefile.ci where tinyDTLS is used 2023-04-26 10:31:35 +02:00
gnrc_sock_ip test/gnrc_sock_ip: depends on xtimer 2021-12-14 22:53:01 +01:00
gnrc_sock_neterr examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_sock_tcp tests: Update Makefile.ci 2023-01-13 13:08:39 +01:00
gnrc_sock_udp examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
gnrc_tcp treewide: s/gnrc_pktbuf_cmd/shell_cmd_gnrc_pktbuf/ 2022-09-24 14:50:43 +02:00
gnrc_tx_sync boards/{bluepill*,blackpill*}: rename and improve doc 2023-01-02 16:23:10 +01:00
gnrc_udp examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
heap_cmd examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
ieee802154_hal examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
ieee802154_security tests/drivers: move all driver tests into own folder 2023-05-04 12:45:07 +02:00
ieee802154_submac tests/ieee802154_submac: add support for MRF24j40 radios 2023-01-19 15:34:16 +01:00
irq examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
irq_cpp core/irq: Add C++ wrapper 2023-01-13 13:58:07 +01:00
irq_disable_restore tests/irq_disable_restore: test irq_is_enabled() 2021-08-25 08:01:05 +02:00
isr_yield_higher examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
kconfig buildsystem: Kconfig test for EXTERNAL_PKG_DIRS feature 2022-02-01 18:12:07 +00:00
kconfig_features
l2util examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
leds tests/leds: add test where LEDs are mapped to buttons 2022-03-29 09:05:46 +02:00
lua_loader examples: tests: lua: add Kconfig configuration 2022-04-27 11:12:27 +02:00
lwip boards/{bluepill*,blackpill*}: rename and improve doc 2023-01-02 16:23:10 +01:00
lwip_sock_ip Merge pull request #16974 from yarrick/lwip_netif 2022-04-26 23:49:49 +02:00
lwip_sock_tcp boards/{bluepill*,blackpill*}: rename and improve doc 2023-01-02 16:23:10 +01:00
lwip_sock_udp Merge pull request #16974 from yarrick/lwip_netif 2022-04-26 23:49:49 +02:00
mcuboot pycrypto: use pycryptodome instead 2021-11-02 13:28:42 +01:00
minimal tests/minimal: disable test_utils_print_stack_usage 2022-03-29 21:49:35 +02:00
mpu_noexec_ram tests: add building BOARD defaults 2022-02-28 21:59:57 +01:00
mpu_stack_guard tests/mpu_stack_guard: Fix compilation on modern GCC (>= 12.x) 2022-11-10 12:49:18 +01:00
msg_avail core/msg: make msg_avail() return 0 on no queue 2021-11-29 12:04:16 +01:00
msg_queue_capacity tests: add tests for msg_queue_capacity() 2022-03-03 16:50:34 +01:00
msg_queue_print core/msg: make msg_avail() return 0 on no queue 2021-11-29 12:04:16 +01:00
msg_send_receive examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
msg_try_receive examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
mtd_at24cxxx tests: add building BOARD defaults 2022-02-28 21:59:57 +01:00
mtd_at25xxx
mtd_flashpage tests/mtd_flashpage: test unaligned read/write 2023-02-16 15:50:52 +01:00
mtd_mapper core/lib: Add macros/utils.h header 2023-01-07 09:47:44 +01:00
mtd_raw tests/mtd_raw: make use of mtd_default.h 2023-03-07 00:53:05 +01:00
mutex_cancel tests: Add test for core_mutex/mutex_cancel 2020-12-08 14:50:49 +01:00
mutex_order boards/stm32g031-disco,examples,tests: Added STM32G031-DISCO board 2021-10-13 12:14:45 -04:00
mutex_unlock_and_sleep tests: skip nucleo-l011k4 where it doesn't fit 2020-10-15 18:52:51 +02:00
nanocoap_cli Merge #19346 #19512 #19513 #19514 2023-04-26 15:40:08 +00:00
netdev_common tests/drivers: move all driver tests into own folder 2023-05-04 12:45:07 +02:00
netdev_test netdev_test: avoid explicit cast to netdev 2021-07-09 11:35:19 +02:00
netstats_l2 examples,tests: replace deprecated module names by new names 2022-09-16 13:15:46 +02:00
netstats_neighbor tests/drivers: move all driver tests into own folder 2023-05-04 12:45:07 +02:00
netutils Merge pull request #17905 from benpicco/GNRC_NETIF_STACKSIZE_DEFAULT 2022-10-13 17:10:43 +02:00
nimble_autoconn_ccnl examples,tests: replace deprecated module names by new names 2022-09-16 13:15:46 +02:00
nimble_autoconn_gnrc examples,tests: replace deprecated module names by new names 2022-09-16 13:15:46 +02:00
nimble_autoconn_gnrc_ext examples,tests: replace deprecated module names by new names 2022-09-16 13:15:46 +02:00
nimble_esp_wifi_coexist cpu/esp_common: use generic WIFI_SSID/WIFI_PASS defines 2023-02-17 15:32:03 +01:00
nimble_ext_adv examples,tests: replace deprecated module names by new names 2022-09-16 13:15:46 +02:00
nimble_l2cap examples,tests: replace deprecated module names by new names 2022-09-16 13:15:46 +02:00
nimble_l2cap_server tests/nimble_l2cap: adapt buffer sizes 2021-06-10 10:02:10 +02:00
nimble_netif_ext examples,tests: replace deprecated module names by new names 2022-09-16 13:15:46 +02:00
nimble_rpble_gnrc examples,tests: replace deprecated module names by new names 2022-09-16 13:15:46 +02:00
nimble_rpble_gnrc_ext examples,tests: replace deprecated module names by new names 2022-09-16 13:15:46 +02:00
nimble_statconn_gnrc examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
nimble_statconn_gnrc_ext examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
periph treewide: replace occurrences of tests/periph_ with new path 2023-05-06 15:33:03 +02:00
pkg tests/pkg_lvgl_touch: Replace LittlevGL to LVGL 2023-05-08 15:00:54 +02:00
riotboot examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
riotboot_flashwrite Merge #19485 2023-04-22 06:21:38 +00:00
riotboot_hdr
rmutex tests/rmutex: Drop output dump from README.md 2023-03-15 12:58:09 +01:00
rmutex_cpp boards/stm32g031-disco,examples,tests: Added STM32G031-DISCO board 2021-10-13 12:14:45 -04:00
rust_libs tests: move sys related applications to tests/sys/ subdirectory 2023-05-10 12:02:58 +02:00
rust_minimal Rust: Update riot-wrappers 2023-04-25 09:20:58 +02:00
saul examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
saul_drivers tests/saul_drivers: add vl6180x driver 2023-02-02 02:04:09 +01:00
sched_change_priority examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
sched_testing examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
slip examples,tests: replace deprecated module names by new names 2022-09-16 13:15:46 +02:00
sntp examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
sock_udp_aux examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
socket_zep tests/socket_zep: set event_callback before init 2022-10-14 16:07:19 +02:00
ssp tests/ssp: silence array-bounds warning if present 2021-02-10 09:17:34 +01:00
stdin
stm32_bootloader examples,tests: Drop redundant dependency 2023-04-19 16:58:10 +02:00
sys tests/sys: fix style warnings reported by coccinelle 2023-05-10 12:02:59 +02:00
test_tools sys/shell_commands: convert to SHELL_COMMAND() 2022-06-07 09:25:04 +02:00
thread_basic tests: skip nucleo-l011k4 where it doesn't fit 2020-10-15 18:52:51 +02:00
thread_cooperation boards/stm32g031-disco,examples,tests: Added STM32G031-DISCO board 2021-10-13 12:14:45 -04:00
thread_exit examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
thread_flags examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
thread_flags_xtimer tests: Cleanup access to internal variables 2020-08-24 09:08:01 +02:00
thread_float tests/thread_float: do not overload slow MCUs with IRQs 2023-01-03 22:17:51 +01:00
thread_flood all: adapt to moved sched defines 2020-11-23 16:56:34 +01:00
thread_msg boards: introduce atmega328p-xplained-mini 2021-03-27 14:10:19 -03:00
thread_msg_block_race boards: introduce atmega328p-xplained-mini 2021-03-27 14:10:19 -03:00
thread_msg_block_w_queue examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
thread_msg_block_wo_queue examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
thread_msg_bus tests/thread_msg_bus: enhance test with non-bus message 2022-10-18 13:25:09 +02:00
thread_msg_seq treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
thread_priority_inversion tests/thread_priority_inversion: improve output for debugging 2022-09-12 21:42:29 +02:00
thread_race examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
thread_stack_alignment examples,tests: Update Makefile.cis 2023-02-27 12:31:04 +01:00
thread_zombie boards: introduce atmega328p-xplained-mini 2021-03-27 14:10:19 -03:00
touch_dev tests/touch_dev: add Kconfig config 2022-01-22 15:14:18 +01:00
turo tests/turo: Remove OUTPUT_FORMAT and use default 2021-11-16 08:37:45 +01:00
turo_txt tests/*: CI blacklist microbit where it fails 2022-04-01 13:42:01 +02:00
unittests Merge #19368 #19529 #19531 2023-05-02 18:08:42 +00:00
warn_conflict
xfa tests/xfa: fix parallel build with BUILD_IN_DOCKER 2021-02-23 10:39:39 +01:00
.gitignore examples,tests: ignore core dumps via .gitignore 2022-08-31 15:05:14 +02:00
Makefile.boards.netif tests/Makefile.boards.netif: add lora-e5-dev 2023-04-13 10:55:24 +02:00
Makefile.tests_common tests/drivers: move all driver tests into own folder 2023-05-04 12:45:07 +02:00
README.md tests/doc: reorganization and improvements to tests doc 2022-08-04 03:16:27 -04:00
riot_logo.h tests: use common riot_logo.h 2022-04-13 08:00:48 +02:00
test_print_stack_usage.config sys/test_utils/print_stack_usage: add Kconfig support 2022-03-29 21:49:35 +02:00
test_utils.config sys/test_utils/print_stack_usage: add Kconfig support 2022-03-29 21:49:35 +02: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 serial (typically 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.

Running single test

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

Running all test for particular board

If you would like execute all tests for given board, you could use dedicated script compile_and_test_for_board.py

Go to main RIOT directory and execute command:

./dist/tools/compile_and_test_for_board/compile_and_test_for_board.py . <board_of_your_choice> --with-test-only --jobs=4

More details concerning other available parameters provided by this tool can be found in README.md file and directly in compile_and_test_for_board.py script.

Running tests that require a preliminary manual configuration

Some tests need active monitoring or manual setup steps but still have some automated scripts. The test automation scripts are defined in the <test_application>/tests-with-config/ folder. For running them, follow the setup or analysis documentation and use the test-with-config target.

Running tests that require root privileges

Some tests require root privileges to launch their automated script. In this case, the test automation scripts are defined in the <test_application>/tests-as-root/ folder. For running them, follow the setup or analysis documentation and use the test-as-root target.

Cleaning intermediate files

After test execution intermediate files are not automatically deleted. Execution of multiple tests, especially all for particular board could generate many files. For example, after execution of all test for stm32f469i-disco board (more than 230 tests) around 7.5 GB of intermediate files are created.

There are few methods for cleaning intermediate files.

If you would like to clean intermediate file only for particular board you should go to main RIOT directory and execute one from these commands:

./dist/tools/compile_and_test_for_board/compile_and_test_for_board.py . <board_of_your_choice> --compile-targets clean

or

make BOARD=<board_of_your_choice> clean

If you would like to clean intermediate files for all boards go to main RIOT directory and use this command.

@warning This command cleans all local files, for example, pkg downloads and locally generared docs.

make distclean

Implementing automated tests

The goal is to be able to run all tests in a sequential way for as many targets as possible.

As some board can't be reset without a manual trigger tests should be implemented with some kind of synchronization. This can be done in two ways:

  • use test_utils_interactive_sync when uart input/output does not need to be disabled for the test. This is enabled by default.
  • set up the test in a loop so the test script will be able so sync with some kind of start condition in the test.

The module for the first option is test_utils_interactive_sync and is set as a default module in Makefile.tests_common. It can be disabled by setting in the application makefile DISABLE_MODULE += test_utils_interactive_sync. The python test script will adapt to it automatically.

When using the shell module, test_utils_interactive_sync will use the shell itself to synchronize, and will not use test_utils_interactive_sync(); function to synchronize. Some times you will want to synchronize before the start of the script and use test_utils_interactive_sync(); function (e.g.: tests/ps_schedstatistics). For these cases you can disable test_utils_interactive_sync_shell module in the application Makefile: DISABLE_MODULE += test_utils_interactive_sync_shell.

Automated Tests Guidelines

When using pexpect $ is useless for matching the end of a line, instead use \r\n(pexpect end-of-line).

Beware of + and * at the end of patterns. These patterns will always get a minimal match (non-greedy).(pexpect end-of-patterns) This can be an issue when matching groups and using the matched groups to verify some kind of behavior since * could return an empty match and + only a subset.

This is especially prevalent since printf() is buffered so the output might not arrive in a single read to pexpect.

To avoid this make sure to match a non-ambiguous character at the end of the pattern like \r\n, \s, \), etc..

don't:

    child.expect(r'some string: (\d+)')

do:

    child.expect(r'some string: (\d+)\r\n')
    child.expect(r'some string: (\d+)\s')
    child.expect(r'some string: (\d+) ,')

Use expect() instead of assert()

In order to make a test application functional in all cases, use expect() instead of assert(). The former works like the latter, but will still be compiled in if NDEBUG is defined. This is useful to keep a test application working even when compiling with -DNDEBUG, allowing for the code-under-test to be compiled with that flag. Otherwise, the application would force compiling all tested code with assertions enabled. expect() is defined in the header test_utils/expect.h.

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