diff --git a/TESTS/events/queue/main.cpp b/TESTS/events/queue/main.cpp index 4bde3c8e23..be91fb458a 100644 --- a/TESTS/events/queue/main.cpp +++ b/TESTS/events/queue/main.cpp @@ -22,7 +22,7 @@ #if !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif +#else using namespace utest::v1; @@ -357,3 +357,4 @@ int main() return !Harness::run(specification); } +#endif // !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/events/timing/main.cpp b/TESTS/events/timing/main.cpp index adc001640b..84478da15f 100644 --- a/TESTS/events/timing/main.cpp +++ b/TESTS/events/timing/main.cpp @@ -26,7 +26,7 @@ using namespace utest::v1; #if !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif +#else // Test delay #ifndef TEST_EVENTS_TIMING_TIME @@ -148,3 +148,4 @@ int main() return !Harness::run(specification); } +#endif // !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/lorawan/loraradio/main.cpp b/TESTS/lorawan/loraradio/main.cpp index 0d88d4e6e6..91b6bc7370 100644 --- a/TESTS/lorawan/loraradio/main.cpp +++ b/TESTS/lorawan/loraradio/main.cpp @@ -36,6 +36,7 @@ #error [NOT_SUPPORTED] Requires parameters from application config file. #endif +#if (MBED_CONF_APP_LORA_RADIO == SX1272) || (MBED_CONF_APP_LORA_RADIO == SX1276) using namespace utest::v1; using namespace mbed; @@ -281,3 +282,5 @@ int main() { return !Harness::run(specification); } + +#endif // (MBED_CONF_APP_LORA_RADIO == SX1272) || (MBED_CONF_APP_LORA_RADIO == SX1276) \ No newline at end of file diff --git a/TESTS/mbed-crypto/sanity/main.cpp b/TESTS/mbed-crypto/sanity/main.cpp index 73d5eb0b6f..a0df4e7325 100644 --- a/TESTS/mbed-crypto/sanity/main.cpp +++ b/TESTS/mbed-crypto/sanity/main.cpp @@ -19,7 +19,7 @@ #if ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C))) #error [NOT_SUPPORTED] Mbed Crypto is OFF - skipping. -#endif +#else #include #include "mbed.h" @@ -460,3 +460,4 @@ int main(void) { return !Harness::run(specification); } + #endif // ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C))) \ No newline at end of file diff --git a/TESTS/mbed_drivers/flashiap/main.cpp b/TESTS/mbed_drivers/flashiap/main.cpp index 28249eeaf2..5547baba5f 100644 --- a/TESTS/mbed_drivers/flashiap/main.cpp +++ b/TESTS/mbed_drivers/flashiap/main.cpp @@ -17,7 +17,7 @@ #if !DEVICE_FLASH #error [NOT_SUPPORTED] Flash API not supported for this target -#endif +#else #include "utest/utest.h" #include "utest/utest_serial.h" @@ -328,3 +328,5 @@ int main() { Harness::run(specification); } + +#endif // !DEVICE_FLASH \ No newline at end of file diff --git a/TESTS/mbed_drivers/lp_ticker/main.cpp b/TESTS/mbed_drivers/lp_ticker/main.cpp index 425c5b9a38..ebe395762f 100644 --- a/TESTS/mbed_drivers/lp_ticker/main.cpp +++ b/TESTS/mbed_drivers/lp_ticker/main.cpp @@ -21,7 +21,7 @@ #if !DEVICE_LPTICKER #error [NOT_SUPPORTED] Low power ticker not supported for this target -#endif +#else using utest::v1::Case; @@ -228,3 +228,5 @@ int main() { utest::v1::Harness::run(specification); } + +#endif // !DEVICE_LPTICKER \ No newline at end of file diff --git a/TESTS/mbed_drivers/lp_timeout/main.cpp b/TESTS/mbed_drivers/lp_timeout/main.cpp index ffeecde1f3..32a63ffbaa 100644 --- a/TESTS/mbed_drivers/lp_timeout/main.cpp +++ b/TESTS/mbed_drivers/lp_timeout/main.cpp @@ -16,7 +16,7 @@ #if !DEVICE_LPTICKER #error [NOT_SUPPORTED] Low power timer not supported for this target -#endif +#else #include "mbed.h" #include "greentea-client/test_env.h" @@ -93,3 +93,5 @@ int main() { Harness::run(specification); } + +#endif // !DEVICE_LPTICKER \ No newline at end of file diff --git a/TESTS/mbed_drivers/lp_timer/main.cpp b/TESTS/mbed_drivers/lp_timer/main.cpp index d41fd806af..42501d143c 100644 --- a/TESTS/mbed_drivers/lp_timer/main.cpp +++ b/TESTS/mbed_drivers/lp_timer/main.cpp @@ -24,7 +24,7 @@ #if !DEVICE_LPTICKER #error [NOT_SUPPORTED] test not supported -#endif +#else using namespace utest::v1; @@ -350,3 +350,5 @@ int main() { return !Harness::run(specification); } + +#endif // !DEVICE_LPTICKER \ No newline at end of file diff --git a/TESTS/mbed_drivers/mem_trace/main.cpp b/TESTS/mbed_drivers/mem_trace/main.cpp index 9eac268444..1cbbc2e542 100644 --- a/TESTS/mbed_drivers/mem_trace/main.cpp +++ b/TESTS/mbed_drivers/mem_trace/main.cpp @@ -26,7 +26,7 @@ #ifndef MBED_MEM_TRACING_ENABLED #error [NOT_SUPPORTED] test not supported -#endif +#else using utest::v1::Case; @@ -427,3 +427,5 @@ int main() return !utest::v1::Harness::run(specification); } + +#endif // MBED_MEM_TRACING_ENABLED \ No newline at end of file diff --git a/TESTS/mbed_drivers/race_test/main.cpp b/TESTS/mbed_drivers/race_test/main.cpp index 059313e5ea..68c4768fd7 100644 --- a/TESTS/mbed_drivers/race_test/main.cpp +++ b/TESTS/mbed_drivers/race_test/main.cpp @@ -22,13 +22,9 @@ #include "SingletonPtr.h" #include -#ifdef MBED_RTOS_SINGLE_THREAD -#error [NOT_SUPPORTED] test not supported for single threaded enviroment -#endif - -#if !DEVICE_USTICKER -#error [NOT_SUPPORTED] test not supported -#endif +#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER +#error [NOT_SUPPORTED] Test not supported for single threaded enviroment. UsTicker need to be enabled for this test. +#else using namespace utest::v1; @@ -135,3 +131,5 @@ int main() { Harness::run(specification); } + +#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbed_drivers/reset_reason/main.cpp b/TESTS/mbed_drivers/reset_reason/main.cpp index 626fccc648..790aebc1ac 100644 --- a/TESTS/mbed_drivers/reset_reason/main.cpp +++ b/TESTS/mbed_drivers/reset_reason/main.cpp @@ -16,7 +16,7 @@ */ #if !DEVICE_RESET_REASON #error [NOT_SUPPORTED] Reset reason API not supported for this target -#endif +#else #include "greentea-client/test_env.h" #include "unity/unity.h" @@ -141,3 +141,5 @@ int main() test_reset_reason(); // The result of this test suite is reported by the host side. GREENTEA_TESTSUITE_RESULT(0); // Fail on any error. } + +#endif // !DEVICE_RESET_REASON \ No newline at end of file diff --git a/TESTS/mbed_drivers/rtc/main.cpp b/TESTS/mbed_drivers/rtc/main.cpp index 460785b120..61fa21eba6 100644 --- a/TESTS/mbed_drivers/rtc/main.cpp +++ b/TESTS/mbed_drivers/rtc/main.cpp @@ -23,7 +23,7 @@ #if !DEVICE_RTC || !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif +#else using namespace utest::v1; @@ -494,3 +494,5 @@ int main() { return !Harness::run(specification); } + +#endif // !DEVICE_RTC || !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbed_drivers/sleep_lock/main.cpp b/TESTS/mbed_drivers/sleep_lock/main.cpp index 7986845f57..03cb5c10c5 100644 --- a/TESTS/mbed_drivers/sleep_lock/main.cpp +++ b/TESTS/mbed_drivers/sleep_lock/main.cpp @@ -17,7 +17,7 @@ #if !DEVICE_SLEEP #error [NOT_SUPPORTED] Sleep not supported for this target -#endif +#else #include "utest/utest.h" #include "unity/unity.h" @@ -132,3 +132,5 @@ int main() { Harness::run(specification); } + +#endif // !DEVICE_SLEEP \ No newline at end of file diff --git a/TESTS/mbed_drivers/ticker/main.cpp b/TESTS/mbed_drivers/ticker/main.cpp index b324f35674..c4a7e4da9e 100644 --- a/TESTS/mbed_drivers/ticker/main.cpp +++ b/TESTS/mbed_drivers/ticker/main.cpp @@ -20,7 +20,7 @@ #if !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif +#else using utest::v1::Case; @@ -354,3 +354,5 @@ int main() { utest::v1::Harness::run(specification); } + +#endif // !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbed_drivers/timeout/main.cpp b/TESTS/mbed_drivers/timeout/main.cpp index 48feba4d91..f22364169b 100644 --- a/TESTS/mbed_drivers/timeout/main.cpp +++ b/TESTS/mbed_drivers/timeout/main.cpp @@ -21,7 +21,7 @@ #if !DEVICE_USTICKER #error [NOT_SUPPORTED] usticker not supported for this target. -#endif +#else using namespace utest::v1; @@ -87,3 +87,5 @@ int main() { Harness::run(specification); } + +#endif // !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbed_drivers/timer/main.cpp b/TESTS/mbed_drivers/timer/main.cpp index d04cd54e76..621eee976d 100644 --- a/TESTS/mbed_drivers/timer/main.cpp +++ b/TESTS/mbed_drivers/timer/main.cpp @@ -24,7 +24,7 @@ #if !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif +#else using namespace utest::v1; @@ -789,3 +789,4 @@ int main() return !Harness::run(specification); } +#endif // !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbed_drivers/timerevent/main.cpp b/TESTS/mbed_drivers/timerevent/main.cpp index 7228b8bb16..21c5fa4161 100644 --- a/TESTS/mbed_drivers/timerevent/main.cpp +++ b/TESTS/mbed_drivers/timerevent/main.cpp @@ -15,7 +15,7 @@ */ #if !DEVICE_USTICKER #error [NOT_SUPPORTED] usticker not supported for this target. -#endif +#else #include "mbed.h" #include "greentea-client/test_env.h" @@ -27,10 +27,6 @@ using namespace utest::v1; -#if !DEVICE_USTICKER -#error [NOT_SUPPORTED] test not supported -#endif - #define TEST_DELAY_US 50000ULL #define DELTA 2 @@ -246,3 +242,5 @@ int main() { return !Harness::run(specification); } + +#endif // !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbed_drivers/watchdog/main.cpp b/TESTS/mbed_drivers/watchdog/main.cpp index e89fe282fb..946b420f8d 100644 --- a/TESTS/mbed_drivers/watchdog/main.cpp +++ b/TESTS/mbed_drivers/watchdog/main.cpp @@ -16,7 +16,7 @@ */ #if !DEVICE_WATCHDOG #error [NOT_SUPPORTED] Watchdog not supported for this target -#endif +#else #include "greentea-client/test_env.h" #include "unity/unity.h" @@ -282,3 +282,5 @@ int main() // Harness will start with a test case index provided by host script. return !Harness::run(specification); } + +#endif // !DEVICE_WATCHDOG \ No newline at end of file diff --git a/TESTS/mbed_drivers/watchdog_reset/main.cpp b/TESTS/mbed_drivers/watchdog_reset/main.cpp index 5025a43d76..ac1a38dcf0 100644 --- a/TESTS/mbed_drivers/watchdog_reset/main.cpp +++ b/TESTS/mbed_drivers/watchdog_reset/main.cpp @@ -16,7 +16,7 @@ */ #if !DEVICE_WATCHDOG #error [NOT_SUPPORTED] Watchdog not supported for this target -#endif +#else #include "greentea-client/test_env.h" #include "utest/utest.h" @@ -319,3 +319,4 @@ int main() // Harness will start with a test case index provided by host script. return !Harness::run(specification); } +#endif // !DEVICE_WATCHDOG \ No newline at end of file diff --git a/TESTS/mbed_hal/common_tickers/main.cpp b/TESTS/mbed_hal/common_tickers/main.cpp index e1a26dc79e..6fe5d1ba5b 100644 --- a/TESTS/mbed_hal/common_tickers/main.cpp +++ b/TESTS/mbed_hal/common_tickers/main.cpp @@ -32,7 +32,7 @@ extern "C" { #if !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif +#else #define US_PER_S 1000000 @@ -605,3 +605,4 @@ int main() { return !Harness::run(specification); } +#endif // !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbed_hal/common_tickers_freq/main.cpp b/TESTS/mbed_hal/common_tickers_freq/main.cpp index e00c2a242d..ff83f70e13 100644 --- a/TESTS/mbed_hal/common_tickers_freq/main.cpp +++ b/TESTS/mbed_hal/common_tickers_freq/main.cpp @@ -30,13 +30,9 @@ #include "hal/lp_ticker_api.h" #include "hal/mbed_lp_ticker_wrapper.h" -#if defined(SKIP_TIME_DRIFT_TESTS) +#if defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif - -#if !DEVICE_USTICKER -#error [NOT_SUPPORTED] test not supported -#endif +#else #define US_PER_S 1000000 @@ -208,3 +204,5 @@ int main() { Harness::run(specification); } + +#endif // defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbed_hal/crc/main.cpp b/TESTS/mbed_hal/crc/main.cpp index c233c120d6..a5aa9b8bd7 100644 --- a/TESTS/mbed_hal/crc/main.cpp +++ b/TESTS/mbed_hal/crc/main.cpp @@ -22,7 +22,7 @@ #if !DEVICE_CRC #error [NOT_SUPPORTED] CRC not supported for this target -#endif +#else using namespace utest::v1; @@ -280,3 +280,5 @@ int main() Harness::run(specification); } + +#endif // !DEVICE_CRC \ No newline at end of file diff --git a/TESTS/mbed_hal/flash/functional_tests/main.cpp b/TESTS/mbed_hal/flash/functional_tests/main.cpp index e79a16a53d..427635a7fd 100644 --- a/TESTS/mbed_hal/flash/functional_tests/main.cpp +++ b/TESTS/mbed_hal/flash/functional_tests/main.cpp @@ -16,7 +16,7 @@ #if !DEVICE_FLASH #error [NOT_SUPPORTED] Flash API not supported for this target -#endif +#else #include "utest/utest.h" #include "unity/unity.h" @@ -280,3 +280,5 @@ int main() { Harness::run(specification); } + +#endif !DEVICE_FLASH \ No newline at end of file diff --git a/TESTS/mbed_hal/lp_ticker/main.cpp b/TESTS/mbed_hal/lp_ticker/main.cpp index 58ff4acf7f..e2ad3113eb 100644 --- a/TESTS/mbed_hal/lp_ticker/main.cpp +++ b/TESTS/mbed_hal/lp_ticker/main.cpp @@ -24,7 +24,7 @@ #if !DEVICE_LPTICKER #error [NOT_SUPPORTED] Low power timer not supported for this target -#endif +#else using namespace utest::v1; @@ -204,3 +204,5 @@ int main() { return !Harness::run(specification); } + +#endif // !DEVICE_LPTICKER \ No newline at end of file diff --git a/TESTS/mbed_hal/mpu/main.cpp b/TESTS/mbed_hal/mpu/main.cpp index 09da639717..c3f4223e2a 100644 --- a/TESTS/mbed_hal/mpu/main.cpp +++ b/TESTS/mbed_hal/mpu/main.cpp @@ -26,7 +26,7 @@ #if !DEVICE_MPU #error [NOT_SUPPORTED] MPU API not supported for this target -#endif +#else using namespace utest::v1; @@ -197,3 +197,5 @@ int main() { Harness::run(specification); } + +#endif // !DEVICE_MPU \ No newline at end of file diff --git a/TESTS/mbed_hal/qspi/main.cpp b/TESTS/mbed_hal/qspi/main.cpp index 33515daa80..bc92415e4e 100644 --- a/TESTS/mbed_hal/qspi/main.cpp +++ b/TESTS/mbed_hal/qspi/main.cpp @@ -16,7 +16,7 @@ #if !DEVICE_QSPI #error [NOT_SUPPORTED] QSPI not supported for this target -#endif +#else #include "utest/utest.h" #include "unity/unity.h" @@ -30,7 +30,7 @@ #if !defined(QSPI_FLASH_CHIP_STRING) #error [NOT_SUPPORTED] QSPI test not supported for this target -#endif +#else using namespace utest::v1; @@ -602,3 +602,5 @@ int main() Harness::run(specification); } +#endif // !defined(QSPI_FLASH_CHIP_STRING) +#endif // !DEVICE_QSPI \ No newline at end of file diff --git a/TESTS/mbed_hal/reset_reason/main.cpp b/TESTS/mbed_hal/reset_reason/main.cpp index e604a4c6ad..2f90958e52 100644 --- a/TESTS/mbed_hal/reset_reason/main.cpp +++ b/TESTS/mbed_hal/reset_reason/main.cpp @@ -16,7 +16,7 @@ */ #if !DEVICE_RESET_REASON #error [NOT_SUPPORTED] Reset reason API not supported for this target -#endif +#else #include "greentea-client/test_env.h" #include "unity/unity.h" @@ -148,3 +148,5 @@ int main() test_reset_reason(); // The result of this test suite is reported by the host side. GREENTEA_TESTSUITE_RESULT(0); // Fail on any error. } + +#endif //!DEVICE_RESET_REASON \ No newline at end of file diff --git a/TESTS/mbed_hal/rtc/main.cpp b/TESTS/mbed_hal/rtc/main.cpp index f56383dcb1..d447959326 100644 --- a/TESTS/mbed_hal/rtc/main.cpp +++ b/TESTS/mbed_hal/rtc/main.cpp @@ -16,7 +16,7 @@ #if !DEVICE_RTC #error [NOT_SUPPORTED] RTC API not supported for this target -#endif +#else #include "utest/utest.h" #include "unity/unity.h" @@ -258,3 +258,5 @@ int main() { Harness::run(specification); } + +#endif // !DEVICE_RTC \ No newline at end of file diff --git a/TESTS/mbed_hal/rtc_reset/main.cpp b/TESTS/mbed_hal/rtc_reset/main.cpp index de9fdf85c6..3cbc7b49cd 100644 --- a/TESTS/mbed_hal/rtc_reset/main.cpp +++ b/TESTS/mbed_hal/rtc_reset/main.cpp @@ -16,7 +16,7 @@ #if !DEVICE_RTC #error [NOT_SUPPORTED] RTC API not supported for this target -#endif +#else #include "utest/utest.h" #include "unity/unity.h" @@ -100,3 +100,5 @@ int main() { rtc_reset_test(); } + +#endif // !DEVICE_RTC \ No newline at end of file diff --git a/TESTS/mbed_hal/sleep/main.cpp b/TESTS/mbed_hal/sleep/main.cpp index a61e066023..8016da4cb8 100644 --- a/TESTS/mbed_hal/sleep/main.cpp +++ b/TESTS/mbed_hal/sleep/main.cpp @@ -16,7 +16,7 @@ #if !DEVICE_SLEEP #error [NOT_SUPPORTED] sleep not supported for this target -#endif +#else #include "mbed.h" @@ -260,3 +260,5 @@ int main() { Harness::run(specification); } + +#endif // !DEVICE_SLEEP \ No newline at end of file diff --git a/TESTS/mbed_hal/sleep_manager/main.cpp b/TESTS/mbed_hal/sleep_manager/main.cpp index 7e7cca03d0..4026cbc8e3 100644 --- a/TESTS/mbed_hal/sleep_manager/main.cpp +++ b/TESTS/mbed_hal/sleep_manager/main.cpp @@ -24,7 +24,7 @@ #if !DEVICE_SLEEP #error [NOT_SUPPORTED] test not supported -#endif +#else #define SLEEP_DURATION_US 20000ULL #define DEEP_SLEEP_TEST_CHECK_WAIT_US 2000 @@ -333,3 +333,5 @@ int main() { return !Harness::run(specification); } + +#endif // !DEVICE_SLEEP \ No newline at end of file diff --git a/TESTS/mbed_hal/sleep_manager_racecondition/main.cpp b/TESTS/mbed_hal/sleep_manager_racecondition/main.cpp index 86f2aaeeea..7951557c21 100644 --- a/TESTS/mbed_hal/sleep_manager_racecondition/main.cpp +++ b/TESTS/mbed_hal/sleep_manager_racecondition/main.cpp @@ -19,13 +19,9 @@ #include "mbed.h" #include "sleep_manager_api_racecondition_tests.h" -#if !DEVICE_SLEEP +#if !DEVICE_SLEEP || !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif - -#if !DEVICE_USTICKER -#error [NOT_SUPPORTED] test not supported -#endif +#else using namespace utest::v1; @@ -105,3 +101,5 @@ int main() { Harness::run(specification); } + +#endif // !DEVICE_SLEEP || !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbed_hal/spm/main.cpp b/TESTS/mbed_hal/spm/main.cpp index 5b16dcc506..4865492b5d 100644 --- a/TESTS/mbed_hal/spm/main.cpp +++ b/TESTS/mbed_hal/spm/main.cpp @@ -17,15 +17,15 @@ #if !defined(COMPONENT_PSA_SRV_IPC) #error [NOT_SUPPORTED] Test supported only on PSA targets -#endif +#else #if (defined( __CC_ARM ) || defined(__ARMCC_VERSION) || defined( __ICCARM__ )) #error [NOT_SUPPORTED] this test is supported on GCC only -#endif +#else #if DOMAIN_NS == 1 #error [NOT_SUPPORTED] Cannot run on M23/M33 core as SecureFault is implemented in secure-side and cant be remapped -#endif +#else #include "utest/utest.h" #include "unity/unity.h" @@ -156,3 +156,7 @@ int main() { Harness::run(specification); } + +#endif // DOMAIN_NS == 1 +#endif // (defined( __CC_ARM ) || defined(__ARMCC_VERSION) || defined( __ICCARM__ )) +#endif // !defined(COMPONENT_PSA_SRV_IPC) \ No newline at end of file diff --git a/TESTS/mbed_hal/stack_size_unification/main.cpp b/TESTS/mbed_hal/stack_size_unification/main.cpp index 230ade73d6..7ae6f792fa 100644 --- a/TESTS/mbed_hal/stack_size_unification/main.cpp +++ b/TESTS/mbed_hal/stack_size_unification/main.cpp @@ -22,7 +22,7 @@ #ifdef TARGET_RENESAS #error [NOT_SUPPORTED] Cortex-A target not supported for this test -#endif +#else using namespace utest::v1; @@ -74,3 +74,5 @@ int main() { return !Harness::run(specification); } + +#else // TARGET_RENESAS \ No newline at end of file diff --git a/TESTS/mbed_hal/trng/main.cpp b/TESTS/mbed_hal/trng/main.cpp index 6166219888..38c228a2a4 100644 --- a/TESTS/mbed_hal/trng/main.cpp +++ b/TESTS/mbed_hal/trng/main.cpp @@ -48,7 +48,7 @@ #if !DEVICE_TRNG #error [NOT_SUPPORTED] TRNG API not supported for this target -#endif +#else #define MSG_VALUE_DUMMY "0" #define MSG_VALUE_LEN 64 @@ -284,5 +284,5 @@ int main() return ret; } - +#endif // !DEVICE_TRNG diff --git a/TESTS/mbed_hal/us_ticker/main.cpp b/TESTS/mbed_hal/us_ticker/main.cpp index 7df5f80bfc..f2e79a739d 100644 --- a/TESTS/mbed_hal/us_ticker/main.cpp +++ b/TESTS/mbed_hal/us_ticker/main.cpp @@ -22,7 +22,7 @@ #if !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif +#else using namespace utest::v1; @@ -57,3 +57,5 @@ int main() { return !Harness::run(specification); } + +#endif // !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbed_hal/watchdog/main.cpp b/TESTS/mbed_hal/watchdog/main.cpp index 2b8d58b4af..bbf260d19c 100644 --- a/TESTS/mbed_hal/watchdog/main.cpp +++ b/TESTS/mbed_hal/watchdog/main.cpp @@ -16,7 +16,7 @@ */ #if !DEVICE_WATCHDOG #error [NOT_SUPPORTED] Watchdog not supported for this target -#endif +#else #include "greentea-client/test_env.h" #include "hal/watchdog_api.h" @@ -283,3 +283,5 @@ int main() // Harness will start with a test case index provided by host script. return !Harness::run(specification); } + +#endif // !DEVICE_WATCHDOG \ No newline at end of file diff --git a/TESTS/mbed_hal/watchdog_reset/main.cpp b/TESTS/mbed_hal/watchdog_reset/main.cpp index dddd312186..4f152705ae 100644 --- a/TESTS/mbed_hal/watchdog_reset/main.cpp +++ b/TESTS/mbed_hal/watchdog_reset/main.cpp @@ -16,7 +16,7 @@ */ #if !DEVICE_WATCHDOG #error [NOT_SUPPORTED] Watchdog not supported for this target -#endif +#else #include "greentea-client/test_env.h" #include "utest/utest.h" @@ -305,3 +305,5 @@ int main() // Harness will start with a test case index provided by host script. return !Harness::run(specification); } + +#endif // !DEVICE_WATCHDOG \ No newline at end of file diff --git a/TESTS/mbed_hal/watchdog_timing/main.cpp b/TESTS/mbed_hal/watchdog_timing/main.cpp index a5d7578341..f7b6104172 100644 --- a/TESTS/mbed_hal/watchdog_timing/main.cpp +++ b/TESTS/mbed_hal/watchdog_timing/main.cpp @@ -16,7 +16,7 @@ */ #if !DEVICE_WATCHDOG #error [NOT_SUPPORTED] Watchdog not supported for this target -#endif +#else #include "greentea-client/test_env.h" #include "hal/watchdog_api.h" @@ -160,3 +160,5 @@ int main() // Harness will start with a test case index provided by host script. return !Harness::run(specification); } + +#endif // !DEVICE_WATCHDOG \ No newline at end of file diff --git a/TESTS/mbed_platform/atomic/main.cpp b/TESTS/mbed_platform/atomic/main.cpp index 62d7179147..eba39fdcbd 100644 --- a/TESTS/mbed_platform/atomic/main.cpp +++ b/TESTS/mbed_platform/atomic/main.cpp @@ -20,7 +20,7 @@ #if !MBED_CONF_RTOS_PRESENT #error [NOT_SUPPORTED] test not supported -#endif +#else #define THREAD_STACK 512 @@ -275,3 +275,5 @@ int main() { return !utest::v1::Harness::run(specification); } + +#endif // !MBED_CONF_RTOS_PRESENT \ No newline at end of file diff --git a/TESTS/mbed_platform/crash_reporting/main.cpp b/TESTS/mbed_platform/crash_reporting/main.cpp index d971099c85..2bd132de42 100644 --- a/TESTS/mbed_platform/crash_reporting/main.cpp +++ b/TESTS/mbed_platform/crash_reporting/main.cpp @@ -21,7 +21,7 @@ #if !MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED #error [NOT_SUPPORTED] crash_reporting test not supported -#endif +#else #define MSG_VALUE_DUMMY "0" #define MSG_VALUE_LEN 32 @@ -78,3 +78,5 @@ int main(void) return 0; } + +#endif // !MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED \ No newline at end of file diff --git a/TESTS/mbed_platform/stats_cpu/main.cpp b/TESTS/mbed_platform/stats_cpu/main.cpp index f4c77526fd..6669b5fe01 100644 --- a/TESTS/mbed_platform/stats_cpu/main.cpp +++ b/TESTS/mbed_platform/stats_cpu/main.cpp @@ -23,7 +23,7 @@ #if !defined(MBED_CPU_STATS_ENABLED) || !DEVICE_LPTICKER || !DEVICE_SLEEP #error [NOT_SUPPORTED] test not supported -#endif +#else using namespace utest::v1; @@ -110,3 +110,5 @@ int main() { Harness::run(specification); } + +#endif // !defined(MBED_CPU_STATS_ENABLED) || !DEVICE_LPTICKER || !DEVICE_SLEEP \ No newline at end of file diff --git a/TESTS/mbed_platform/stats_heap/main.cpp b/TESTS/mbed_platform/stats_heap/main.cpp index 163ff20d6c..3ff477f8d2 100644 --- a/TESTS/mbed_platform/stats_heap/main.cpp +++ b/TESTS/mbed_platform/stats_heap/main.cpp @@ -24,7 +24,7 @@ #if !defined(MBED_HEAP_STATS_ENABLED) #error [NOT_SUPPORTED] test not supported -#endif +#else using namespace utest::v1; @@ -207,3 +207,5 @@ int main() { Harness::run(specification); } + +#endif // !defined(MBED_HEAP_STATS_ENABLED) \ No newline at end of file diff --git a/TESTS/mbed_platform/stats_sys/main.cpp b/TESTS/mbed_platform/stats_sys/main.cpp index 0fdbe3849e..aa76a76ba2 100644 --- a/TESTS/mbed_platform/stats_sys/main.cpp +++ b/TESTS/mbed_platform/stats_sys/main.cpp @@ -23,7 +23,7 @@ #if !defined(MBED_SYS_STATS_ENABLED) #error [NOT_SUPPORTED] test not supported -#endif +#else using namespace utest::v1; @@ -105,3 +105,5 @@ int main() { Harness::run(specification); } + +#endif // !defined(MBED_SYS_STATS_ENABLED) \ No newline at end of file diff --git a/TESTS/mbed_platform/stats_thread/main.cpp b/TESTS/mbed_platform/stats_thread/main.cpp index 2a9f62d8f9..1dd3395a2e 100644 --- a/TESTS/mbed_platform/stats_thread/main.cpp +++ b/TESTS/mbed_platform/stats_thread/main.cpp @@ -23,7 +23,7 @@ #if !defined(MBED_THREAD_STATS_ENABLED) #error [NOT_SUPPORTED] test not supported -#endif +#else using namespace utest::v1; @@ -174,3 +174,5 @@ int main() { Harness::run(specification); } + +#endif // !defined(MBED_THREAD_STATS_ENABLED) \ No newline at end of file diff --git a/TESTS/mbed_platform/wait_ns/main.cpp b/TESTS/mbed_platform/wait_ns/main.cpp index 61af4afeae..e9f234a619 100644 --- a/TESTS/mbed_platform/wait_ns/main.cpp +++ b/TESTS/mbed_platform/wait_ns/main.cpp @@ -26,7 +26,7 @@ //FastModels not support timing test #if defined(TARGET_ARM_FM) #error [NOT_SUPPORTED] test not supported -#endif +#else using namespace utest::v1; @@ -99,3 +99,5 @@ int main() { return !Harness::run(specification); } + +#endif // defined(TARGET_ARM_FM) \ No newline at end of file diff --git a/TESTS/mbedmicro-rtos-mbed/basic/main.cpp b/TESTS/mbedmicro-rtos-mbed/basic/main.cpp index e9e3bbf4c0..8669898228 100644 --- a/TESTS/mbedmicro-rtos-mbed/basic/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/basic/main.cpp @@ -19,17 +19,9 @@ #include "utest/utest.h" #include "unity/unity.h" -#if defined(SKIP_TIME_DRIFT_TESTS) +#if defined(SKIP_TIME_DRIFT_TESTS) || defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif - -#if defined(MBED_RTOS_SINGLE_THREAD) -#error [NOT_SUPPORTED] test not supported -#endif - -#if !DEVICE_USTICKER -#error [NOT_SUPPORTED] test not supported -#endif +#else using utest::v1::Case; @@ -123,3 +115,5 @@ int main() { utest::v1::Harness::run(specification); } + +#endif // defined(SKIP_TIME_DRIFT_TESTS) || defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbedmicro-rtos-mbed/condition_variable/main.cpp b/TESTS/mbedmicro-rtos-mbed/condition_variable/main.cpp index 3592f0a93e..30541eef6d 100644 --- a/TESTS/mbedmicro-rtos-mbed/condition_variable/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/condition_variable/main.cpp @@ -19,13 +19,9 @@ #include "utest.h" #include "rtos.h" -#if defined(MBED_RTOS_SINGLE_THREAD) +#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif - -#if !DEVICE_USTICKER -#error [NOT_SUPPORTED] test not supported -#endif +#else using namespace utest::v1; @@ -188,3 +184,5 @@ int main() { return !Harness::run(specification); } + +#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbedmicro-rtos-mbed/event_flags/main.cpp b/TESTS/mbedmicro-rtos-mbed/event_flags/main.cpp index fd57ca98e1..d513b3f229 100644 --- a/TESTS/mbedmicro-rtos-mbed/event_flags/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/event_flags/main.cpp @@ -22,13 +22,9 @@ using utest::v1::Case; -#if defined(MBED_RTOS_SINGLE_THREAD) +#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif - -#if !DEVICE_USTICKER -#error [NOT_SUPPORTED] test not supported -#endif +#else #if defined(__CORTEX_M23) || defined(__CORTEX_M33) #define THREAD_STACK_SIZE 512 @@ -374,3 +370,5 @@ int main() { return !utest::v1::Harness::run(specification); } + +#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbedmicro-rtos-mbed/heap_and_stack/main.cpp b/TESTS/mbedmicro-rtos-mbed/heap_and_stack/main.cpp index c0f6f4cf35..f17543d7ed 100644 --- a/TESTS/mbedmicro-rtos-mbed/heap_and_stack/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/heap_and_stack/main.cpp @@ -15,13 +15,9 @@ * limitations under the License. */ -#if defined(TARGET_CORTEX_A) +#if defined(TARGET_CORTEX_A) || !DEVICE_USTICKER #error [NOT_SUPPORTED] This function not supported for this target -#endif - -#if !DEVICE_USTICKER -#error [NOT_SUPPORTED] test not supported -#endif +#else #include #include @@ -266,3 +262,5 @@ int main() { return !utest::v1::Harness::run(specification); } + +#endif // defined(TARGET_CORTEX_A) || !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbedmicro-rtos-mbed/mail/main.cpp b/TESTS/mbedmicro-rtos-mbed/mail/main.cpp index 1046d1d249..b8b7310e32 100644 --- a/TESTS/mbedmicro-rtos-mbed/mail/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/mail/main.cpp @@ -19,13 +19,9 @@ #include "utest.h" #include "rtos.h" -#if defined(MBED_RTOS_SINGLE_THREAD) +#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif - -#if !DEVICE_USTICKER -#error [NOT_SUPPORTED] test not supported -#endif +#else using namespace utest::v1; @@ -512,3 +508,5 @@ int main() { return !Harness::run(specification); } + +#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbedmicro-rtos-mbed/malloc/main.cpp b/TESTS/mbedmicro-rtos-mbed/malloc/main.cpp index 1a3891ce19..f8c64f8f14 100644 --- a/TESTS/mbedmicro-rtos-mbed/malloc/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/malloc/main.cpp @@ -19,13 +19,9 @@ #include "unity/unity.h" -#if defined(MBED_RTOS_SINGLE_THREAD) +#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif - -#if !DEVICE_USTICKER -#error [NOT_SUPPORTED] test not supported -#endif +#else using utest::v1::Case; @@ -221,3 +217,5 @@ int main() { return !utest::v1::Harness::run(specification); } + +#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbedmicro-rtos-mbed/mutex/main.cpp b/TESTS/mbedmicro-rtos-mbed/mutex/main.cpp index c3cfd3d651..f6868fc496 100644 --- a/TESTS/mbedmicro-rtos-mbed/mutex/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/mutex/main.cpp @@ -19,13 +19,9 @@ #include "utest.h" #include "rtos.h" -#if defined(MBED_RTOS_SINGLE_THREAD) +#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif - -#if !DEVICE_USTICKER -#error [NOT_SUPPORTED] test not supported -#endif +#else using namespace utest::v1; @@ -308,3 +304,5 @@ int main() { return !Harness::run(specification); } + +#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbedmicro-rtos-mbed/queue/main.cpp b/TESTS/mbedmicro-rtos-mbed/queue/main.cpp index 286630bb77..c18e0b702e 100644 --- a/TESTS/mbedmicro-rtos-mbed/queue/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/queue/main.cpp @@ -19,13 +19,9 @@ #include "utest.h" #include "rtos.h" -#if defined(MBED_RTOS_SINGLE_THREAD) +#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif - -#if !DEVICE_USTICKER -#error [NOT_SUPPORTED] test not supported -#endif +#else using namespace utest::v1; @@ -348,3 +344,5 @@ int main() { return !Harness::run(specification); } + +#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbedmicro-rtos-mbed/rtostimer/main.cpp b/TESTS/mbedmicro-rtos-mbed/rtostimer/main.cpp index e184575fa8..6aa7c3093d 100644 --- a/TESTS/mbedmicro-rtos-mbed/rtostimer/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/rtostimer/main.cpp @@ -28,11 +28,11 @@ using namespace utest::v1; #if RESTART_DELAY_MS >= DELAY_MS #error invalid RESTART_DELAY_MS value -#endif +#else #if !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif +#else class Stopwatch: public Timer { private: @@ -357,3 +357,6 @@ int main() { return !Harness::run(specification); } + +#endif // !DEVICE_USTICKER +#endif // RESTART_DELAY_MS >= DELAY_MS \ No newline at end of file diff --git a/TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp b/TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp index 80580ef5ee..c0bfbf82a5 100644 --- a/TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp @@ -21,13 +21,9 @@ using namespace utest::v1; -#if defined(MBED_RTOS_SINGLE_THREAD) +#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif - -#if !DEVICE_USTICKER -#error [NOT_SUPPORTED] test not supported -#endif +#else #define THREAD_DELAY 30 #define SEMAPHORE_SLOTS 2 @@ -249,3 +245,5 @@ int main() { return !Harness::run(specification); } + +#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbedmicro-rtos-mbed/signals/main.cpp b/TESTS/mbedmicro-rtos-mbed/signals/main.cpp index 092d9cd178..d67006c6fd 100644 --- a/TESTS/mbedmicro-rtos-mbed/signals/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/signals/main.cpp @@ -20,13 +20,9 @@ using utest::v1::Case; -#if defined(MBED_RTOS_SINGLE_THREAD) +#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif - -#if !DEVICE_USTICKER -#error [NOT_SUPPORTED] test not supported -#endif +#else #define TEST_STACK_SIZE 512 #define MAX_FLAG_POS 30 @@ -396,3 +392,5 @@ int main() { return !utest::v1::Harness::run(specification); } + +#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/mbedmicro-rtos-mbed/threads/main.cpp b/TESTS/mbedmicro-rtos-mbed/threads/main.cpp index 0d3764b7fd..e92ff4a0ed 100644 --- a/TESTS/mbedmicro-rtos-mbed/threads/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/threads/main.cpp @@ -21,13 +21,9 @@ #include "SynchronizedIntegral.h" #include "LockGuard.h" -#if defined(MBED_RTOS_SINGLE_THREAD) +#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported -#endif - -#if !DEVICE_USTICKER -#error [NOT_SUPPORTED] test not supported -#endif +#else #define THREAD_STACK_SIZE 512 #if defined(__CORTEX_A9) @@ -854,3 +850,5 @@ int main() { return !Harness::run(specification); } + +#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER \ No newline at end of file diff --git a/TESTS/netsocket/dns/main.cpp b/TESTS/netsocket/dns/main.cpp index 20e594885a..7a6f1148e1 100644 --- a/TESTS/netsocket/dns/main.cpp +++ b/TESTS/netsocket/dns/main.cpp @@ -19,7 +19,7 @@ #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \ (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) #error [NOT_SUPPORTED] No network configuration found for this target. -#endif +#else #include "mbed.h" #include "greentea-client/test_env.h" @@ -199,3 +199,5 @@ int main() { return !Harness::run(specification); } + +#endif // !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) \ No newline at end of file diff --git a/TESTS/netsocket/tcp/main.cpp b/TESTS/netsocket/tcp/main.cpp index 2be8adc724..ce9650111d 100644 --- a/TESTS/netsocket/tcp/main.cpp +++ b/TESTS/netsocket/tcp/main.cpp @@ -19,7 +19,7 @@ #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \ (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) #error [NOT_SUPPORTED] No network configuration found for this target. -#endif +#else #include "mbed.h" #include "greentea-client/test_env.h" @@ -30,7 +30,7 @@ #ifndef ECHO_SERVER_ADDR #error [NOT_SUPPORTED] Requires parameters for echo server -#endif +#else using namespace utest::v1; @@ -237,3 +237,6 @@ int main() { return !Harness::run(specification); } + +#endif // ECHO_SERVER_ADDR +#endif // !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) \ No newline at end of file diff --git a/TESTS/netsocket/tls/main.cpp b/TESTS/netsocket/tls/main.cpp index 03eb057436..be28e5e8b8 100644 --- a/TESTS/netsocket/tls/main.cpp +++ b/TESTS/netsocket/tls/main.cpp @@ -19,7 +19,7 @@ #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \ (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) #error [NOT_SUPPORTED] No network configuration found for this target. -#endif +#else #include "mbed.h" #include "greentea-client/test_env.h" @@ -30,7 +30,7 @@ #ifndef ECHO_SERVER_ADDR #error [NOT_SUPPORTED] Requires parameters for echo server -#endif +#else #if defined(MBEDTLS_SSL_CLI_C) || defined(DOXYGEN_ONLY) @@ -276,3 +276,6 @@ int main() #else #error [NOT_SUPPORTED] This device does not support SSL library #endif // defined(MBEDTLS_SSL_CLI_C) || defined(DOXYGEN_ONLY) + +#endif // ECHO_SERVER_ADDR +#endif // !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) \ No newline at end of file diff --git a/TESTS/netsocket/udp/main.cpp b/TESTS/netsocket/udp/main.cpp index d85e2ce85d..c0c3fc928e 100644 --- a/TESTS/netsocket/udp/main.cpp +++ b/TESTS/netsocket/udp/main.cpp @@ -19,7 +19,7 @@ #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \ (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) #error [NOT_SUPPORTED] No network configuration found for this target. -#endif +#else #include "mbed.h" #include "greentea-client/test_env.h" @@ -30,7 +30,7 @@ #ifndef ECHO_SERVER_ADDR #error [NOT_SUPPORTED] Requires parameters for echo server -#endif +#else using namespace utest::v1; @@ -201,3 +201,6 @@ int main() { return !Harness::run(specification); } + +#endif // ECHO_SERVER_ADDR +#endif // !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) \ No newline at end of file diff --git a/TESTS/network/emac/main.cpp b/TESTS/network/emac/main.cpp index ffe7343d24..24362212af 100644 --- a/TESTS/network/emac/main.cpp +++ b/TESTS/network/emac/main.cpp @@ -19,7 +19,7 @@ !defined(MBED_CONF_APP_ECHO_SERVER_TRACE) || \ !defined(MBED_CONF_APP_WIFI_SCAN) #error [NOT_SUPPORTED] Requires parameters from mbed_app.json -#endif +#else #define ETHERNET 1 #define WIFI 2 @@ -27,10 +27,10 @@ #if MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE != ETHERNET && \ MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE != WIFI #error [NOT_SUPPORTED] Either wifi or ethernet testing need to be enabled -#endif +#else -#if MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI -#if !defined(TARGET_UBLOX_EVK_ODIN_W2) && \ +#if (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI) && \ + !defined(TARGET_UBLOX_EVK_ODIN_W2) && \ !defined(TARGET_REALTEK_RTL8195AM) && \ !defined(TARGET_MTB_ADV_WISE_1530) && \ !defined(TARGET_MTB_USI_WM_BN_BM_22) && \ @@ -38,8 +38,9 @@ !defined(TARGET_MTB_UBLOX_ODIN_W2) && \ !defined(TARGET_UNO_91H) #error [NOT_SUPPORTED] Wifi tests are not valid for the target -#endif -#endif +#else + + #include "greentea-client/test_env.h" #include "unity.h" @@ -82,3 +83,14 @@ int main() return !Harness::run(specification); } +#endif // (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI) && \ + !defined(TARGET_UBLOX_EVK_ODIN_W2) && \ + !defined(TARGET_REALTEK_RTL8195AM) && \ + !defined(TARGET_MTB_ADV_WISE_1530) && \ + !defined(TARGET_MTB_USI_WM_BN_BM_22) && \ + !defined(TARGET_MTB_MXCHIP_EMW3166) && \ + !defined(TARGET_MTB_UBLOX_ODIN_W2) && \ + !defined(TARGET_UNO_91H) + +#endif // MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE != ETHERNET && MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE != WIFI +#endif // !defined(MBED_CONF_APP_ECHO_SERVER) || !defined(MBED_CONF_APP_ECHO_SERVER_TRACE) || !defined(MBED_CONF_APP_WIFI_SCAN) \ No newline at end of file diff --git a/TESTS/network/interface/main.cpp b/TESTS/network/interface/main.cpp index 48d3f734e3..1d833118d5 100644 --- a/TESTS/network/interface/main.cpp +++ b/TESTS/network/interface/main.cpp @@ -19,7 +19,7 @@ #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \ (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) #error [NOT_SUPPORTED] No network configuration found for this target. -#endif +#else #include "mbed.h" #include "greentea-client/test_env.h" @@ -54,3 +54,5 @@ int main() { return !Harness::run(specification); } + +#endif // !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) \ No newline at end of file diff --git a/TESTS/network/multihoming/main.cpp b/TESTS/network/multihoming/main.cpp index b645ff5430..b9ce810225 100644 --- a/TESTS/network/multihoming/main.cpp +++ b/TESTS/network/multihoming/main.cpp @@ -19,15 +19,15 @@ #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \ (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) #error [NOT_SUPPORTED] No network configuration found for this target. -#endif +#else #ifndef MBED_CONF_APP_ECHO_SERVER_ADDR #error [NOT_SUPPORTED] Requires parameters from mbed_app.json -#endif +#else #if !defined(DEVICE_EMAC) || \ (!defined(MBED_CONF_APP_WIFI_SECURE_SSID) && !defined(MBED_CONF_APP_WIFI_UNSECURE_SSID)) #error [NOT_SUPPORTED] Both Wifi and Ethernet devices are required for multihoming tests. -#endif +#else #define STRING_VERIFY(str) (str != NULL ? str : "not supported") @@ -164,3 +164,7 @@ int main() { return !Harness::run(specification); } + +#endif // !defined(DEVICE_EMAC) || (!defined(MBED_CONF_APP_WIFI_SECURE_SSID) && !defined(MBED_CONF_APP_WIFI_UNSECURE_SSID)) +#endif // MBED_CONF_APP_ECHO_SERVER_ADDR +#endif // !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) \ No newline at end of file diff --git a/TESTS/network/wifi/get_interface.cpp b/TESTS/network/wifi/get_interface.cpp index ed60ff7226..7afb873c8c 100644 --- a/TESTS/network/wifi/get_interface.cpp +++ b/TESTS/network/wifi/get_interface.cpp @@ -19,10 +19,10 @@ #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \ MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE != WIFI #error [NOT_SUPPORTED] No network configuration found for this target. -#endif +#else #if !defined(MBED_CONF_APP_WIFI_SECURE_SSID) && !defined(MBED_CONF_APP_WIFI_UNSECURE_SSID) #error [NOT_SUPPORTED] Requires parameters from mbed_app.json -#endif +#else #include "mbed.h" #include "WiFiInterface.h" @@ -40,3 +40,5 @@ WiFiInterface *get_interface() return interface; } +#endif //!defined(MBED_CONF_APP_WIFI_SECURE_SSID) && !defined(MBED_CONF_APP_WIFI_UNSECURE_SSID) +#endif //!defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE != WIFI \ No newline at end of file diff --git a/TESTS/network/wifi/main.cpp b/TESTS/network/wifi/main.cpp index 12bf3d766f..98effff8ed 100644 --- a/TESTS/network/wifi/main.cpp +++ b/TESTS/network/wifi/main.cpp @@ -19,7 +19,7 @@ #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \ MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE != WIFI #error [NOT_SUPPORTED] No network configuration found for this target. -#endif +#else #include "mbed.h" #include "greentea-client/test_env.h" @@ -28,25 +28,24 @@ #include "wifi_tests.h" // Test for parameters -#if defined(MBED_CONF_APP_WIFI_SECURE_SSID) -#if !defined(MBED_CONF_APP_AP_MAC_SECURE) || \ +#if defined(MBED_CONF_APP_WIFI_SECURE_SSID) && \ + (!defined(MBED_CONF_APP_AP_MAC_SECURE) || \ !defined(MBED_CONF_APP_MAX_SCAN_SIZE) || \ !defined(MBED_CONF_APP_WIFI_CH_SECURE) || \ !defined(MBED_CONF_APP_WIFI_PASSWORD) || \ !defined(MBED_CONF_APP_WIFI_SECURE_SSID) || \ - !defined MBED_CONF_APP_WIFI_SECURE_PROTOCOL + !defined MBED_CONF_APP_WIFI_SECURE_PROTOCOL) #error [NOT_SUPPORTED] Requires parameters from mbed_app.json (for secure connections) -#endif -#endif // defined(MBED_CONF_APP_WIFI_SECURE_SSID) +#else -#if defined(MBED_CONF_APP_WIFI_UNSECURE_SSID) -#if !defined(MBED_CONF_APP_AP_MAC_UNSECURE) || \ +#if defined(MBED_CONF_APP_WIFI_UNSECURE_SSID) && \ + !defined(MBED_CONF_APP_AP_MAC_UNSECURE) || \ !defined(MBED_CONF_APP_MAX_SCAN_SIZE) || \ !defined(MBED_CONF_APP_WIFI_CH_UNSECURE) || \ !defined(MBED_CONF_APP_WIFI_UNSECURE_SSID) #error [NOT_SUPPORTED] Requires parameters from mbed_app.json (for unsecure connections) -#endif -#endif // defined(MBED_CONF_APP_WIFI_UNSECURE_SSID) +#else + using namespace utest::v1; @@ -93,3 +92,18 @@ int main() { return !Harness::run(specification); } +#endif // defined(MBED_CONF_APP_WIFI_UNSECURE_SSID) && \ + !defined(MBED_CONF_APP_AP_MAC_UNSECURE) || \ + !defined(MBED_CONF_APP_MAX_SCAN_SIZE) || \ + !defined(MBED_CONF_APP_WIFI_CH_UNSECURE) || \ + !defined(MBED_CONF_APP_WIFI_UNSECURE_SSID) + +#endif // defined(MBED_CONF_APP_WIFI_SECURE_SSID) && \ + (!defined(MBED_CONF_APP_AP_MAC_SECURE) || \ + !defined(MBED_CONF_APP_MAX_SCAN_SIZE) || \ + !defined(MBED_CONF_APP_WIFI_CH_SECURE) || \ + !defined(MBED_CONF_APP_WIFI_PASSWORD) || \ + !defined(MBED_CONF_APP_WIFI_SECURE_SSID) || \ + !defined MBED_CONF_APP_WIFI_SECURE_PROTOCOL) + +#endif //!defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE != WIFI \ No newline at end of file diff --git a/TESTS/nfc/eeprom/main.cpp b/TESTS/nfc/eeprom/main.cpp index 4f25ce7483..7d3e73a5c9 100644 --- a/TESTS/nfc/eeprom/main.cpp +++ b/TESTS/nfc/eeprom/main.cpp @@ -25,7 +25,7 @@ #if !MBED_CONF_NFCEEPROM #error [NOT_SUPPORTED] NFC EEPROM not supported for this target -#endif +#else using namespace utest::v1; using namespace mbed::nfc; @@ -497,3 +497,5 @@ int main() { return !Harness::run(specification); } + +#endif // !MBED_CONF_NFCEEPROM \ No newline at end of file diff --git a/TESTS/psa/attestation/main.cpp b/TESTS/psa/attestation/main.cpp index 90113daa1f..c070f70b20 100755 --- a/TESTS/psa/attestation/main.cpp +++ b/TESTS/psa/attestation/main.cpp @@ -20,7 +20,7 @@ #if ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C))) #error [NOT_SUPPORTED] Mbed Crypto is OFF - skipping. -#endif // TARGET_PSA +#else #include "greentea-client/test_env.h" #include "unity/unity.h" @@ -156,3 +156,5 @@ int main() { return !Harness::run(specification); } + +#endif // ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C))) \ No newline at end of file diff --git a/TESTS/psa/crypto_access_control/COMPONENT_NSPE/main.cpp b/TESTS/psa/crypto_access_control/COMPONENT_NSPE/main.cpp index ca848e85af..0cbf2af4af 100644 --- a/TESTS/psa/crypto_access_control/COMPONENT_NSPE/main.cpp +++ b/TESTS/psa/crypto_access_control/COMPONENT_NSPE/main.cpp @@ -19,7 +19,7 @@ #if ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C)) || (!defined(COMPONENT_PSA_SRV_IPC))) #error [NOT_SUPPORTED] These tests can run only on SPM-enabled targets and where Mbed Crypto is ON - skipping. -#endif +#else #include #include "mbed.h" @@ -594,3 +594,5 @@ int main(void) { return !Harness::run(specification); } + +#endif // ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C)) || (!defined(COMPONENT_PSA_SRV_IPC))) \ No newline at end of file diff --git a/TESTS/psa/crypto_init/main.cpp b/TESTS/psa/crypto_init/main.cpp index b057cd501e..89ff20d553 100644 --- a/TESTS/psa/crypto_init/main.cpp +++ b/TESTS/psa/crypto_init/main.cpp @@ -20,7 +20,7 @@ #if ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C))) #error [NOT_SUPPORTED] Mbed Crypto is OFF - skipping. -#endif // TARGET_PSA +#else #include "greentea-client/test_env.h" #include "unity/unity.h" @@ -112,3 +112,5 @@ int main() #endif return !Harness::run(specification); } + +#endif // ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C))) \ No newline at end of file diff --git a/TESTS/psa/entropy_inject/main.cpp b/TESTS/psa/entropy_inject/main.cpp index da3898c7d9..7df9686400 100644 --- a/TESTS/psa/entropy_inject/main.cpp +++ b/TESTS/psa/entropy_inject/main.cpp @@ -18,7 +18,7 @@ #if ((!defined(TARGET_PSA) || (!defined(COMPONENT_PSA_SRV_IPC)) && !defined(MBEDTLS_ENTROPY_NV_SEED))) #error [NOT_SUPPORTED] PSA entropy injection tests can run only on PSA-enabled targets. -#endif // TARGET_PSA +#else #include "greentea-client/test_env.h" #include "unity/unity.h" @@ -182,3 +182,5 @@ int main() { return !Harness::run(specification); } + +#endif // ((!defined(TARGET_PSA) || (!defined(COMPONENT_PSA_SRV_IPC)) && !defined(MBEDTLS_ENTROPY_NV_SEED))) \ No newline at end of file diff --git a/TESTS/psa/its_ps/main.cpp b/TESTS/psa/its_ps/main.cpp index 7aab27ad64..e29a1b6ba7 100644 --- a/TESTS/psa/its_ps/main.cpp +++ b/TESTS/psa/its_ps/main.cpp @@ -18,7 +18,7 @@ #ifndef TARGET_PSA #error [NOT_SUPPORTED] ITS/PS tests can run only on PSA-enabled targets. -#endif // TARGET_PSA +#else #include "greentea-client/test_env.h" #include "unity/unity.h" @@ -196,3 +196,5 @@ int main() { return !Harness::run(specification); } + +#endif // TARGET_PSA \ No newline at end of file diff --git a/TESTS/psa/spm_client/COMPONENT_NSPE/main.cpp b/TESTS/psa/spm_client/COMPONENT_NSPE/main.cpp index 535cb3c338..a72986a97c 100644 --- a/TESTS/psa/spm_client/COMPONENT_NSPE/main.cpp +++ b/TESTS/psa/spm_client/COMPONENT_NSPE/main.cpp @@ -17,7 +17,7 @@ #ifndef COMPONENT_PSA_SRV_IPC #error [NOT_SUPPORTED] SPM tests can run only on SPM-enabled targets -#endif // COMPONENT_PSA_SRV_IPC +#else #include "mbed.h" #include "greentea-client/test_env.h" @@ -486,3 +486,5 @@ int main() Harness::run(specification); return 0; } + +#endif // COMPONENT_PSA_SRV_IPC \ No newline at end of file diff --git a/TESTS/psa/spm_server/COMPONENT_NSPE/main.cpp b/TESTS/psa/spm_server/COMPONENT_NSPE/main.cpp index 1a47cbea6b..4685e6a67f 100644 --- a/TESTS/psa/spm_server/COMPONENT_NSPE/main.cpp +++ b/TESTS/psa/spm_server/COMPONENT_NSPE/main.cpp @@ -17,7 +17,7 @@ #ifndef COMPONENT_PSA_SRV_IPC #error [NOT_SUPPORTED] SPM tests can run only on SPM-enabled targets -#endif // COMPONENT_PSA_SRV_IPC +#else #include "mbed.h" #include "greentea-client/test_env.h" @@ -275,3 +275,5 @@ int main(int, char **) Harness::run(specification); return 0; } + +#endif // COMPONENT_PSA_SRV_IPC \ No newline at end of file diff --git a/TESTS/psa/spm_smoke/COMPONENT_NSPE/main.cpp b/TESTS/psa/spm_smoke/COMPONENT_NSPE/main.cpp index d3130eeecd..f175685ec1 100644 --- a/TESTS/psa/spm_smoke/COMPONENT_NSPE/main.cpp +++ b/TESTS/psa/spm_smoke/COMPONENT_NSPE/main.cpp @@ -18,7 +18,7 @@ #ifndef COMPONENT_PSA_SRV_IPC #error [NOT_SUPPORTED] SPM tests can run only on SPM-enabled targets -#endif // COMPONENT_PSA_SRV_IPC +#else /* -------------------------------------- Includes ----------------------------------- */ @@ -91,3 +91,5 @@ int main(int, char **) Harness::run(specification); return 0; } + +#endif // COMPONENT_PSA_SRV_IPC \ No newline at end of file diff --git a/TESTS/usb_device/basic/main.cpp b/TESTS/usb_device/basic/main.cpp index 533a9be9a6..668be08f35 100644 --- a/TESTS/usb_device/basic/main.cpp +++ b/TESTS/usb_device/basic/main.cpp @@ -40,7 +40,7 @@ #if !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE #error [NOT_SUPPORTED] USB Device not supported for this target -#endif +#else using namespace utest::v1; @@ -658,3 +658,5 @@ int main() { Harness::run(specification); } + +#endif // !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE \ No newline at end of file diff --git a/TESTS/usb_device/hid/main.cpp b/TESTS/usb_device/hid/main.cpp index 44aa1ea83c..59563a8384 100644 --- a/TESTS/usb_device/hid/main.cpp +++ b/TESTS/usb_device/hid/main.cpp @@ -16,7 +16,7 @@ */ #if !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE #error [NOT_SUPPORTED] USB Device not supported for this target -#endif +#else #include "greentea-client/test_env.h" #include "utest/utest.h" @@ -382,3 +382,5 @@ int main() { return !Harness::run(specification); } + +#endif // !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE \ No newline at end of file diff --git a/TESTS/usb_device/msd/main.cpp b/TESTS/usb_device/msd/main.cpp index a634958802..0a859fecca 100644 --- a/TESTS/usb_device/msd/main.cpp +++ b/TESTS/usb_device/msd/main.cpp @@ -31,7 +31,7 @@ #if !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE #error [NOT_SUPPORTED] USB Device not supported for this target -#endif +#else #define OS_WINDOWS 1 @@ -480,3 +480,5 @@ int main() { Harness::run(specification); } + +#endif // !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE \ No newline at end of file diff --git a/TESTS/usb_device/serial/main.cpp b/TESTS/usb_device/serial/main.cpp index c6c804a191..6549b7b994 100644 --- a/TESTS/usb_device/serial/main.cpp +++ b/TESTS/usb_device/serial/main.cpp @@ -16,7 +16,7 @@ */ #if !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE #error [NOT_SUPPORTED] USB Device not supported for this target -#endif +#else #include "greentea-client/test_env.h" #include "utest/utest.h" @@ -845,3 +845,5 @@ int main() { return !Harness::run(specification); } + +#endif // !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE \ No newline at end of file diff --git a/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/fopen/fopen.cpp b/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/fopen/fopen.cpp index bc8093d164..36f3043186 100644 --- a/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/fopen/fopen.cpp +++ b/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/fopen/fopen.cpp @@ -68,7 +68,9 @@ using namespace utest::v1; * <<< lines removed >>> */ -#if DEVICE_SPI && ( defined(MBED_CONF_APP_FSFAT_SDCARD_INSTALLED) || (MBED_CONF_SD_FSFAT_SDCARD_INSTALLED)) +#if !(DEVICE_SPI && ( defined(MBED_CONF_APP_FSFAT_SDCARD_INSTALLED) || (MBED_CONF_SD_FSFAT_SDCARD_INSTALLED))) +#error [NOT_SUPPORTED] DEVICE_SPI need to be enabled for this test. SDcard need to be installed for this test. +#else static char fsfat_fopen_utest_msg_g[FSFAT_UTEST_MSG_BUF_SIZE]; #define FSFAT_FOPEN_TEST_MOUNT_PT_NAME "sd" #define FSFAT_FOPEN_TEST_MOUNT_PT_PATH "/" FSFAT_FOPEN_TEST_MOUNT_PT_NAME @@ -1553,54 +1555,6 @@ control_t fsfat_fopen_test_16(const size_t call_count) return CaseNext; } - -#else - -#define FSFAT_FOPEN_TEST_00 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_01 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_02 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_03 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_04 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_05 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_06 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_07 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_08 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_09 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_10 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_11 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_12 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_13 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_14 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_15 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_16 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_17 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_18 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_19 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_20 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_21 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_22 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_23 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_24 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_25 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_26 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_27 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_28 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_29 fsfat_fopen_test_dummy -#define FSFAT_FOPEN_TEST_30 fsfat_fopen_test_dummy - -/** @brief fsfat_fopen_test_dummy Dummy test case for testing when platform doesnt have an SDCard installed. - * - * @return success always - */ -static control_t fsfat_fopen_test_dummy() -{ - printf("Null test\n"); - return CaseNext; -} - -#endif - - /// @cond FSFAT_DOXYGEN_DISABLE utest::v1::status_t greentea_setup(const size_t number_of_cases) { @@ -1641,3 +1595,4 @@ int main() return !Harness::run(specification); } /// @endcond +#endif // !(DEVICE_SPI && ( defined(MBED_CONF_APP_FSFAT_SDCARD_INSTALLED) || (MBED_CONF_SD_FSFAT_SDCARD_INSTALLED))) \ No newline at end of file diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/TESTS/cordio_hci/transport/main.cpp b/features/FEATURE_BLE/targets/TARGET_CORDIO/TESTS/cordio_hci/transport/main.cpp index e5ee4bc235..39ec6be8db 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/TESTS/cordio_hci/transport/main.cpp +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/TESTS/cordio_hci/transport/main.cpp @@ -35,7 +35,7 @@ extern ble::vendor::cordio::CordioHCIDriver& ble_cordio_get_hci_driver(); #if CORDIO_ZERO_COPY_HCI #error [NOT_SUPPORTED] Test not relevant for zero copy hci. -#endif +#else namespace ble { namespace vendor { @@ -270,3 +270,4 @@ Specification specification(greentea_test_setup, cases, greentea_test_teardown_h int main() { return !Harness::run(specification); } +#endif // CORDIO_ZERO_COPY_HCI \ No newline at end of file diff --git a/features/cellular/TESTS/api/cellular_device/main.cpp b/features/cellular/TESTS/api/cellular_device/main.cpp index bc925cc86a..c6fd0fe2d5 100644 --- a/features/cellular/TESTS/api/cellular_device/main.cpp +++ b/features/cellular/TESTS/api/cellular_device/main.cpp @@ -15,13 +15,10 @@ * limitations under the License. */ -#if !defined(MBED_CONF_NSAPI_PRESENT) -#error [NOT_SUPPORTED] A json configuration file is needed. Skipping this build. -#endif +#if !defined(MBED_CONF_NSAPI_PRESENT) || !defined(MBED_CONF_APP_CELLULAR_SIM_PIN) +#error [NOT_SUPPORTED] A json configuration file is needed & SIM pin code is needed. Skipping this build. +#else -#ifndef MBED_CONF_APP_CELLULAR_SIM_PIN -#error [NOT_SUPPORTED] SIM pin code is needed. Skipping this build. -#endif #include "greentea-client/test_env.h" #include "unity.h" @@ -221,3 +218,4 @@ int main() return ret; } +#endif !defined(MBED_CONF_NSAPI_PRESENT) || !defined(MBED_CONF_APP_CELLULAR_SIM_PIN) \ No newline at end of file diff --git a/features/cellular/TESTS/api/cellular_information/main.cpp b/features/cellular/TESTS/api/cellular_information/main.cpp index 64052d29fc..a3b03a4cf2 100644 --- a/features/cellular/TESTS/api/cellular_information/main.cpp +++ b/features/cellular/TESTS/api/cellular_information/main.cpp @@ -16,16 +16,12 @@ */ -#if !defined(MBED_CONF_NSAPI_PRESENT) -#error [NOT_SUPPORTED] A json configuration file is needed. Skipping this build. -#endif +#if !defined(MBED_CONF_NSAPI_PRESENT) || !defined(MBED_CONF_APP_CELLULAR_SIM_PIN) +#error [NOT_SUPPORTED] A json configuration file is needed & SIM pin code is needed. Skipping this build. +#else #include "CellularUtil.h" // for CELLULAR_ helper macros -#ifndef MBED_CONF_APP_CELLULAR_SIM_PIN -#error [NOT_SUPPORTED] SIM pin code is needed. Skipping this build. -#endif - #include "greentea-client/test_env.h" #include "unity.h" #include "utest.h" @@ -118,3 +114,4 @@ int main() #endif return ret; } +#endif // !defined(MBED_CONF_NSAPI_PRESENT) || !defined(MBED_CONF_APP_CELLULAR_SIM_PIN) \ No newline at end of file diff --git a/features/cellular/TESTS/api/cellular_network/main.cpp b/features/cellular/TESTS/api/cellular_network/main.cpp index 050b2ab119..b21c44c926 100644 --- a/features/cellular/TESTS/api/cellular_network/main.cpp +++ b/features/cellular/TESTS/api/cellular_network/main.cpp @@ -16,13 +16,9 @@ */ -#if !defined(MBED_CONF_NSAPI_PRESENT) -#error [NOT_SUPPORTED] A json configuration file is needed. Skipping this build. -#endif - -#ifndef MBED_CONF_APP_CELLULAR_SIM_PIN -#error [NOT_SUPPORTED] SIM pin code is needed. Skipping this build. -#endif +#if !defined(MBED_CONF_NSAPI_PRESENT) || !defined(MBED_CONF_APP_CELLULAR_SIM_PIN) +#error [NOT_SUPPORTED] A json configuration file is needed & SIM pin code is needed. Skipping this build. +#else #include "greentea-client/test_env.h" #include "unity.h" @@ -252,3 +248,4 @@ int main() #endif return ret; } +#endif // !defined(MBED_CONF_NSAPI_PRESENT) || !defined(MBED_CONF_APP_CELLULAR_SIM_PIN) diff --git a/features/cellular/TESTS/api/cellular_sms/main.cpp b/features/cellular/TESTS/api/cellular_sms/main.cpp index 79390bc0d6..5dd64f81f4 100644 --- a/features/cellular/TESTS/api/cellular_sms/main.cpp +++ b/features/cellular/TESTS/api/cellular_sms/main.cpp @@ -16,17 +16,13 @@ */ -#if !defined(MBED_CONF_NSAPI_PRESENT) -#error [NOT_SUPPORTED] A json configuration file is needed. Skipping this build. -#endif - -#ifndef MBED_CONF_APP_CELLULAR_SIM_PIN -#error [NOT_SUPPORTED] SIM pin code is needed. Skipping this build. -#endif +#if !defined(MBED_CONF_NSAPI_PRESENT) || !defined(MBED_CONF_APP_CELLULAR_SIM_PIN) +#error [NOT_SUPPORTED] A json configuration file is needed & SIM pin code is needed. Skipping this build. +#else #if defined(TARGET_ADV_WISE_1570) || defined(TARGET_MTB_ADV_WISE_1570) #error [NOT_SUPPORTED] target MTB_ADV_WISE_1570 does not have SMS functionality -#endif +#else #include "greentea-client/test_env.h" #include "unity.h" @@ -260,3 +256,6 @@ int main() #endif return ret; } + +#endif //defined(TARGET_ADV_WISE_1570) || defined(TARGET_MTB_ADV_WISE_1570) +#endif // !defined(MBED_CONF_NSAPI_PRESENT) || !defined(MBED_CONF_APP_CELLULAR_SIM_PIN) \ No newline at end of file diff --git a/features/cellular/TESTS/socket/udp/main.cpp b/features/cellular/TESTS/socket/udp/main.cpp index 9a9c67ea38..7573037277 100644 --- a/features/cellular/TESTS/socket/udp/main.cpp +++ b/features/cellular/TESTS/socket/udp/main.cpp @@ -15,16 +15,12 @@ * limitations under the License. */ -#if !defined(MBED_CONF_NSAPI_PRESENT) -#error [NOT_SUPPORTED] A json configuration file is needed. Skipping this build. -#endif +#if !defined(MBED_CONF_NSAPI_PRESENT) || !defined(MBED_CONF_APP_CELLULAR_SIM_PIN) +#error [NOT_SUPPORTED] A json configuration file is needed & SIM pin code is needed. Skipping this build. +#else #include "CellularUtil.h" // for CELLULAR_ helper macros -#ifndef MBED_CONF_APP_CELLULAR_SIM_PIN -#error [NOT_SUPPORTED] SIM pin code is needed. Skipping this build. -#endif - #include "greentea-client/test_env.h" #include "unity.h" #include "utest.h" @@ -218,3 +214,4 @@ int main() #endif return ret; } +#endif // !defined(MBED_CONF_NSAPI_PRESENT) || !defined(MBED_CONF_APP_CELLULAR_SIM_PIN) \ No newline at end of file diff --git a/features/device_key/TESTS/device_key/functionality/main.cpp b/features/device_key/TESTS/device_key/functionality/main.cpp index 7be7afabf8..ea27674a04 100644 --- a/features/device_key/TESTS/device_key/functionality/main.cpp +++ b/features/device_key/TESTS/device_key/functionality/main.cpp @@ -29,7 +29,7 @@ using namespace mbed; #if !DEVICEKEY_ENABLED #error [NOT_SUPPORTED] DeviceKey needs to be enabled for this test -#endif +#else #define MSG_VALUE_DUMMY "0" #define MSG_VALUE_LEN 32 @@ -499,3 +499,4 @@ int main() return ret; } +#endif // !DEVICEKEY_ENABLED \ No newline at end of file diff --git a/features/storage/TESTS/blockdevice/heap_block_device/main.cpp b/features/storage/TESTS/blockdevice/heap_block_device/main.cpp index fe65308a3b..ef50dcf4cc 100644 --- a/features/storage/TESTS/blockdevice/heap_block_device/main.cpp +++ b/features/storage/TESTS/blockdevice/heap_block_device/main.cpp @@ -26,7 +26,7 @@ using namespace utest::v1; // TODO HACK, replace with available ram/heap property #if defined(TARGET_MTB_MTS_XDOT) #error [NOT_SUPPORTED] Insufficient heap for heap block device tests -#endif +#else #define TEST_BLOCK_SIZE 128 #define TEST_BLOCK_DEVICE_SIZE 32*TEST_BLOCK_SIZE @@ -186,3 +186,5 @@ int main() { return !Harness::run(specification); } + +#endif // defined(TARGET_MTB_MTS_XDOT) \ No newline at end of file diff --git a/features/storage/TESTS/blockdevice/mbr_block_device/main.cpp b/features/storage/TESTS/blockdevice/mbr_block_device/main.cpp index 489107b5ad..074a182ea6 100644 --- a/features/storage/TESTS/blockdevice/mbr_block_device/main.cpp +++ b/features/storage/TESTS/blockdevice/mbr_block_device/main.cpp @@ -27,7 +27,7 @@ using namespace utest::v1; // TODO HACK, replace with available ram/heap property #if defined(TARGET_MTB_MTS_XDOT) #error [NOT_SUPPORTED] Insufficient heap for heap block device tests -#endif +#else #define BLOCK_COUNT 16 #define BLOCK_SIZE 512 @@ -250,3 +250,5 @@ int main() { return !Harness::run(specification); } + +#endif // defined(TARGET_MTB_MTS_XDOT) \ No newline at end of file diff --git a/features/storage/TESTS/blockdevice/util_block_device/main.cpp b/features/storage/TESTS/blockdevice/util_block_device/main.cpp index 0f0fe103af..fd96f98481 100644 --- a/features/storage/TESTS/blockdevice/util_block_device/main.cpp +++ b/features/storage/TESTS/blockdevice/util_block_device/main.cpp @@ -29,7 +29,7 @@ using namespace utest::v1; // TODO HACK, replace with available ram/heap property #if defined(TARGET_MTB_MTS_XDOT) #error [NOT_SUPPORTED] Insufficient heap for heap block device tests -#endif +#else #define BLOCK_COUNT 16 #define BLOCK_SIZE 512 @@ -308,3 +308,5 @@ int main() { return !Harness::run(specification); } + +#endif // defined(TARGET_MTB_MTS_XDOT) \ No newline at end of file diff --git a/features/storage/TESTS/filesystem/fat_filesystem/main.cpp b/features/storage/TESTS/filesystem/fat_filesystem/main.cpp index 86f7b68dd1..7876a11cd6 100644 --- a/features/storage/TESTS/filesystem/fat_filesystem/main.cpp +++ b/features/storage/TESTS/filesystem/fat_filesystem/main.cpp @@ -27,7 +27,7 @@ using namespace utest::v1; #ifndef MBED_EXTENDED_TESTS #error [NOT_SUPPORTED] Filesystem tests not supported by default -#endif +#else static const int mem_alloc_threshold = 32 * 1024; @@ -189,3 +189,5 @@ int main() { return !Harness::run(specification); } + +#endif // MBED_EXTENDED_TESTS \ No newline at end of file diff --git a/features/storage/TESTS/filesystem/general_filesystem/main.cpp b/features/storage/TESTS/filesystem/general_filesystem/main.cpp index 732d0ca94e..1995a9c5a3 100644 --- a/features/storage/TESTS/filesystem/general_filesystem/main.cpp +++ b/features/storage/TESTS/filesystem/general_filesystem/main.cpp @@ -30,6 +30,7 @@ #error [NOT_SUPPORTED] storage test not supported on this platform #endif +#if COMPONENT_SPIF || COMPONENT_SD using namespace utest::v1; using namespace mbed; @@ -2105,3 +2106,5 @@ int main() { return !Harness::run(specification); } + +#endif // COMPONENT_SPIF || COMPONENT_SD \ No newline at end of file diff --git a/features/storage/TESTS/filesystem/multipart_fat_filesystem/main.cpp b/features/storage/TESTS/filesystem/multipart_fat_filesystem/main.cpp index 8f983ba5bf..6bcb02d399 100644 --- a/features/storage/TESTS/filesystem/multipart_fat_filesystem/main.cpp +++ b/features/storage/TESTS/filesystem/multipart_fat_filesystem/main.cpp @@ -29,7 +29,7 @@ using namespace utest::v1; #ifndef MBED_EXTENDED_TESTS #error [NOT_SUPPORTED] Filesystem tests not supported by default -#endif +#else static const int mem_alloc_threshold = 32 * 1024; @@ -304,3 +304,5 @@ int main() { return !Harness::run(specification); } + +#endif // MBED_EXTENDED_TESTS \ No newline at end of file diff --git a/features/storage/TESTS/kvstore/direct_access_devicekey_test/main.cpp b/features/storage/TESTS/kvstore/direct_access_devicekey_test/main.cpp index 3c31f6859f..53505feca6 100644 --- a/features/storage/TESTS/kvstore/direct_access_devicekey_test/main.cpp +++ b/features/storage/TESTS/kvstore/direct_access_devicekey_test/main.cpp @@ -17,7 +17,7 @@ #ifndef COMPONENT_FLASHIAP #error [NOT_SUPPORTED] Target must have internal FlashIAP for this test -#endif +#else #include "mbed.h" #include @@ -360,3 +360,5 @@ int main() { return !Harness::run(specification); } + +#endif // COMPONENT_FLASHIAP \ No newline at end of file diff --git a/features/storage/TESTS/kvstore/filesystemstore_tests/main.cpp b/features/storage/TESTS/kvstore/filesystemstore_tests/main.cpp index f13ee3f309..8da7f76eb2 100644 --- a/features/storage/TESTS/kvstore/filesystemstore_tests/main.cpp +++ b/features/storage/TESTS/kvstore/filesystemstore_tests/main.cpp @@ -29,7 +29,7 @@ #if !defined(TARGET_K64F) && !defined(TARGET_ARM_FM) #error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices and Fastmodels -#endif +#else #define FSST_TEST_NUM_OF_THREADS 5 @@ -521,3 +521,4 @@ int main() return !Harness::run(specification); } +#endif // !defined(TARGET_K64F) && !defined(TARGET_ARM_FM) \ No newline at end of file diff --git a/features/storage/TESTS/kvstore/general_tests_phase_1/main.cpp b/features/storage/TESTS/kvstore/general_tests_phase_1/main.cpp index 4ff52eb1e4..770d33d932 100644 --- a/features/storage/TESTS/kvstore/general_tests_phase_1/main.cpp +++ b/features/storage/TESTS/kvstore/general_tests_phase_1/main.cpp @@ -31,7 +31,7 @@ using namespace mbed; #if !defined(TARGET_K64F) && !defined(TARGET_ARM_FM) #error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices and Fastmodels -#endif +#else static const char data[] = "data"; static const char key[] = "key"; @@ -855,3 +855,5 @@ int main() return !Harness::run(specification); } + +#endif // !defined(TARGET_K64F) && !defined(TARGET_ARM_FM) \ No newline at end of file diff --git a/features/storage/TESTS/kvstore/general_tests_phase_2/main.cpp b/features/storage/TESTS/kvstore/general_tests_phase_2/main.cpp index 4f701d9734..a48aaf88f4 100644 --- a/features/storage/TESTS/kvstore/general_tests_phase_2/main.cpp +++ b/features/storage/TESTS/kvstore/general_tests_phase_2/main.cpp @@ -31,7 +31,7 @@ using namespace mbed; #if !defined(TARGET_K64F) && !defined(TARGET_ARM_FM) #error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices and Fastmodels -#endif +#else static const char data[] = "data"; static const char key[] = "key"; @@ -858,3 +858,5 @@ int main() return !Harness::run(specification); } + +#endif // !defined(TARGET_K64F) && !defined(TARGET_ARM_FM) \ No newline at end of file diff --git a/features/storage/TESTS/kvstore/securestore_whitebox/main.cpp b/features/storage/TESTS/kvstore/securestore_whitebox/main.cpp index de8a628230..717a95651e 100644 --- a/features/storage/TESTS/kvstore/securestore_whitebox/main.cpp +++ b/features/storage/TESTS/kvstore/securestore_whitebox/main.cpp @@ -34,13 +34,9 @@ #include #include -#if !defined(TARGET_K64F) && !defined(TARGET_ARM_FM) -#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices and Fastmodels -#endif - -#if !SECURESTORE_ENABLED -#error [NOT_SUPPORTED] KVStore & SecureStore need to be enabled for this test -#endif +#if (!defined(TARGET_K64F) && !defined(TARGET_ARM_FM)) || !SECURESTORE_ENABLED +#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices and Fastmodels. KVStore & SecureStore need to be enabled for this test +#else using namespace mbed; @@ -534,3 +530,5 @@ int main() { return !Harness::run(specification); } + +#endif // (!defined(TARGET_K64F) && !defined(TARGET_ARM_FM)) || !SECURESTORE_ENABLED \ No newline at end of file diff --git a/features/storage/filesystem/littlefs/TESTS/filesystem/dirs/main.cpp b/features/storage/filesystem/littlefs/TESTS/filesystem/dirs/main.cpp index 8225baba11..082c962b2b 100644 --- a/features/storage/filesystem/littlefs/TESTS/filesystem/dirs/main.cpp +++ b/features/storage/filesystem/littlefs/TESTS/filesystem/dirs/main.cpp @@ -32,7 +32,7 @@ using namespace utest::v1; #ifndef MBED_TEST_BLOCKDEVICE #error [NOT_SUPPORTED] Non-volatile block device required -#endif +#else #ifndef MBED_TEST_BLOCKDEVICE_DECL #define MBED_TEST_BLOCKDEVICE_DECL MBED_TEST_BLOCKDEVICE bd @@ -681,3 +681,5 @@ int main() { return !Harness::run(specification); } + +#endif // MBED_TEST_BLOCKDEVICE \ No newline at end of file diff --git a/features/storage/filesystem/littlefs/TESTS/filesystem/files/main.cpp b/features/storage/filesystem/littlefs/TESTS/filesystem/files/main.cpp index e852a0ee7b..54837b6425 100644 --- a/features/storage/filesystem/littlefs/TESTS/filesystem/files/main.cpp +++ b/features/storage/filesystem/littlefs/TESTS/filesystem/files/main.cpp @@ -33,7 +33,7 @@ using namespace utest::v1; #ifndef MBED_TEST_BLOCKDEVICE #error [NOT_SUPPORTED] Non-volatile block device required -#endif +#else #ifndef MBED_TEST_BLOCKDEVICE_DECL #define MBED_TEST_BLOCKDEVICE_DECL MBED_TEST_BLOCKDEVICE bd @@ -447,3 +447,5 @@ int main() { return !Harness::run(specification); } + +#endif // MBED_TEST_BLOCKDEVICE \ No newline at end of file diff --git a/features/storage/filesystem/littlefs/TESTS/filesystem/interspersed/main.cpp b/features/storage/filesystem/littlefs/TESTS/filesystem/interspersed/main.cpp index 51f198af4e..81025125e9 100644 --- a/features/storage/filesystem/littlefs/TESTS/filesystem/interspersed/main.cpp +++ b/features/storage/filesystem/littlefs/TESTS/filesystem/interspersed/main.cpp @@ -33,7 +33,7 @@ using namespace utest::v1; #ifndef MBED_TEST_BLOCKDEVICE #error [NOT_SUPPORTED] Non-volatile block device required -#endif +#else #ifndef MBED_TEST_BLOCKDEVICE_DECL #define MBED_TEST_BLOCKDEVICE_DECL MBED_TEST_BLOCKDEVICE bd @@ -405,3 +405,5 @@ int main() { return !Harness::run(specification); } + +#endif // MBED_TEST_BLOCKDEVICE \ No newline at end of file diff --git a/features/storage/filesystem/littlefs/TESTS/filesystem/seek/main.cpp b/features/storage/filesystem/littlefs/TESTS/filesystem/seek/main.cpp index 0b41321c31..e1a2ba0d84 100644 --- a/features/storage/filesystem/littlefs/TESTS/filesystem/seek/main.cpp +++ b/features/storage/filesystem/littlefs/TESTS/filesystem/seek/main.cpp @@ -33,7 +33,7 @@ using namespace utest::v1; #ifndef MBED_TEST_BLOCKDEVICE #error [NOT_SUPPORTED] Non-volatile block device required -#endif +#else #ifndef MBED_TEST_BLOCKDEVICE_DECL #define MBED_TEST_BLOCKDEVICE_DECL MBED_TEST_BLOCKDEVICE bd @@ -641,3 +641,5 @@ int main() { return !Harness::run(specification); } + +#endif // MBED_TEST_BLOCKDEVICE \ No newline at end of file diff --git a/features/storage/filesystem/littlefs/TESTS/filesystem_integration/format/main.cpp b/features/storage/filesystem/littlefs/TESTS/filesystem_integration/format/main.cpp index eab5359c68..beac8a50ca 100644 --- a/features/storage/filesystem/littlefs/TESTS/filesystem_integration/format/main.cpp +++ b/features/storage/filesystem/littlefs/TESTS/filesystem_integration/format/main.cpp @@ -33,7 +33,7 @@ using namespace utest::v1; #ifndef MBED_TEST_BLOCKDEVICE #error [NOT_SUPPORTED] Non-volatile block device required -#endif +#else #ifndef MBED_TEST_BLOCKDEVICE_DECL #define MBED_TEST_BLOCKDEVICE_DECL MBED_TEST_BLOCKDEVICE bd @@ -197,3 +197,5 @@ int main() { return !Harness::run(specification); } + +#endif // MBED_TEST_BLOCKDEVICE \ No newline at end of file diff --git a/features/storage/filesystem/littlefs/TESTS/filesystem_recovery/resilience/main.cpp b/features/storage/filesystem/littlefs/TESTS/filesystem_recovery/resilience/main.cpp index 802fb65a84..266ef0e413 100644 --- a/features/storage/filesystem/littlefs/TESTS/filesystem_recovery/resilience/main.cpp +++ b/features/storage/filesystem/littlefs/TESTS/filesystem_recovery/resilience/main.cpp @@ -26,7 +26,7 @@ using namespace utest::v1; // test configuration #ifndef MBED_TEST_SIM_BLOCKDEVICE #error [NOT_SUPPORTED] Simulation block device required for resilience tests -#endif +#else #ifndef MBED_TEST_SIM_BLOCKDEVICE_DECL #define MBED_TEST_SIM_BLOCKDEVICE_DECL MBED_TEST_SIM_BLOCKDEVICE bd(MBED_TEST_BLOCK_COUNT*512, 1, 1, 512) @@ -102,3 +102,5 @@ int main() { Harness::run(specification); } + +#endif // MBED_TEST_SIM_BLOCKDEVICE \ No newline at end of file diff --git a/features/storage/filesystem/littlefs/TESTS/filesystem_recovery/resilience_functional/main.cpp b/features/storage/filesystem/littlefs/TESTS/filesystem_recovery/resilience_functional/main.cpp index f0ea4afe23..b693cd6ebc 100644 --- a/features/storage/filesystem/littlefs/TESTS/filesystem_recovery/resilience_functional/main.cpp +++ b/features/storage/filesystem/littlefs/TESTS/filesystem_recovery/resilience_functional/main.cpp @@ -30,7 +30,7 @@ using namespace utest::v1; // test configuration #ifndef MBED_TEST_BLOCKDEVICE #error [NOT_SUPPORTED] Non-volatile block device required for resilience_functional tests -#endif +#else #ifndef MBED_TEST_BLOCKDEVICE_DECL #define MBED_TEST_BLOCKDEVICE_DECL MBED_TEST_BLOCKDEVICE bd @@ -117,3 +117,5 @@ int main() GREENTEA_TESTSUITE_RESULT(CMD_STATUS_PASS == cmd_status); } + +#endif // MBED_TEST_BLOCKDEVICE \ No newline at end of file diff --git a/features/storage/filesystem/littlefs/TESTS/filesystem_recovery/wear_leveling/main.cpp b/features/storage/filesystem/littlefs/TESTS/filesystem_recovery/wear_leveling/main.cpp index a9b8973ce8..14b794fc2f 100644 --- a/features/storage/filesystem/littlefs/TESTS/filesystem_recovery/wear_leveling/main.cpp +++ b/features/storage/filesystem/littlefs/TESTS/filesystem_recovery/wear_leveling/main.cpp @@ -27,7 +27,7 @@ using namespace utest::v1; // test configuration #ifndef MBED_TEST_SIM_BLOCKDEVICE #error [NOT_SUPPORTED] Simulation block device required for wear leveling tests -#endif +#else #ifndef MBED_TEST_SIM_BLOCKDEVICE_DECL #define MBED_TEST_SIM_BLOCKDEVICE_DECL MBED_TEST_SIM_BLOCKDEVICE bd(MBED_TEST_BLOCK_COUNT*512, 1, 1, 512) @@ -118,3 +118,5 @@ int main() { Harness::run(specification); } + +#endif // MBED_TEST_SIM_BLOCKDEVICE \ No newline at end of file diff --git a/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/dirs/main.cpp b/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/dirs/main.cpp index 8793040512..a2b4351707 100644 --- a/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/dirs/main.cpp +++ b/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/dirs/main.cpp @@ -33,7 +33,7 @@ using namespace utest::v1; #ifndef MBED_TEST_BLOCKDEVICE #error [NOT_SUPPORTED] Non-volatile block device required -#endif +#else #ifndef MBED_TEST_BLOCKDEVICE_DECL #define MBED_TEST_BLOCKDEVICE_DECL MBED_TEST_BLOCKDEVICE bd @@ -682,3 +682,5 @@ int main() { return !Harness::run(specification); } + +#endif // MBED_TEST_BLOCKDEVICE \ No newline at end of file diff --git a/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/files/main.cpp b/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/files/main.cpp index 120eff1612..1a1acbae98 100644 --- a/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/files/main.cpp +++ b/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/files/main.cpp @@ -33,7 +33,7 @@ using namespace utest::v1; #ifndef MBED_TEST_BLOCKDEVICE #error [NOT_SUPPORTED] Non-volatile block device required -#endif +#else #ifndef MBED_TEST_BLOCKDEVICE_DECL #define MBED_TEST_BLOCKDEVICE_DECL MBED_TEST_BLOCKDEVICE bd @@ -447,3 +447,5 @@ int main() { return !Harness::run(specification); } + +#endif // MBED_TEST_BLOCKDEVICE \ No newline at end of file diff --git a/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/interspersed/main.cpp b/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/interspersed/main.cpp index 46ee79d447..15a6678a86 100644 --- a/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/interspersed/main.cpp +++ b/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/interspersed/main.cpp @@ -33,7 +33,7 @@ using namespace utest::v1; #ifndef MBED_TEST_BLOCKDEVICE #error [NOT_SUPPORTED] Non-volatile block device required -#endif +#else #ifndef MBED_TEST_BLOCKDEVICE_DECL #define MBED_TEST_BLOCKDEVICE_DECL MBED_TEST_BLOCKDEVICE bd @@ -405,3 +405,5 @@ int main() { return !Harness::run(specification); } + +#endif // MBED_TEST_BLOCKDEVICE \ No newline at end of file diff --git a/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/seek/main.cpp b/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/seek/main.cpp index 6e904fce20..c7185aaf87 100644 --- a/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/seek/main.cpp +++ b/features/storage/filesystem/littlefs/TESTS/filesystem_retarget/seek/main.cpp @@ -33,7 +33,7 @@ using namespace utest::v1; #ifndef MBED_TEST_BLOCKDEVICE #error [NOT_SUPPORTED] Non-volatile block device required -#endif +#else #ifndef MBED_TEST_BLOCKDEVICE_DECL #define MBED_TEST_BLOCKDEVICE_DECL MBED_TEST_BLOCKDEVICE bd @@ -639,3 +639,5 @@ int main() { return !Harness::run(specification); } + +#endif // MBED_TEST_BLOCKDEVICE \ No newline at end of file diff --git a/features/storage/nvstore/TESTS/nvstore/functionality/main.cpp b/features/storage/nvstore/TESTS/nvstore/functionality/main.cpp index ab8752b74b..fd3dadd3e0 100644 --- a/features/storage/nvstore/TESTS/nvstore/functionality/main.cpp +++ b/features/storage/nvstore/TESTS/nvstore/functionality/main.cpp @@ -29,7 +29,7 @@ #if !NVSTORE_ENABLED #error [NOT_SUPPORTED] NVSTORE needs to be enabled for this test -#endif +#else using namespace utest::v1; @@ -697,3 +697,5 @@ int main() { return !Harness::run(specification); } + +#endif // !NVSTORE_ENABLED \ No newline at end of file