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

Merge pull request #20967 from maribu/tests/no-sync-control

tests: no default interactive sync for native
This commit is contained in:
Marian Buschsieweke 2024-11-14 08:06:48 +00:00 committed by GitHub
commit 51d1ebe64a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 30 additions and 12 deletions

View File

@ -1,17 +1,20 @@
APPLICATION ?= tests_$(notdir $(patsubst %/,%,$(CURDIR)))
ifneq (,$(wildcard $(CURDIR)/tests*/.))
# add interactive test configuration when testing Kconfig
DEFAULT_MODULE += test_utils_interactive_sync
# add stack metric printing configuration when testing Kconfig
DEFAULT_MODULE += test_utils_print_stack_usage
endif
# terminate native when the test is complete
CFLAGS += -DNATIVE_AUTO_EXIT=1
BOARD ?= native
RIOTBASE ?= $(CURDIR)/../..
QUIET ?= 1
# DEVELHELP enabled by default for all tests, set 0 to disable
DEVELHELP ?= 1
ifneq (,$(wildcard $(CURDIR)/tests*/.))
# add interactive test configuration when automated testing is available,
# except for `native` and `native64` where we control when the RIOT app is
# started
ifeq (,$(filter native native64,$(BOARD)))
DEFAULT_MODULE += test_utils_interactive_sync
endif
# print stack usage by default when automated testing is available
DEFAULT_MODULE += test_utils_print_stack_usage
endif
# terminate native when the test is complete
CFLAGS += -DNATIVE_AUTO_EXIT=1

View File

@ -127,7 +127,8 @@ As some board can't be reset without a manual trigger tests should be implemente
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.
disabled for the test. This is enabled by default, except for `native` and
`native64`.
- 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.

View File

@ -802,6 +802,10 @@ int main(void)
{
_tests_init();
/* work around issue in _check_congure_snd_msg(): the assert for
* time > o will not work when the time is 0 */
while (xtimer_now_usec() / US_PER_MS == 0) { }
TESTS_START();
TESTS_RUN(tests_gnrc_sixlowpan_frag_sfr_congure_integration());
TESTS_END();

View File

@ -4,4 +4,9 @@ FEATURES_REQUIRED = periph_timer_periodic
USEMODULE += fmt
# Interactive sync improves accuracy of timestamping the output
# and is also needed on native for the automatic test to
# pass. Hence, we just depend on it here.
USEMODULE += test_utils_interactive_sync
include $(RIOTBASE)/Makefile.include

View File

@ -2,6 +2,11 @@ include ../Makefile.sys_common
USEMODULE += posix_sleep
# Interactive sync improves accuracy of timestamping the output
# and is also needed on native for the automatic test to
# pass. Hence, we just depend on it here.
USEMODULE += test_utils_interactive_sync
# microbit qemu failing currently
TEST_ON_CI_BLACKLIST += microbit