From 0cc08cde62974d377786bbf631ac4390fd4279e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Chru=C5=9Bci=C5=84ski?= Date: Fri, 12 Apr 2024 07:43:54 +0200 Subject: [PATCH] tests: drivers: counter: nrf_rtc: Fail if no devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Test was passing if there were no RTCs enabled given the false positive. Signed-off-by: Krzysztof Chruściński --- .../counter_nrf_rtc/fixed_top/src/test_counter_fixed_top.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/drivers/counter/counter_nrf_rtc/fixed_top/src/test_counter_fixed_top.c b/tests/drivers/counter/counter_nrf_rtc/fixed_top/src/test_counter_fixed_top.c index ba6666449ce..a86384d1305 100644 --- a/tests/drivers/counter/counter_nrf_rtc/fixed_top/src/test_counter_fixed_top.c +++ b/tests/drivers/counter/counter_nrf_rtc/fixed_top/src/test_counter_fixed_top.c @@ -55,6 +55,7 @@ static void counter_tear_down_instance(const struct device *dev) static void test_all_instances(counter_test_func_t func) { + zassert_true(ARRAY_SIZE(devices) > 0); for (int i = 0; i < ARRAY_SIZE(devices); i++) { counter_setup_instance(devices[i]); func(i);