14
14
* See the License for the specific language governing permissions and
15
15
* limitations under the License.
16
16
*/
17
- #if !defined(MBED_CONF_RTOS_PRESENT)
18
- #error [NOT_SUPPORTED] kernel tick count test cases require a RTOS to run.
19
- #else
20
-
21
17
#include " greentea-client/test_env.h"
22
18
#include " utest/utest.h"
23
19
#include " unity/unity.h"
@@ -36,6 +32,7 @@ using utest::v1::Case;
36
32
#define SMALL_DELTA 1500 // 0.15%
37
33
#define BIG_DELTA 15000 // 1.5%
38
34
35
+ #if defined(MBED_CONF_RTOS_PRESENT)
39
36
/* * Test if kernel ticker frequency is 1kHz
40
37
41
38
Given a RTOS kernel ticker
@@ -47,6 +44,7 @@ void test_frequency()
47
44
uint32_t freq = osKernelGetTickFreq ();
48
45
TEST_ASSERT_EQUAL_UINT32_MESSAGE (1000 , freq, " Expected SysTick frequency is 1kHz" );
49
46
}
47
+ #endif
50
48
51
49
/* * Test if kernel ticker increments by one
52
50
@@ -105,7 +103,9 @@ void test_interval()
105
103
106
104
// Test cases
107
105
Case cases[] = {
106
+ #if defined(MBED_CONF_RTOS_PRESENT)
108
107
Case (" Test kernel ticker frequency" , test_frequency),
108
+ #endif
109
109
Case (" Test if kernel ticker increments by one" , test_increment),
110
110
Case (" Test if kernel ticker interval is 1ms" , test_interval)
111
111
};
@@ -122,4 +122,3 @@ int main()
122
122
{
123
123
return !utest::v1::Harness::run (specification);
124
124
}
125
- #endif // !defined(MBED_CONF_RTOS_PRESENT)
0 commit comments