From 86dab2f9fa1a2b15b63401fe94ef9474eb88f376 Mon Sep 17 00:00:00 2001 From: Przemyslaw Stekiel Date: Wed, 5 Jun 2019 13:35:52 +0200 Subject: [PATCH] Disable time drifting test cases. Time drifting test cases use serial communication with the host and are unstable on CI. Skip time-drifting test cases if SKIP_TIME_DRIFT_TESTS macro is defined. The idea for the future is to use FPGA test shield for timing tests instead of host scripts. Also remove `__ARM_FM` macro which in most cases was used to disable time drifting tests. In other cases replace `__ARM_FM` with `TARGET_ARM_FM` which is more suitable. --- TESTS/mbed_drivers/lp_timeout/main.cpp | 3 ++- TESTS/mbed_drivers/ticker/main.cpp | 3 ++- TESTS/mbed_drivers/timeout/main.cpp | 3 ++- TESTS/mbed_hal/common_tickers_freq/main.cpp | 5 ++--- TESTS/mbed_platform/wait_ns/main.cpp | 2 +- TESTS/mbedmicro-rtos-mbed/basic/main.cpp | 9 ++++----- TESTS/mbedmicro-rtos-mbed/mail/main.cpp | 2 +- TESTS/mbedmicro-rtos-mbed/malloc/main.cpp | 2 +- TESTS/mbedmicro-rtos-mbed/threads/main.cpp | 2 +- targets/targets.json | 4 ++-- 10 files changed, 18 insertions(+), 17 deletions(-) diff --git a/TESTS/mbed_drivers/lp_timeout/main.cpp b/TESTS/mbed_drivers/lp_timeout/main.cpp index c1305cc271..ffeecde1f3 100644 --- a/TESTS/mbed_drivers/lp_timeout/main.cpp +++ b/TESTS/mbed_drivers/lp_timeout/main.cpp @@ -74,7 +74,8 @@ Case cases[] = { Case("1 s delay during deepsleep (attach_us)", test_deepsleep, 1000000, LONG_DELTA_US>, greentea_failure_handler), #endif -#if !defined(__ARM_FM) //FastModels not support time drifting test + +#if !defined(SKIP_TIME_DRIFT_TESTS) Case("Timing drift (attach)", test_drift >), Case("Timing drift (attach_us)", test_drift >), #endif diff --git a/TESTS/mbed_drivers/ticker/main.cpp b/TESTS/mbed_drivers/ticker/main.cpp index e8ba0adc34..6824261b3b 100644 --- a/TESTS/mbed_drivers/ticker/main.cpp +++ b/TESTS/mbed_drivers/ticker/main.cpp @@ -329,7 +329,8 @@ Case cases[] = { Case("Test detach", test_detach), Case("Test multi call and time measure", test_multi_call_time), Case("Test multi ticker", test_multi_ticker), -#if !defined(__ARM_FM) //FastModels not support time drifting test + +#if !defined(SKIP_TIME_DRIFT_TESTS) Case("Test timers: 1x ticker", test_case_1x_ticker), Case("Test timers: 2x ticker", test_case_2x_ticker) #endif diff --git a/TESTS/mbed_drivers/timeout/main.cpp b/TESTS/mbed_drivers/timeout/main.cpp index 72b1b06a6e..48feba4d91 100644 --- a/TESTS/mbed_drivers/timeout/main.cpp +++ b/TESTS/mbed_drivers/timeout/main.cpp @@ -68,7 +68,8 @@ Case cases[] = { Case("1 s delay during sleep (attach_us)", test_sleep, 1000000, LONG_DELTA_US>, greentea_failure_handler), #endif -#if !defined(__ARM_FM) //FastModels not support time drifting test + +#if !defined(SKIP_TIME_DRIFT_TESTS) Case("Timing drift (attach)", test_drift >), Case("Timing drift (attach_us)", test_drift >), #endif diff --git a/TESTS/mbed_hal/common_tickers_freq/main.cpp b/TESTS/mbed_hal/common_tickers_freq/main.cpp index 0f0c5a63ea..e00c2a242d 100644 --- a/TESTS/mbed_hal/common_tickers_freq/main.cpp +++ b/TESTS/mbed_hal/common_tickers_freq/main.cpp @@ -30,12 +30,11 @@ #include "hal/lp_ticker_api.h" #include "hal/mbed_lp_ticker_wrapper.h" -#if !DEVICE_USTICKER +#if defined(SKIP_TIME_DRIFT_TESTS) #error [NOT_SUPPORTED] test not supported #endif -//FastModels not support time drifting test -#if defined(__ARM_FM) +#if !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported #endif diff --git a/TESTS/mbed_platform/wait_ns/main.cpp b/TESTS/mbed_platform/wait_ns/main.cpp index 29ce36eef0..61af4afeae 100644 --- a/TESTS/mbed_platform/wait_ns/main.cpp +++ b/TESTS/mbed_platform/wait_ns/main.cpp @@ -24,7 +24,7 @@ #include "hal/lp_ticker_api.h" //FastModels not support timing test -#if defined(__ARM_FM) +#if defined(TARGET_ARM_FM) #error [NOT_SUPPORTED] test not supported #endif diff --git a/TESTS/mbedmicro-rtos-mbed/basic/main.cpp b/TESTS/mbedmicro-rtos-mbed/basic/main.cpp index 15aa793ede..e9e3bbf4c0 100644 --- a/TESTS/mbedmicro-rtos-mbed/basic/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/basic/main.cpp @@ -19,6 +19,10 @@ #include "utest/utest.h" #include "unity/unity.h" +#if defined(SKIP_TIME_DRIFT_TESTS) +#error [NOT_SUPPORTED] test not supported +#endif + #if defined(MBED_RTOS_SINGLE_THREAD) #error [NOT_SUPPORTED] test not supported #endif @@ -27,11 +31,6 @@ #error [NOT_SUPPORTED] test not supported #endif -//FastModels not support time drifting test -#if defined(__ARM_FM) -#error [NOT_SUPPORTED] test not supported -#endif - using utest::v1::Case; #if defined(__CORTEX_M23) || defined(__CORTEX_M33) diff --git a/TESTS/mbedmicro-rtos-mbed/mail/main.cpp b/TESTS/mbedmicro-rtos-mbed/mail/main.cpp index 0c27bec81b..1046d1d249 100644 --- a/TESTS/mbedmicro-rtos-mbed/mail/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/mail/main.cpp @@ -31,7 +31,7 @@ using namespace utest::v1; #if defined(__CORTEX_M23) || defined(__CORTEX_M33) #define THREAD_STACK_SIZE 512 -#elif defined(__ARM_FM) +#elif defined(TARGET_ARM_FM) #define THREAD_STACK_SIZE 512 #elif defined(TARGET_CY8CKIT_062_WIFI_BT_PSA) #define THREAD_STACK_SIZE 512 diff --git a/TESTS/mbedmicro-rtos-mbed/malloc/main.cpp b/TESTS/mbedmicro-rtos-mbed/malloc/main.cpp index 4aa81a152d..15a8c187de 100644 --- a/TESTS/mbedmicro-rtos-mbed/malloc/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/malloc/main.cpp @@ -39,7 +39,7 @@ volatile bool thread_should_continue = true; #define THREAD_STACK_SIZE 512 #elif defined(__CORTEX_M23) || defined(__CORTEX_M33) #define THREAD_STACK_SIZE 512 -#elif defined(__ARM_FM) +#elif defined(TARGET_ARM_FM) #define THREAD_STACK_SIZE 512 #elif defined(TARGET_CY8CKIT_062_WIFI_BT_PSA) #define THREAD_STACK_SIZE 512 diff --git a/TESTS/mbedmicro-rtos-mbed/threads/main.cpp b/TESTS/mbedmicro-rtos-mbed/threads/main.cpp index 4831c18028..0d3764b7fd 100644 --- a/TESTS/mbedmicro-rtos-mbed/threads/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/threads/main.cpp @@ -34,7 +34,7 @@ #define PARALLEL_THREAD_STACK_SIZE 512 #elif defined(__CORTEX_M23) || defined(__CORTEX_M33) #define PARALLEL_THREAD_STACK_SIZE 512 -#elif defined(__ARM_FM) +#elif defined(TARGET_ARM_FM) #define PARALLEL_THREAD_STACK_SIZE 512 #elif defined(TARGET_CY8CKIT_062_WIFI_BT_PSA) #define PARALLEL_THREAD_STACK_SIZE 512 diff --git a/targets/targets.json b/targets/targets.json index 8a525f8fd4..1fa43d6b64 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -4265,7 +4265,7 @@ "SERIAL_FC", "TRNG", "FLASH", - "QSPI", + "QSPI", "MPU" ], "release_versions": ["2", "5"], @@ -8030,7 +8030,7 @@ "ARM_FM": { "inherits": ["Target"], "public": false, - "macros": ["__ARM_FM"], + "macros": ["SKIP_TIME_DRIFT_TESTS"], "extra_labels": ["ARM_FM"] }, "FVP_MPS2": {