Skip to content

Commit 0bacd5b

Browse files
Qinghao ShiQinghao Shi
authored andcommitted
TESTS: update test with explicit skip message
1 parent 6bd5271 commit 0bacd5b

File tree

2 files changed

+13
-5
lines changed
  • TESTS/mbed_hal/common_tickers_freq
  • rtos/tests/TESTS/mbedmicro-rtos-mbed/basic

2 files changed

+13
-5
lines changed

TESTS/mbed_hal/common_tickers_freq/main.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@
2929
#include "hal/lp_ticker_api.h"
3030
#include "hal/mbed_lp_ticker_wrapper.h"
3131

32-
#if defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER
33-
#error [NOT_SUPPORTED] test not supported
32+
#if !DEVICE_USTICKER
33+
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test
3434
#else
3535

36+
#if defined(SKIP_TIME_DRIFT_TESTS)
37+
#error [NOT_SUPPORTED] timing accuracy tests skipped
38+
#endif // defined(SKIP_TIME_DRIFT_TESTS)
39+
3640
#define US_PER_S 1000000
3741

3842
using namespace utest::v1;
@@ -208,4 +212,4 @@ int main()
208212
Harness::run(specification);
209213
}
210214

211-
#endif // defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER
215+
#endif // !DEVICE_USTICKER

rtos/tests/TESTS/mbedmicro-rtos-mbed/basic/main.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,14 @@
2323
#include "utest/utest.h"
2424
#include "unity/unity.h"
2525

26-
#if defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER
26+
#if !DEVICE_USTICKER
2727
#error [NOT_SUPPORTED] UsTicker need to be enabled for this test.
2828
#else
2929

30+
#if defined(SKIP_TIME_DRIFT_TESTS)
31+
#error [NOT_SUPPORTED] timing accuracy tests skipped
32+
#endif // defined(SKIP_TIME_DRIFT_TESTS
33+
3034
using utest::v1::Case;
3135
using std::milli;
3236
using std::micro;
@@ -122,5 +126,5 @@ int main()
122126
utest::v1::Harness::run(specification);
123127
}
124128

125-
#endif // defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER
129+
#endif // !DEVICE_USTICKER
126130
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !defined(MBED_CONF_RTOS_PRESENT)

0 commit comments

Comments
 (0)