Skip to content

Commit 73351a0

Browse files
mprse0xc0170
authored andcommitted
tests-mbed_hal-lp_ticker: run sleep test only if SLEEP support is enabled.
1 parent a716ad7 commit 73351a0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

TESTS/mbed_hal/lp_ticker/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ void lp_ticker_info_test()
8787
TEST_ASSERT(p_ticker_info->bits >= 12);
8888
}
8989

90+
#if DEVICE_SLEEP
9091
/* Test that the ticker continues operating in deep sleep mode. */
9192
void lp_ticker_deepsleep_test()
9293
{
@@ -115,6 +116,7 @@ void lp_ticker_deepsleep_test()
115116

116117
TEST_ASSERT_EQUAL(1, intFlag);
117118
}
119+
#endif
118120

119121
/* Test that the ticker does not glitch backwards due to an incorrectly implemented ripple counter driver. */
120122
void lp_ticker_glitch_test()
@@ -141,7 +143,9 @@ utest::v1::status_t test_setup(const size_t number_of_cases)
141143

142144
Case cases[] = {
143145
Case("lp ticker info test", lp_ticker_info_test),
146+
#if DEVICE_SLEEP
144147
Case("lp ticker sleep test", lp_ticker_deepsleep_test),
148+
#endif
145149
Case("lp ticker glitch test", lp_ticker_glitch_test)
146150
};
147151

0 commit comments

Comments
 (0)