From 050fc872b3bce11db7dfcb2584b0c7c1a7adbf1a Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Tue, 1 Sep 2020 22:25:37 +0200 Subject: [PATCH] tests/periph_rtt_min: adapt test to slow rtt pyterm only echoes after a \n is received, so use socat instead so '.' are printed as they are generated. This will make the test timeout for slow rtts like kinetis. For these slow paltforms also reduce the sample size. --- tests/periph_rtt_min/Makefile | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/periph_rtt_min/Makefile b/tests/periph_rtt_min/Makefile index c0583244da..82af2f49db 100644 --- a/tests/periph_rtt_min/Makefile +++ b/tests/periph_rtt_min/Makefile @@ -6,15 +6,22 @@ USEMODULE += xtimer FEATURES_REQUIRED += periph_rtt DISABLE_MODULE += periph_init_rtt -SAMPLES ?= 1024 -CFLAGS += -DSAMPLES=$(SAMPLES) +RIOT_TERMINAL ?= socat include $(RIOTBASE)/Makefile.include -$(call target-export-variables, test, SAMPLES) - # use highest possible RTT_FREQUENCY for boards that allow it ifneq (,$(filter stm32 nrf5%,$(CPU))) RTT_FREQUENCY ?= RTT_MAX_FREQUENCY CFLAGS += -DRTT_FREQUENCY=$(RTT_FREQUENCY) endif + +# kinetis rtt runs at 1Hz, reduce samples to speed up the test +ifneq (,$(filter kinetis,$(CPU))) + SAMPLES ?= 64 +else + SAMPLES ?= 1024 +endif +CFLAGS += -DSAMPLES=$(SAMPLES) + +$(call target-export-variables, test, SAMPLES)