From 2b7d7a822b4baf404bf49c78af2d8fa6cec937ec Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Thu, 29 Mar 2018 22:15:24 +0200 Subject: [PATCH] tests-mbedmicro-rtos-mbed-systimer: execute sleep/deepsleep test cases only when SLEEP support is enabled. --- TESTS/mbedmicro-rtos-mbed/systimer/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TESTS/mbedmicro-rtos-mbed/systimer/main.cpp b/TESTS/mbedmicro-rtos-mbed/systimer/main.cpp index 68d27977da..37a8dffe8c 100644 --- a/TESTS/mbedmicro-rtos-mbed/systimer/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/systimer/main.cpp @@ -251,6 +251,7 @@ void test_handler_called_once(void) TEST_ASSERT_EQUAL_UINT32(1, st.get_tick()); } +#if DEVICE_SLEEP /** Test wake up from sleep * * Given a SysTimer with a tick scheduled in the future @@ -316,6 +317,7 @@ void test_deepsleep(void) TEST_ASSERT_UINT64_WITHIN(DELAY_DELTA_US, DELAY_US, lptimer.read_high_resolution_us()); } #endif +#endif utest::v1::status_t test_setup(const size_t number_of_cases) { @@ -330,10 +332,12 @@ Case cases[] = { Case("Tick can be cancelled", test_cancel_tick), Case("Schedule zero ticks", test_schedule_zero), Case("Handler called once", test_handler_called_once), +#if DEVICE_SLEEP Case("Wake up from sleep", test_sleep), #if DEVICE_LOWPOWERTIMER Case("Wake up from deep sleep", test_deepsleep), #endif +#endif };