From 507ebecffc325c2234419907884b3164950056d2 Mon Sep 17 00:00:00 2001 From: Alexandre Bourdiol Date: Fri, 15 May 2020 17:58:23 +0200 Subject: [PATCH] sample: drivers: counter: alarm: adapt test to driver change Due to counter driver implementation change "driver/counter/counter_ll_stm32_rtc.c: Add 1 tick to alarm" It is necessary to adapt sample test (sanitycheck) to take into consideration 1 tick precision/tolerance. Signed-off-by: Alexandre Bourdiol --- samples/drivers/counter/alarm/README.rst | 4 ++++ samples/drivers/counter/alarm/sample.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/samples/drivers/counter/alarm/README.rst b/samples/drivers/counter/alarm/README.rst index 25fb8b74b08..9efffc81ae7 100644 --- a/samples/drivers/counter/alarm/README.rst +++ b/samples/drivers/counter/alarm/README.rst @@ -9,6 +9,10 @@ This sample provides an example of alarm application using counter API. It sets an alarm with an initial delay of 2 seconds. At each alarm expiry, a new alarm is configured with a delay multiplied by 2. +.. note:: + In case of 1Hz frequency (RTC for example), precision is 1 second. + Therefore, the sample output may differ in 1 second + Requirements ************ diff --git a/samples/drivers/counter/alarm/sample.yaml b/samples/drivers/counter/alarm/sample.yaml index e3401dc39bf..4408f21ca5e 100644 --- a/samples/drivers/counter/alarm/sample.yaml +++ b/samples/drivers/counter/alarm/sample.yaml @@ -13,5 +13,5 @@ tests: - "Counter alarm sample" - "Set alarm in 2 sec" - "!!! Alarm !!!" - - "Now: 2" + - "Now: [2|3]" depends_on: counter