mirror of https://github.com/ARMmbed/mbed-os.git
tests-mbedmicro-rtos-mbed-systimer: execute sleep/deepsleep test cases only when SLEEP support is enabled.
parent
58afcc2904
commit
2b7d7a822b
|
@ -251,6 +251,7 @@ void test_handler_called_once(void)
|
||||||
TEST_ASSERT_EQUAL_UINT32(1, st.get_tick());
|
TEST_ASSERT_EQUAL_UINT32(1, st.get_tick());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if DEVICE_SLEEP
|
||||||
/** Test wake up from sleep
|
/** Test wake up from sleep
|
||||||
*
|
*
|
||||||
* Given a SysTimer with a tick scheduled in the future
|
* 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());
|
TEST_ASSERT_UINT64_WITHIN(DELAY_DELTA_US, DELAY_US, lptimer.read_high_resolution_us());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
utest::v1::status_t test_setup(const size_t number_of_cases)
|
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("Tick can be cancelled", test_cancel_tick),
|
||||||
Case("Schedule zero ticks", test_schedule_zero),
|
Case("Schedule zero ticks", test_schedule_zero),
|
||||||
Case("Handler called once", test_handler_called_once),
|
Case("Handler called once", test_handler_called_once),
|
||||||
|
#if DEVICE_SLEEP
|
||||||
Case("Wake up from sleep", test_sleep),
|
Case("Wake up from sleep", test_sleep),
|
||||||
#if DEVICE_LOWPOWERTIMER
|
#if DEVICE_LOWPOWERTIMER
|
||||||
Case("Wake up from deep sleep", test_deepsleep),
|
Case("Wake up from deep sleep", test_deepsleep),
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue