1414 * See the License for the specific language governing permissions and
1515 * limitations under the License.
1616 */
17- #if !defined(MBED_CONF_RTOS_PRESENT)
18- #error [NOT_SUPPORTED] kernel tick count test cases require a RTOS to run.
19- #else
20-
2117#include " greentea-client/test_env.h"
2218#include " utest/utest.h"
2319#include " unity/unity.h"
@@ -36,6 +32,7 @@ using utest::v1::Case;
3632#define SMALL_DELTA 1500 // 0.15%
3733#define BIG_DELTA 15000 // 1.5%
3834
35+ #if defined(MBED_CONF_RTOS_PRESENT)
3936/* * Test if kernel ticker frequency is 1kHz
4037
4138 Given a RTOS kernel ticker
@@ -47,6 +44,7 @@ void test_frequency()
4744 uint32_t freq = osKernelGetTickFreq ();
4845 TEST_ASSERT_EQUAL_UINT32_MESSAGE (1000 , freq, " Expected SysTick frequency is 1kHz" );
4946}
47+ #endif
5048
5149/* * Test if kernel ticker increments by one
5250
@@ -105,7 +103,9 @@ void test_interval()
105103
106104// Test cases
107105Case cases[] = {
106+ #if defined(MBED_CONF_RTOS_PRESENT)
108107 Case (" Test kernel ticker frequency" , test_frequency),
108+ #endif
109109 Case (" Test if kernel ticker increments by one" , test_increment),
110110 Case (" Test if kernel ticker interval is 1ms" , test_interval)
111111};
@@ -122,4 +122,3 @@ int main()
122122{
123123 return !utest::v1::Harness::run (specification);
124124}
125- #endif // !defined(MBED_CONF_RTOS_PRESENT)
0 commit comments