From b1731ce3c826eaf385549ed08e068a21e56148a0 Mon Sep 17 00:00:00 2001 From: RAJKUMAR KANAGARAJ Date: Tue, 5 Nov 2019 10:52:32 -0800 Subject: [PATCH] -New PR for PSA,Netsocket,storage components,reverted all the changes to back to original -Change the #error description more precisely -Separated the MBED_CONF_RTOS_PRESENT guarded --- TESTS/lorawan/loraradio/main.cpp | 4 ---- TESTS/mbed_drivers/lp_timeout/main.cpp | 8 ++++++-- TESTS/mbed_drivers/timeout/main.cpp | 10 ++++++++-- TESTS/mbed_drivers/timerevent/main.cpp | 2 +- TESTS/mbed_drivers/watchdog/main.cpp | 10 ++++++++-- TESTS/mbed_drivers/watchdog_reset/main.cpp | 9 +++++++-- TESTS/mbed_hal/common_tickers/main.cpp | 10 +++++++--- TESTS/mbed_hal/common_tickers_freq/main.cpp | 8 ++++++-- TESTS/mbed_hal/lp_ticker/main.cpp | 11 +++++++---- TESTS/mbed_hal/sleep/main.cpp | 11 ++++++++--- TESTS/mbed_hal/sleep_manager/main.cpp | 9 +++++++-- TESTS/mbed_hal/stack_size_unification/main.cpp | 11 ++++++++--- TESTS/mbed_hal/watchdog/main.cpp | 11 ++++++++--- TESTS/mbed_hal/watchdog_reset/main.cpp | 11 ++++++++--- TESTS/mbed_platform/crash_reporting/main.cpp | 12 ++++++++---- TESTS/mbedmicro-rtos-mbed/MemoryPool/main.cpp | 2 +- TESTS/mbedmicro-rtos-mbed/kernel_tick_count/main.cpp | 2 +- TESTS/mbedmicro-rtos-mbed/systimer/main.cpp | 2 +- TESTS/mbedtls/selftest/main.cpp | 2 -- TESTS/netsocket/dns/asynchronous_dns.cpp | 3 --- TESTS/netsocket/dns/asynchronous_dns_cache.cpp | 2 -- TESTS/netsocket/dns/asynchronous_dns_cancel.cpp | 2 -- .../dns/asynchronous_dns_external_event_queue.cpp | 2 -- .../netsocket/dns/asynchronous_dns_invalid_host.cpp | 3 --- .../dns/asynchronous_dns_non_async_and_async.cpp | 3 --- .../netsocket/dns/asynchronous_dns_simultaneous.cpp | 3 --- .../dns/asynchronous_dns_simultaneous_cache.cpp | 3 --- .../dns/asynchronous_dns_simultaneous_repeat.cpp | 3 --- TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp | 3 --- TESTS/netsocket/dns/dns_tests.h | 2 -- TESTS/netsocket/dns/main.cpp | 5 ----- TESTS/netsocket/dns/synchronous_dns.cpp | 2 -- TESTS/netsocket/dns/synchronous_dns_cache.cpp | 3 --- TESTS/netsocket/dns/synchronous_dns_invalid.cpp | 3 --- TESTS/netsocket/dns/synchronous_dns_multiple.cpp | 2 -- TESTS/netsocket/tcp/main.cpp | 5 ----- TESTS/netsocket/tcp/tcp_tests.h | 2 -- TESTS/netsocket/tcp/tcpsocket_bind_address.cpp | 2 -- .../netsocket/tcp/tcpsocket_bind_address_invalid.cpp | 3 --- TESTS/netsocket/tcp/tcpsocket_bind_address_null.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_bind_address_port.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_bind_port.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_echotest.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_open_close_repeat.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_open_limit.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_open_twice.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_send_repeat.cpp | 2 -- TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp | 2 -- .../tcp/tcpsocket_setsockopt_keepalive_valid.cpp | 2 -- .../tcp/tcpsocket_thread_per_socket_safety.cpp | 2 -- TESTS/netsocket/tls/main.cpp | 4 ---- TESTS/netsocket/tls/tls_tests.h | 3 +-- TESTS/netsocket/udp/main.cpp | 5 ----- TESTS/network/emac/emac_TestMemoryManager.cpp | 3 +-- TESTS/network/emac/emac_TestMemoryManager.h | 3 +-- TESTS/network/emac/emac_TestNetworkStack.cpp | 2 -- TESTS/network/emac/emac_TestNetworkStack.h | 3 +-- TESTS/network/emac/emac_ctp.cpp | 4 ++-- TESTS/network/emac/emac_ctp.h | 4 ++-- TESTS/network/emac/emac_initialize.h | 3 +-- TESTS/network/emac/emac_membuf.cpp | 2 -- TESTS/network/emac/emac_membuf.h | 4 ++-- TESTS/network/emac/emac_test_broadcast.cpp | 2 -- TESTS/network/emac/emac_test_initialize.cpp | 2 -- TESTS/network/emac/emac_test_memory.cpp | 2 -- TESTS/network/emac/emac_test_multicast_filter.cpp | 3 --- TESTS/network/emac/emac_test_unicast.cpp | 2 -- TESTS/network/emac/emac_test_unicast_burst.cpp | 3 --- TESTS/network/emac/emac_test_unicast_frame_len.cpp | 2 -- TESTS/network/emac/emac_test_unicast_long.cpp | 2 -- TESTS/network/emac/emac_tests.h | 4 ++-- TESTS/network/emac/emac_util.cpp | 2 -- TESTS/network/emac/emac_util.h | 3 +-- TESTS/network/emac/main.cpp | 4 ---- TESTS/network/interface/main.cpp | 5 ----- TESTS/network/l3ip/cellular_driver_l3ip.cpp | 3 +-- TESTS/network/l3ip/cellular_driver_l3ip.h | 2 -- TESTS/network/l3ip/main.cpp | 5 +---- TESTS/psa/attestation/main.cpp | 5 ----- TESTS/psa/its_ps/main.cpp | 6 +++--- TESTS/usb_device/basic/main.cpp | 2 +- TESTS/usb_device/msd/main.cpp | 2 +- .../TESTS/compliance_attestation/test_a001/main.c | 4 ---- .../TARGET_PSA/TESTS/compliance_its/test_s001/main.c | 5 ----- .../TARGET_PSA/TESTS/compliance_its/test_s002/main.c | 4 ---- .../TARGET_PSA/TESTS/compliance_its/test_s004/main.c | 4 ---- .../TARGET_PSA/TESTS/compliance_its/test_s005/main.c | 5 ----- .../TARGET_PSA/TESTS/compliance_its/test_s006/main.c | 5 ----- .../TARGET_PSA/TESTS/compliance_its/test_s007/main.c | 5 ----- .../TARGET_PSA/TESTS/compliance_its/test_s008/main.c | 5 ----- .../TARGET_PSA/TESTS/compliance_its/test_s009/main.c | 5 ----- .../TARGET_PSA/TESTS/compliance_its/test_s010/main.c | 5 ----- .../blockdevice/COMPONENT_SD/SDBlockDevice.cpp | 2 -- .../COMPONENT_SD/TESTS/filesystem/parallel/main.cpp | 4 ---- .../TESTS/device_key/functionality/main.cpp | 8 ++++---- .../frameworks/TARGET_PSA/pal/pal_mbed_os_intf.cpp | 2 -- .../TESTS/blockdevice/general_block_device/main.cpp | 5 +---- .../TESTS/kvstore/filesystemstore_tests/main.cpp | 7 ++++--- .../TESTS/kvstore/general_tests_phase_1/main.cpp | 7 ++++--- .../TESTS/kvstore/general_tests_phase_2/main.cpp | 7 ++++--- features/storage/TESTS/kvstore/static_tests/main.cpp | 12 ++---------- .../nvstore/TESTS/nvstore/functionality/main.cpp | 8 ++++---- 111 files changed, 144 insertions(+), 307 deletions(-) diff --git a/TESTS/lorawan/loraradio/main.cpp b/TESTS/lorawan/loraradio/main.cpp index 4456be09b5..f5daaa1308 100644 --- a/TESTS/lorawan/loraradio/main.cpp +++ b/TESTS/lorawan/loraradio/main.cpp @@ -13,9 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] LORADIO tests are not enabled for Bare Metal. -#else #include "utest.h" #include "unity.h" @@ -287,4 +284,3 @@ int main() } #endif // (MBED_CONF_APP_LORA_RADIO == SX1272) || (MBED_CONF_APP_LORA_RADIO == SX1276) -#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/mbed_drivers/lp_timeout/main.cpp b/TESTS/mbed_drivers/lp_timeout/main.cpp index 41297537da..f7df3823a7 100644 --- a/TESTS/mbed_drivers/lp_timeout/main.cpp +++ b/TESTS/mbed_drivers/lp_timeout/main.cpp @@ -13,9 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] Low power timer test cases requires RTOS to run. +#else -#if !DEVICE_LPTICKER || !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] Low power timer test cases are not supported. +#if !DEVICE_LPTICKER +#error [NOT_SUPPORTED] Low power timer not supported for this target #else #include "mbed.h" @@ -95,3 +98,4 @@ int main() } #endif // !DEVICE_LPTICKER +#endif //!defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/mbed_drivers/timeout/main.cpp b/TESTS/mbed_drivers/timeout/main.cpp index 347462be48..fc77d64dcd 100644 --- a/TESTS/mbed_drivers/timeout/main.cpp +++ b/TESTS/mbed_drivers/timeout/main.cpp @@ -13,14 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] usticker test requires RTOS to run. +#else + #include "mbed.h" #include "greentea-client/test_env.h" #include "utest/utest.h" #include "unity/unity.h" #include "timeout_tests.h" -#if !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] usticker test not supported. +#if !DEVICE_USTICKER +#error [NOT_SUPPORTED] usticker not supported for this target. #else using namespace utest::v1; @@ -89,3 +94,4 @@ int main() } #endif // !DEVICE_USTICKER +#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/mbed_drivers/timerevent/main.cpp b/TESTS/mbed_drivers/timerevent/main.cpp index 3aec29e5ad..8a08d9739b 100644 --- a/TESTS/mbed_drivers/timerevent/main.cpp +++ b/TESTS/mbed_drivers/timerevent/main.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ #if !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] usticker test not supported. +#error [NOT_SUPPORTED] usticker test case requires RTOS to run and also usticker needs to be enabled for this target. #else #include "mbed.h" diff --git a/TESTS/mbed_drivers/watchdog/main.cpp b/TESTS/mbed_drivers/watchdog/main.cpp index 554257bdb2..494cdc3e28 100644 --- a/TESTS/mbed_drivers/watchdog/main.cpp +++ b/TESTS/mbed_drivers/watchdog/main.cpp @@ -14,8 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] Watchdo test not supported. + +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] Watchdog test cases requires RTOS to run. +#else + +#if !DEVICE_WATCHDOG +#error [NOT_SUPPORTED] Watchdog not supported for this target #else #include "greentea-client/test_env.h" @@ -284,3 +289,4 @@ int main() } #endif // !DEVICE_WATCHDOG +#endif // !defined(MBED_CONG_RTOS_PRESENT) diff --git a/TESTS/mbed_drivers/watchdog_reset/main.cpp b/TESTS/mbed_drivers/watchdog_reset/main.cpp index 7881200a0b..bd698aba74 100644 --- a/TESTS/mbed_drivers/watchdog_reset/main.cpp +++ b/TESTS/mbed_drivers/watchdog_reset/main.cpp @@ -14,8 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] Watchdog reset test not supported. +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] Watchdog reset test cases requires RTOS to run. +#else + +#if !DEVICE_WATCHDOG +#error [NOT_SUPPORTED] Watchdog not supported for this target #else #include "greentea-client/test_env.h" @@ -334,3 +338,4 @@ int main() return !Harness::run(specification); } #endif // !DEVICE_WATCHDOG +#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/mbed_hal/common_tickers/main.cpp b/TESTS/mbed_hal/common_tickers/main.cpp index a0646e2637..4c2c700c7e 100644 --- a/TESTS/mbed_hal/common_tickers/main.cpp +++ b/TESTS/mbed_hal/common_tickers/main.cpp @@ -14,8 +14,8 @@ * limitations under the License. */ -#if !DEVICE_USTICKER || !defined(MBED_RTOS_CONF_PRESENT) -#error [NOT_SUPPORTED] test not supported +#if !defined(MBED_RTOS_CONF_PRESENT) +#error [NOT_SUPPORTED] usticker test cases requires RTOS to run #else #include "mbed.h" @@ -35,6 +35,9 @@ extern "C" { } #endif // __cplusplus +#if !DEVICE_USTICKER +#error [NOT_SUPPORTED] test not supported +#else #define US_PER_S 1000000 @@ -607,4 +610,5 @@ int main() { return !Harness::run(specification); } -#endif // !DEVICE_USTICKER || !defined(MBED_RTOS_CONF_PRESENT) +#endif // !DEVICE_USTICKER +#endif // !defined(MBED_RTOS_CONF_PRESENT) diff --git a/TESTS/mbed_hal/common_tickers_freq/main.cpp b/TESTS/mbed_hal/common_tickers_freq/main.cpp index 3fca118cc2..af74787704 100644 --- a/TESTS/mbed_hal/common_tickers_freq/main.cpp +++ b/TESTS/mbed_hal/common_tickers_freq/main.cpp @@ -20,6 +20,9 @@ * freqency is valid. */ +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] common tickers frequency test cases requires RTOS to run. +#else #include "mbed.h" #include "greentea-client/test_env.h" @@ -30,7 +33,7 @@ #include "hal/lp_ticker_api.h" #include "hal/mbed_lp_ticker_wrapper.h" -#if defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT) +#if defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER #error [NOT_SUPPORTED] test not supported #else @@ -205,4 +208,5 @@ int main() Harness::run(specification); } -#endif // defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER || !defined(MBED_RTOS_CONF_PRESENT) +#endif // defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER +#endif // !defined(MBED_RTOS_CONF_PRESENT) diff --git a/TESTS/mbed_hal/lp_ticker/main.cpp b/TESTS/mbed_hal/lp_ticker/main.cpp index fefd7af2b1..e2819c1c7f 100644 --- a/TESTS/mbed_hal/lp_ticker/main.cpp +++ b/TESTS/mbed_hal/lp_ticker/main.cpp @@ -14,8 +14,8 @@ * limitations under the License. */ -#if !DEVICE_LPTICKER || !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] Low power timer test not supported. +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] Low power timer test cases requires RTOS to run. #else #include "mbed.h" @@ -28,7 +28,9 @@ #include "hal/mbed_lp_ticker_wrapper.h" #include "hal/us_ticker_api.h" - +#if !DEVICE_LPTICKER +#error [NOT_SUPPORTED] Low power timer not supported for this target +#else using namespace utest::v1; @@ -209,4 +211,5 @@ int main() return !Harness::run(specification); } -#endif // !DEVICE_LPTICKER || !defined(MBED_CONF_RTOS_PRESENT) +#endif // !DEVICE_LPTICKER +#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/mbed_hal/sleep/main.cpp b/TESTS/mbed_hal/sleep/main.cpp index 2d86bb29e3..4e1b6332bf 100644 --- a/TESTS/mbed_hal/sleep/main.cpp +++ b/TESTS/mbed_hal/sleep/main.cpp @@ -14,8 +14,12 @@ * limitations under the License. */ -#if !DEVICE_SLEEP || !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] sleep not supported for this target and also for bare metal. +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] sleep test cases requires RTOS to run. +#else + +#if !DEVICE_SLEEP +#error [NOT_SUPPORTED] sleep not supported for this target #else #include "mbed.h" @@ -262,4 +266,5 @@ int main() Harness::run(specification); } -#endif // !DEVICE_SLEEP || !defined(MBED_CONF_RTOS_PRESENT) +#endif // !DEVICE_SLEEP +#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/mbed_hal/sleep_manager/main.cpp b/TESTS/mbed_hal/sleep_manager/main.cpp index a5f31f5b14..0eb7c424b5 100644 --- a/TESTS/mbed_hal/sleep_manager/main.cpp +++ b/TESTS/mbed_hal/sleep_manager/main.cpp @@ -13,6 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] sleep manager test cases requires RTOS to run. +#else + #include "utest/utest.h" #include "unity/unity.h" #include "greentea-client/test_env.h" @@ -23,7 +27,7 @@ #include "../sleep/sleep_test_utils.h" #include "sleep_manager_api_tests.h" -#if !DEVICE_SLEEP || !defined(MBED_CONF_RTOS_PRESENT) +#if !DEVICE_SLEEP #error [NOT_SUPPORTED] test not supported #else @@ -335,4 +339,5 @@ int main() return !Harness::run(specification); } -#endif // !DEVICE_SLEEP || !defined(MBED_CONF_RTOS_PRESENT) +#endif // !DEVICE_SLEEP +#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/mbed_hal/stack_size_unification/main.cpp b/TESTS/mbed_hal/stack_size_unification/main.cpp index deae099623..9853184b07 100644 --- a/TESTS/mbed_hal/stack_size_unification/main.cpp +++ b/TESTS/mbed_hal/stack_size_unification/main.cpp @@ -15,13 +15,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] stack size unification test cases requires RTOS to run. +#else + #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" #include "utest.h" -#if defined(TARGET_RENESAS) || !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] Cortex-A target and bare metal not supported for this test +#ifdef TARGET_RENESAS +#error [NOT_SUPPORTED] Cortex-A target not supported for this test #else using namespace utest::v1; @@ -75,4 +79,5 @@ int main() return !Harness::run(specification); } -#endif // TARGET_RENESAS || !defined(MBED_CONF_RTOS_PRESENT) +#endif // TARGET_RENESAS +#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/mbed_hal/watchdog/main.cpp b/TESTS/mbed_hal/watchdog/main.cpp index 363a0b1b50..96a8769771 100644 --- a/TESTS/mbed_hal/watchdog/main.cpp +++ b/TESTS/mbed_hal/watchdog/main.cpp @@ -14,8 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] Watchdog test not supported. +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] Watchdog test cases requires RTOS to run. +#else + +#if !DEVICE_WATCHDOG +#error [NOT_SUPPORTED] Watchdog not supported for this target #else #include "greentea-client/test_env.h" @@ -284,4 +288,5 @@ int main() return !Harness::run(specification); } -#endif // !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT) +#endif // !DEVICE_WATCHDOG +#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/mbed_hal/watchdog_reset/main.cpp b/TESTS/mbed_hal/watchdog_reset/main.cpp index 1725677d65..dc32e14f49 100644 --- a/TESTS/mbed_hal/watchdog_reset/main.cpp +++ b/TESTS/mbed_hal/watchdog_reset/main.cpp @@ -14,8 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] Watchdog test not supported. +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] Watchdog reset test cases requires RTOS to run. +#else + +#if !DEVICE_WATCHDOG +#error [NOT_SUPPORTED] Watchdog not supported for this target #else #include "greentea-client/test_env.h" @@ -320,4 +324,5 @@ int main() return !Harness::run(specification); } -#endif // !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT) +#endif // !DEVICE_WATCHDOG +#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/mbed_platform/crash_reporting/main.cpp b/TESTS/mbed_platform/crash_reporting/main.cpp index 825d7de70a..7efcd6379e 100644 --- a/TESTS/mbed_platform/crash_reporting/main.cpp +++ b/TESTS/mbed_platform/crash_reporting/main.cpp @@ -13,16 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if !MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED || !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] crash_reporting test not supported +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] crash_reporting test cases requires RTOS to run. #else - #include "mbed.h" #include "mbed_error.h" #include "mbed_crash_data_offsets.h" #include "greentea-client/test_env.h" #include "unity/unity.h" +#if !MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED +#error [NOT_SUPPORTED] crash_reporting test not supported +#else + #define MSG_VALUE_DUMMY "0" #define MSG_VALUE_LEN 32 #define MSG_KEY_LEN 64 @@ -79,4 +82,5 @@ int main(void) return 0; } -#endif // !MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED || !defined(MBED_CONF_RTOS_PRESENT) +#endif // !MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED +#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/mbedmicro-rtos-mbed/MemoryPool/main.cpp b/TESTS/mbedmicro-rtos-mbed/MemoryPool/main.cpp index fe3d72a131..b674cba7a0 100644 --- a/TESTS/mbedmicro-rtos-mbed/MemoryPool/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/MemoryPool/main.cpp @@ -19,7 +19,7 @@ #include "utest.h" #if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] test not supported +#error [NOT_SUPPORTED] MemoryPool test cases requires RTOS to run. #else using namespace utest::v1; diff --git a/TESTS/mbedmicro-rtos-mbed/kernel_tick_count/main.cpp b/TESTS/mbedmicro-rtos-mbed/kernel_tick_count/main.cpp index 55083eee66..d616e90fe6 100644 --- a/TESTS/mbedmicro-rtos-mbed/kernel_tick_count/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/kernel_tick_count/main.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ #if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] test not supported +#error [NOT_SUPPORTED] kernel tick count test cases requires RTOS to run. #else #include "greentea-client/test_env.h" diff --git a/TESTS/mbedmicro-rtos-mbed/systimer/main.cpp b/TESTS/mbedmicro-rtos-mbed/systimer/main.cpp index 2adcb306c9..ce9d58183f 100644 --- a/TESTS/mbedmicro-rtos-mbed/systimer/main.cpp +++ b/TESTS/mbedmicro-rtos-mbed/systimer/main.cpp @@ -20,7 +20,7 @@ #include "utest.h" #include "ticker_api.h" #if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] test not supported +#error [NOT_SUPPORTED] systimer test cases requires RTOS to run. #else extern "C" { diff --git a/TESTS/mbedtls/selftest/main.cpp b/TESTS/mbedtls/selftest/main.cpp index 0398dd0cb0..8a9cb8870e 100644 --- a/TESTS/mbedtls/selftest/main.cpp +++ b/TESTS/mbedtls/selftest/main.cpp @@ -18,9 +18,7 @@ #include "greentea-client/test_env.h" #include "unity.h" #include "utest.h" -#if defined(MBED_CONF_RTOS_PRESENT) #include "rtos.h" -#endif using namespace utest::v1; diff --git a/TESTS/netsocket/dns/asynchronous_dns.cpp b/TESTS/netsocket/dns/asynchronous_dns.cpp index 0d713224b0..dd85271243 100644 --- a/TESTS/netsocket/dns/asynchronous_dns.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns.cpp @@ -15,8 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) - #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -42,4 +40,3 @@ void ASYNCHRONOUS_DNS() TEST_ASSERT_EQUAL(0, result_dns_failure); TEST_ASSERT_EQUAL(0, result_exp_timeout); } -#endif diff --git a/TESTS/netsocket/dns/asynchronous_dns_cache.cpp b/TESTS/netsocket/dns/asynchronous_dns_cache.cpp index bc5f8ac01e..fa4a82361c 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_cache.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_cache.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "greentea-client/test_env.h" @@ -67,4 +66,3 @@ void ASYNCHRONOUS_DNS_CACHE() dns_test_hosts[0], data.addr.get_ip_address(), delay_ms); } } -#endif diff --git a/TESTS/netsocket/dns/asynchronous_dns_cancel.cpp b/TESTS/netsocket/dns/asynchronous_dns_cancel.cpp index abf02d7db4..1c744ee709 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_cancel.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_cancel.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "greentea-client/test_env.h" @@ -87,4 +86,3 @@ void ASYNCHRONOUS_DNS_CANCEL() ThisThread::sleep_for(5000); } -#endif // #if defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/asynchronous_dns_external_event_queue.cpp b/TESTS/netsocket/dns/asynchronous_dns_external_event_queue.cpp index 0a1334cb5d..f786ac88b2 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_external_event_queue.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_external_event_queue.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "greentea-client/test_env.h" @@ -77,4 +76,3 @@ void ASYNCHRONOUS_DNS_EXTERNAL_EVENT_QUEUE() nsapi_dns_call_in_set(0); } -#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/asynchronous_dns_invalid_host.cpp b/TESTS/netsocket/dns/asynchronous_dns_invalid_host.cpp index 74777cb4a3..383e34d36d 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_invalid_host.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_invalid_host.cpp @@ -15,8 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) - #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -66,4 +64,3 @@ void ASYNCHRONOUS_DNS_INVALID_HOST() TEST_ASSERT(result_dns_failure == exp_dns_failure || result_dns_failure == exp_dns_failure + 1); TEST_ASSERT_EQUAL(0, result_exp_timeout); } -#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp b/TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp index b360091d8c..bdd3f8a359 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp @@ -15,8 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) - #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -58,4 +56,3 @@ void ASYNCHRONOUS_DNS_NON_ASYNC_AND_ASYNC() TEST_ASSERT(strlen(data.addr.get_ip_address()) > 1); } -#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp b/TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp index 24d812986c..bd26e0af91 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp @@ -15,8 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) - #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -43,4 +41,3 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS() TEST_ASSERT_EQUAL(0, result_dns_failure); TEST_ASSERT_EQUAL(0, result_exp_timeout); } -#endif diff --git a/TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp b/TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp index a4966f01c0..5a3e25cbd0 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp @@ -15,8 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) - #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -44,4 +42,3 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS_CACHE() TEST_ASSERT_EQUAL(0, result_dns_failure); TEST_ASSERT_EQUAL(0, result_exp_timeout); } -#endif diff --git a/TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp b/TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp index f66a82de6c..d8040f747b 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp @@ -15,8 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) - #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -46,4 +44,3 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS_REPEAT() TEST_ASSERT_EQUAL(0, result_exp_timeout); } } -#endif diff --git a/TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp b/TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp index 8c01298245..f8aee5c543 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp @@ -15,8 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) - #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -71,4 +69,3 @@ void ASYNCHRONOUS_DNS_TIMEOUTS() nsapi_dns_call_in_set(0); } -#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/dns_tests.h b/TESTS/netsocket/dns/dns_tests.h index f6ea697c8b..887e3a091f 100644 --- a/TESTS/netsocket/dns/dns_tests.h +++ b/TESTS/netsocket/dns/dns_tests.h @@ -17,7 +17,6 @@ #ifndef DNS_TESTS_H #define DNS_TESTS_H -#if defined(MBED_CONF_RTOS_PRESENT) #include "nsapi_dns.h" @@ -93,5 +92,4 @@ void SYNCHRONOUS_DNS(); void SYNCHRONOUS_DNS_MULTIPLE(); void SYNCHRONOUS_DNS_CACHE(); void SYNCHRONOUS_DNS_INVALID(); -#endif /* defined(MBED_CONF_RTOS_PRESENT) */ #endif diff --git a/TESTS/netsocket/dns/main.cpp b/TESTS/netsocket/dns/main.cpp index 681e734333..5eccbf851a 100644 --- a/TESTS/netsocket/dns/main.cpp +++ b/TESTS/netsocket/dns/main.cpp @@ -15,10 +15,6 @@ * limitations under the License. */ -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] Test not supported. -#else - #define WIFI 2 #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \ (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) @@ -219,4 +215,3 @@ int main() } #endif // !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) -#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/synchronous_dns.cpp b/TESTS/netsocket/dns/synchronous_dns.cpp index 70968d1db2..e1118cabbe 100644 --- a/TESTS/netsocket/dns/synchronous_dns.cpp +++ b/TESTS/netsocket/dns/synchronous_dns.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "greentea-client/test_env.h" @@ -41,4 +40,3 @@ void SYNCHRONOUS_DNS() TEST_ASSERT_EQUAL(0, result_dns_failure); TEST_ASSERT_EQUAL(0, result_exp_timeout); } -#endif diff --git a/TESTS/netsocket/dns/synchronous_dns_cache.cpp b/TESTS/netsocket/dns/synchronous_dns_cache.cpp index 935d3f5716..affca8c2b1 100644 --- a/TESTS/netsocket/dns/synchronous_dns_cache.cpp +++ b/TESTS/netsocket/dns/synchronous_dns_cache.cpp @@ -15,8 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) - #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -56,4 +54,3 @@ void SYNCHRONOUS_DNS_CACHE() dns_test_hosts[0], address.get_ip_address(), delay_ms); } } -#endif diff --git a/TESTS/netsocket/dns/synchronous_dns_invalid.cpp b/TESTS/netsocket/dns/synchronous_dns_invalid.cpp index b956e98949..3e549043bc 100644 --- a/TESTS/netsocket/dns/synchronous_dns_invalid.cpp +++ b/TESTS/netsocket/dns/synchronous_dns_invalid.cpp @@ -15,8 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) - #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -61,4 +59,3 @@ void SYNCHRONOUS_DNS_INVALID() TEST_ASSERT_EQUAL(expected_failures, result_dns_failure); TEST_ASSERT_EQUAL(0, result_exp_timeout); } -#endif diff --git a/TESTS/netsocket/dns/synchronous_dns_multiple.cpp b/TESTS/netsocket/dns/synchronous_dns_multiple.cpp index 1891bf50ec..88b5e209ce 100644 --- a/TESTS/netsocket/dns/synchronous_dns_multiple.cpp +++ b/TESTS/netsocket/dns/synchronous_dns_multiple.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "greentea-client/test_env.h" @@ -41,4 +40,3 @@ void SYNCHRONOUS_DNS_MULTIPLE() TEST_ASSERT_EQUAL(0, result_dns_failure); TEST_ASSERT_EQUAL(0, result_exp_timeout); } -#endif diff --git a/TESTS/netsocket/tcp/main.cpp b/TESTS/netsocket/tcp/main.cpp index 5ec6dc707a..019908cde2 100644 --- a/TESTS/netsocket/tcp/main.cpp +++ b/TESTS/netsocket/tcp/main.cpp @@ -15,10 +15,6 @@ * limitations under the License. */ -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] NVSTORE needs to be enabled for this test -#else - #define WIFI 2 #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \ (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) @@ -244,4 +240,3 @@ int main() #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)) -#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcp_tests.h b/TESTS/netsocket/tcp/tcp_tests.h index fd7f0d8970..08b3a22d71 100644 --- a/TESTS/netsocket/tcp/tcp_tests.h +++ b/TESTS/netsocket/tcp/tcp_tests.h @@ -17,7 +17,6 @@ #ifndef TCP_TESTS_H #define TCP_TESTS_H -#if defined(MBED_CONF_RTOS_PRESENT) #include "../test_params.h" @@ -89,4 +88,3 @@ void TCPSOCKET_THREAD_PER_SOCKET_SAFETY(); void TCPSOCKET_SETSOCKOPT_KEEPALIVE_VALID(); #endif //TCP_TESTS_H -#endif //!defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_address.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_address.cpp index dcd9ee28d3..625b19e3f9 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_address.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_address.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -44,4 +43,3 @@ void TCPSOCKET_BIND_ADDRESS() delete sock; } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp index 49222d9ac2..0e9a07c856 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp @@ -15,8 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) - #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -51,4 +49,3 @@ void TCPSOCKET_BIND_ADDRESS_INVALID() delete sock; } -#endif diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_address_null.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_address_null.cpp index d4b8348948..2f48cd75b3 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_address_null.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_address_null.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -43,4 +42,3 @@ void TCPSOCKET_BIND_ADDRESS_NULL() delete sock; } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_address_port.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_address_port.cpp index b6ea7ca5ca..90a9a23ff4 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_address_port.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_address_port.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -43,4 +42,3 @@ void TCPSOCKET_BIND_ADDRESS_PORT() delete sock; } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_port.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_port.cpp index bd5a693088..91cf90230f 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_port.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_port.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -43,4 +42,3 @@ void TCPSOCKET_BIND_PORT() delete sock; } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp index 33461b9317..fdb29a8890 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -53,4 +52,3 @@ void TCPSOCKET_BIND_PORT_FAIL() delete sock; delete sock2; } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp index c4eab7b69c..5af3aa92fb 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -42,4 +41,3 @@ void TCPSOCKET_BIND_UNOPENED() delete sock; } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp index 4abc4f73ab..77d5a63954 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -52,4 +51,3 @@ void TCPSOCKET_BIND_WRONG_TYPE() delete sock; } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp b/TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp index 3fb81d7bc7..640265d81f 100644 --- a/TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -38,4 +37,3 @@ void TCPSOCKET_CONNECT_INVALID() TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_echotest.cpp b/TESTS/netsocket/tcp/tcpsocket_echotest.cpp index f05cf5ef75..b72284da35 100644 --- a/TESTS/netsocket/tcp/tcpsocket_echotest.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_echotest.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -202,4 +201,3 @@ END: tc_exec_time.stop(); free(stack_mem); } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp b/TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp index 532d9015b5..7d7f659d4e 100644 --- a/TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -142,4 +141,3 @@ void TCPSOCKET_ECHOTEST_BURST_NONBLOCK() END: TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp b/TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp index a04b95fa2e..65b7767b4f 100644 --- a/TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -89,4 +88,3 @@ void TCPSOCKET_ENDPOINT_CLOSE() tc_exec_time.stop(); TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_open_close_repeat.cpp b/TESTS/netsocket/tcp/tcpsocket_open_close_repeat.cpp index efc885851e..a8a4485d4e 100644 --- a/TESTS/netsocket/tcp/tcpsocket_open_close_repeat.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_open_close_repeat.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -39,4 +38,3 @@ void TCPSOCKET_OPEN_CLOSE_REPEAT() } delete sock; } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp b/TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp index 508143c416..39ddcc1c36 100644 --- a/TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -37,4 +36,3 @@ void TCPSOCKET_OPEN_DESTRUCT() delete sock; } } -#endif diff --git a/TESTS/netsocket/tcp/tcpsocket_open_limit.cpp b/TESTS/netsocket/tcp/tcpsocket_open_limit.cpp index 454c127260..82b0925d8a 100644 --- a/TESTS/netsocket/tcp/tcpsocket_open_limit.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_open_limit.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -97,4 +96,3 @@ void TCPSOCKET_OPEN_LIMIT() TEST_ASSERT_EQUAL(open_sockets[0], open_sockets[1]); TEST_ASSERT(open_sockets[0] >= 4); } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_open_twice.cpp b/TESTS/netsocket/tcp/tcpsocket_open_twice.cpp index 8ed0fb273b..a9476dcdd8 100644 --- a/TESTS/netsocket/tcp/tcpsocket_open_twice.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_open_twice.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -38,4 +37,3 @@ void TCPSOCKET_OPEN_TWICE() delete sock; } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp b/TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp index 3485ebff44..434cd0e0f0 100644 --- a/TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -196,4 +195,3 @@ void TCPSOCKET_RECV_100K_NONBLOCK() TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp b/TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp index 6c87c91374..24aec0d881 100644 --- a/TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -89,4 +88,3 @@ CLEANUP: tc_exec_time.stop(); TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_send_repeat.cpp b/TESTS/netsocket/tcp/tcpsocket_send_repeat.cpp index ff7992d39b..8c257527c9 100644 --- a/TESTS/netsocket/tcp/tcpsocket_send_repeat.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_send_repeat.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -44,4 +43,3 @@ void TCPSOCKET_SEND_REPEAT() TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp b/TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp index 850a4b56bd..7aa31a17b3 100644 --- a/TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -53,4 +52,3 @@ void TCPSOCKET_SEND_TIMEOUT() TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp b/TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp index 8e8c74785c..d843c37bfa 100644 --- a/TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -50,4 +49,3 @@ void TCPSOCKET_SETSOCKOPT_KEEPALIVE_VALID() // TEST_ASSERT_EQUAL(optval, seconds); TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp b/TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp index 0767af43f9..c88e0dad23 100644 --- a/TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -168,4 +167,3 @@ void TCPSOCKET_THREAD_PER_SOCKET_SAFETY() running = false; thread.join(); } -#endif \ No newline at end of file diff --git a/TESTS/netsocket/tls/main.cpp b/TESTS/netsocket/tls/main.cpp index 14d81b429f..e17eb53bfc 100644 --- a/TESTS/netsocket/tls/main.cpp +++ b/TESTS/netsocket/tls/main.cpp @@ -15,9 +15,6 @@ * limitations under the License. */ -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] test not supported -#else #define WIFI 2 #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \ (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) @@ -254,4 +251,3 @@ int main() #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)) -#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tls/tls_tests.h b/TESTS/netsocket/tls/tls_tests.h index 1811e5b97b..85fad115e4 100644 --- a/TESTS/netsocket/tls/tls_tests.h +++ b/TESTS/netsocket/tls/tls_tests.h @@ -17,7 +17,6 @@ #ifndef TLS_TESTS_H #define TLS_TESTS_H -#if defined(MBED_CONF_RTOS_PRESENT) #include "../test_params.h" #include "TLSSocket.h" @@ -84,5 +83,5 @@ void TLSSOCKET_SIMULTANEOUS(); void TLSSOCKET_SEND_TIMEOUT(); #endif // defined(MBEDTLS_SSL_CLI_C) || defined(DOXYGEN_ONLY) -#endif + #endif //TLS_TESTS_H diff --git a/TESTS/netsocket/udp/main.cpp b/TESTS/netsocket/udp/main.cpp index e5f4f32f24..680b2cc92f 100644 --- a/TESTS/netsocket/udp/main.cpp +++ b/TESTS/netsocket/udp/main.cpp @@ -15,10 +15,6 @@ * limitations under the License. */ -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] test not supported. -#else - #define WIFI 2 #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \ (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) @@ -208,4 +204,3 @@ int main() #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)) -#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_TestMemoryManager.cpp b/TESTS/network/emac/emac_TestMemoryManager.cpp index dff17af5f1..ea0c807988 100644 --- a/TESTS/network/emac/emac_TestMemoryManager.cpp +++ b/TESTS/network/emac/emac_TestMemoryManager.cpp @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) + #include #include #include @@ -554,4 +554,3 @@ EmacTestMemoryManager &EmacTestMemoryManager::get_instance() return test_memory_manager; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_TestMemoryManager.h b/TESTS/network/emac/emac_TestMemoryManager.h index 21e25a64f4..319f14dffe 100644 --- a/TESTS/network/emac/emac_TestMemoryManager.h +++ b/TESTS/network/emac/emac_TestMemoryManager.h @@ -17,7 +17,6 @@ #ifndef EMAC_TEST_MEMORY_MANAGER_H #define EMAC_TEST_MEMORY_MANAGER_H -#if defined(MBED_CONF_RTOS_PRESENT) #include @@ -226,5 +225,5 @@ private: unsigned int m_alloc_unit; bool m_memory_available; }; -#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */ + #endif /* EMAC_TEST_MEMORY_MANAGER_H */ diff --git a/TESTS/network/emac/emac_TestNetworkStack.cpp b/TESTS/network/emac/emac_TestNetworkStack.cpp index 544cc5c55f..3a4f63cde0 100644 --- a/TESTS/network/emac/emac_TestNetworkStack.cpp +++ b/TESTS/network/emac/emac_TestNetworkStack.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "unity.h" @@ -203,5 +202,4 @@ OnboardNetworkStack &OnboardNetworkStack::get_default_instance() { return EmacTestNetworkStack::get_instance(); } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) #endif diff --git a/TESTS/network/emac/emac_TestNetworkStack.h b/TESTS/network/emac/emac_TestNetworkStack.h index 3631920508..4cadc194ce 100644 --- a/TESTS/network/emac/emac_TestNetworkStack.h +++ b/TESTS/network/emac/emac_TestNetworkStack.h @@ -17,7 +17,6 @@ #ifndef EMAC_TEST_NETWORK_STACK_H #define EMAC_TEST_NETWORK_STACK_H -#if defined(MBED_CONF_RTOS_PRESENT) #include "netsocket/nsapi_types.h" #include "netsocket/EMAC.h" @@ -388,5 +387,5 @@ private: Interface *m_interface; }; -#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */ + #endif /* EMAC_TEST_NETWORK_STACK_H */ diff --git a/TESTS/network/emac/emac_ctp.cpp b/TESTS/network/emac/emac_ctp.cpp index 377a95e6b2..ba4de82dac 100644 --- a/TESTS/network/emac/emac_ctp.cpp +++ b/TESTS/network/emac/emac_ctp.cpp @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) + #include "greentea-client/test_env.h" #include "unity/unity.h" #include "utest.h" @@ -149,5 +149,5 @@ void emac_if_ctp_msg_build(int eth_frame_len, const unsigned char *dest_addr, co emac_if_get()->link_out(buf); emac_if_check_memory(false); } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) + diff --git a/TESTS/network/emac/emac_ctp.h b/TESTS/network/emac/emac_ctp.h index 9c9a89d10c..e49cc87897 100644 --- a/TESTS/network/emac/emac_ctp.h +++ b/TESTS/network/emac/emac_ctp.h @@ -17,7 +17,7 @@ #ifndef EMAC_CTP_H #define EMAC_CTP_H -#if defined(MBED_CONF_RTOS_PRESENT) + enum ctp_function { CTP_NONE, CTP_FORWARD, @@ -37,5 +37,5 @@ enum ctp_function { ctp_function emac_if_ctp_header_handle(unsigned char *eth_input_frame, unsigned char *eth_output_frame, unsigned char *origin_addr, int *receipt_number); void emac_if_ctp_msg_build(int eth_frame_len, const unsigned char *dest_addr, const unsigned char *origin_addr, const unsigned char *forward_addr, int options); void emac_if_ctp_reply_handle(int lenght, int invalid_data_index); -#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */ + #endif /* EMAC_CTP_H */ diff --git a/TESTS/network/emac/emac_initialize.h b/TESTS/network/emac/emac_initialize.h index ed3f2729cf..ff54da1844 100644 --- a/TESTS/network/emac/emac_initialize.h +++ b/TESTS/network/emac/emac_initialize.h @@ -17,11 +17,10 @@ #ifndef EMAC_INITIALIZE_H #define EMAC_INITIALIZE_H -#if defined(MBED_CONF_RTOS_PRESENT) unsigned char *emac_if_get_hw_addr(void); bool emac_if_init(EMAC *emac); EMAC *emac_if_get(void); EmacTestMemoryManager *emac_m_mngr_get(void); -#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */ + #endif /* EMAC_INITIALIZE_H */ diff --git a/TESTS/network/emac/emac_membuf.cpp b/TESTS/network/emac/emac_membuf.cpp index f6c1580acb..3df35301f2 100644 --- a/TESTS/network/emac/emac_membuf.cpp +++ b/TESTS/network/emac/emac_membuf.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "greentea-client/test_env.h" @@ -76,4 +75,3 @@ void emac_if_memory_buffer_write(void *buf, unsigned char *eth_frame, bool write } } } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_membuf.h b/TESTS/network/emac/emac_membuf.h index 588c74cc53..17510ae161 100644 --- a/TESTS/network/emac/emac_membuf.h +++ b/TESTS/network/emac/emac_membuf.h @@ -17,8 +17,8 @@ #ifndef EMAC_MEMBUF_H #define EMAC_MEMBUF_H -#if defined(MBED_CONF_RTOS_PRESENT) + int emac_if_memory_buffer_read(void *buf, unsigned char *eth_frame); void emac_if_memory_buffer_write(void *buf, unsigned char *eth_frame, bool write_data); -#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */ + #endif /* EMAC_MEMBUF_H */ diff --git a/TESTS/network/emac/emac_test_broadcast.cpp b/TESTS/network/emac/emac_test_broadcast.cpp index 6f8f579d01..4d378b2cbf 100644 --- a/TESTS/network/emac/emac_test_broadcast.cpp +++ b/TESTS/network/emac/emac_test_broadcast.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "greentea-client/test_env.h" @@ -100,4 +99,3 @@ void test_emac_broadcast(void) RESET_OUTGOING_MSG_DATA; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_test_initialize.cpp b/TESTS/network/emac/emac_test_initialize.cpp index 91fd40d243..e297c26e87 100644 --- a/TESTS/network/emac/emac_test_initialize.cpp +++ b/TESTS/network/emac/emac_test_initialize.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include #include "mbed.h" @@ -118,4 +117,3 @@ bool emac_if_init(EMAC *emac) return true; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_test_memory.cpp b/TESTS/network/emac/emac_test_memory.cpp index 8b1c797a0d..1cea935721 100644 --- a/TESTS/network/emac/emac_test_memory.cpp +++ b/TESTS/network/emac/emac_test_memory.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "greentea-client/test_env.h" @@ -162,4 +161,3 @@ void test_emac_memory() TEST_ASSERT_FALSE(ERROR_FLAGS); RESET_OUTGOING_MSG_DATA; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_test_multicast_filter.cpp b/TESTS/network/emac/emac_test_multicast_filter.cpp index 345bcc0f6d..d7e898f021 100644 --- a/TESTS/network/emac/emac_test_multicast_filter.cpp +++ b/TESTS/network/emac/emac_test_multicast_filter.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "greentea-client/test_env.h" @@ -172,5 +171,3 @@ void test_emac_multicast_filter() TEST_ASSERT_FALSE(ERROR_FLAGS); RESET_OUTGOING_MSG_DATA; } - -#endif //#if defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_test_unicast.cpp b/TESTS/network/emac/emac_test_unicast.cpp index 4ab914200b..1933ef1738 100644 --- a/TESTS/network/emac/emac_test_unicast.cpp +++ b/TESTS/network/emac/emac_test_unicast.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "greentea-client/test_env.h" @@ -77,4 +76,3 @@ void test_emac_unicast() RESET_OUTGOING_MSG_DATA; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_test_unicast_burst.cpp b/TESTS/network/emac/emac_test_unicast_burst.cpp index 3a193e866c..7391de797b 100644 --- a/TESTS/network/emac/emac_test_unicast_burst.cpp +++ b/TESTS/network/emac/emac_test_unicast_burst.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "greentea-client/test_env.h" @@ -85,5 +84,3 @@ void test_emac_unicast_burst() TEST_ASSERT_FALSE(ERROR_FLAGS); RESET_OUTGOING_MSG_DATA; } - -#endif //#if defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_test_unicast_frame_len.cpp b/TESTS/network/emac/emac_test_unicast_frame_len.cpp index 745fb09d67..84e3b713bf 100644 --- a/TESTS/network/emac/emac_test_unicast_frame_len.cpp +++ b/TESTS/network/emac/emac_test_unicast_frame_len.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "greentea-client/test_env.h" @@ -80,4 +79,3 @@ void test_emac_unicast_frame_len() TEST_ASSERT_FALSE(ERROR_FLAGS); RESET_OUTGOING_MSG_DATA; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_test_unicast_long.cpp b/TESTS/network/emac/emac_test_unicast_long.cpp index 3032341b37..f8bacaf979 100644 --- a/TESTS/network/emac/emac_test_unicast_long.cpp +++ b/TESTS/network/emac/emac_test_unicast_long.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "greentea-client/test_env.h" @@ -82,4 +81,3 @@ void test_emac_unicast_long() TEST_ASSERT_FALSE(ERROR_FLAGS); RESET_OUTGOING_MSG_DATA; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_tests.h b/TESTS/network/emac/emac_tests.h index a645a3cfe0..6dbcd340a3 100644 --- a/TESTS/network/emac/emac_tests.h +++ b/TESTS/network/emac/emac_tests.h @@ -17,7 +17,7 @@ #ifndef EMAC_TESTS_H #define EMAC_TESTS_H -#if defined(MBED_CONF_RTOS_PRESENT) + void test_emac_initialize(); void test_emac_broadcast(); void test_emac_unicast(); @@ -26,5 +26,5 @@ void test_emac_unicast_burst(); void test_emac_unicast_long(); void test_emac_multicast_filter(); void test_emac_memory(); -#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */ + #endif /* EMAC_TESTS_H */ diff --git a/TESTS/network/emac/emac_util.cpp b/TESTS/network/emac/emac_util.cpp index a1cf7b9046..9e90f2587b 100644 --- a/TESTS/network/emac/emac_util.cpp +++ b/TESTS/network/emac/emac_util.cpp @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "greentea-client/test_env.h" @@ -583,4 +582,3 @@ void emac_if_set_mtu_size(int mtu_size) { eth_mtu_size = mtu_size; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_util.h b/TESTS/network/emac/emac_util.h index d74a2021e7..26f5b7339d 100644 --- a/TESTS/network/emac/emac_util.h +++ b/TESTS/network/emac/emac_util.h @@ -14,7 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #ifndef EMAC_UTIL_H #define EMAC_UTIL_H @@ -125,5 +124,5 @@ void worker_loop_init(void); void worker_loop_start(void (*test_step_cb_fnc)(int opt), int timeout); void worker_loop_end(void); void worker_loop_link_up_wait(void); -#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */ + #endif /* EMAC_UTIL_H */ diff --git a/TESTS/network/emac/main.cpp b/TESTS/network/emac/main.cpp index 19c7b5441b..2b17fce2f2 100644 --- a/TESTS/network/emac/main.cpp +++ b/TESTS/network/emac/main.cpp @@ -14,9 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] EMAC test cases are not supported on Bare metal -#else #if !defined(MBED_CONF_APP_ECHO_SERVER) || \ !defined(MBED_CONF_APP_ECHO_SERVER_TRACE) || \ @@ -93,4 +90,3 @@ int main() #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) -#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/interface/main.cpp b/TESTS/network/interface/main.cpp index ef072e30a6..123bcf9bc5 100644 --- a/TESTS/network/interface/main.cpp +++ b/TESTS/network/interface/main.cpp @@ -15,10 +15,6 @@ * limitations under the License. */ -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] test not supported. -#else - #define WIFI 2 #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \ (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) @@ -60,4 +56,3 @@ int main() } #endif // !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID)) -#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/l3ip/cellular_driver_l3ip.cpp b/TESTS/network/l3ip/cellular_driver_l3ip.cpp index 6a0cfb4a6a..c8eee25a7c 100644 --- a/TESTS/network/l3ip/cellular_driver_l3ip.cpp +++ b/TESTS/network/l3ip/cellular_driver_l3ip.cpp @@ -15,7 +15,6 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed_interface.h" #include "netsocket/nsapi_types.h" @@ -113,7 +112,7 @@ MBED_WEAK L3IP &L3IP::get_default_instance() { return Cellular_driver_L3IP::get_instance(); } -#endif + /** * @} */ diff --git a/TESTS/network/l3ip/cellular_driver_l3ip.h b/TESTS/network/l3ip/cellular_driver_l3ip.h index 3ce7d163aa..1772416c44 100644 --- a/TESTS/network/l3ip/cellular_driver_l3ip.h +++ b/TESTS/network/l3ip/cellular_driver_l3ip.h @@ -17,7 +17,6 @@ #ifndef CELLULAR_DRIVER_L3IP_H_ #define CELLULAR_DRIVER_L3IP_H_ -#if defined(MBED_CONF_RTOS_PRESENT) #include "L3IP.h" @@ -134,4 +133,3 @@ private: }; #endif /* CELLULAR_DRIVER_L3IP_H_ */ -#endif diff --git a/TESTS/network/l3ip/main.cpp b/TESTS/network/l3ip/main.cpp index 4203091bc9..abca2b7e3f 100644 --- a/TESTS/network/l3ip/main.cpp +++ b/TESTS/network/l3ip/main.cpp @@ -14,9 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] l3ip test cases are not supported on Bare metal -#else + #include "mbed.h" #include "greentea-client/test_env.h" @@ -80,4 +78,3 @@ int main() { return !Harness::run(specification); } -#endif \ No newline at end of file diff --git a/TESTS/psa/attestation/main.cpp b/TESTS/psa/attestation/main.cpp index 1fd2d5a792..3789be02b2 100755 --- a/TESTS/psa/attestation/main.cpp +++ b/TESTS/psa/attestation/main.cpp @@ -16,10 +16,6 @@ * limitations under the License. */ -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] test not supported. -#else - #include "psa/crypto.h" #if ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C))) @@ -161,4 +157,3 @@ int main() } #endif // ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C))) -#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/psa/its_ps/main.cpp b/TESTS/psa/its_ps/main.cpp index ef35212ddf..273c207d3f 100644 --- a/TESTS/psa/its_ps/main.cpp +++ b/TESTS/psa/its_ps/main.cpp @@ -16,8 +16,8 @@ * limitations under the License. */ -#if !defined(TARGET_PSA) || !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] ITS/PS tests can run only on PSA-enabled targets and RTOS. +#ifndef TARGET_PSA +#error [NOT_SUPPORTED] ITS/PS tests can run only on PSA-enabled targets. #else #include "greentea-client/test_env.h" @@ -238,4 +238,4 @@ int main() return !Harness::run(specification); } -#endif // TARGET_PSA || !defined(MBED_CONF_RTOS_PRESENT) +#endif // TARGET_PSA diff --git a/TESTS/usb_device/basic/main.cpp b/TESTS/usb_device/basic/main.cpp index b8e098eca0..d2ae1cfde7 100644 --- a/TESTS/usb_device/basic/main.cpp +++ b/TESTS/usb_device/basic/main.cpp @@ -16,7 +16,7 @@ */ #if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] USB test cases are not supported on Bare metal +#error [NOT_SUPPORTED] USB test cases requires RTOS to run. #else #include diff --git a/TESTS/usb_device/msd/main.cpp b/TESTS/usb_device/msd/main.cpp index 15310bb53a..989e7c5b78 100644 --- a/TESTS/usb_device/msd/main.cpp +++ b/TESTS/usb_device/msd/main.cpp @@ -487,4 +487,4 @@ int main() } #endif // !defined(DEVICE_USBDEVICE) || !DEVICE_USBDEVICE -#endif // !defined(MBED_CONF_RTOS_PRESENT) \ No newline at end of file +#endif // !defined(MBED_CONF_RTOS_PRESENT) diff --git a/components/TARGET_PSA/TESTS/compliance_attestation/test_a001/main.c b/components/TARGET_PSA/TESTS/compliance_attestation/test_a001/main.c index 77edf20dbd..0c417d3d52 100644 --- a/components/TARGET_PSA/TESTS/compliance_attestation/test_a001/main.c +++ b/components/TARGET_PSA/TESTS/compliance_attestation/test_a001/main.c @@ -1,13 +1,9 @@ #include "val_interfaces.h" #include "pal_mbed_os_intf.h" -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] PSA attestation test not supported -#else void test_entry_a001(val_api_t *val_api, psa_api_t *psa_api); int main(void) { test_start(test_entry_a001, COMPLIANCE_TEST_ATTESTATION); } -#endif diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s001/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s001/main.c index 8204d0d502..8045d73f5e 100644 --- a/components/TARGET_PSA/TESTS/compliance_its/test_s001/main.c +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s001/main.c @@ -1,10 +1,6 @@ #include "val_interfaces.h" #include "pal_mbed_os_intf.h" -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] PSA compliance its test not supported -#else - #ifdef ITS_TEST void test_entry_s001(val_api_t *val_api, psa_api_t *psa_api); #elif PS_TEST @@ -19,4 +15,3 @@ int main(void) test_start(test_entry_p001, COMPLIANCE_TEST_STORAGE); #endif } -#endif \ No newline at end of file diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s002/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s002/main.c index 70f60048b9..10c724f850 100644 --- a/components/TARGET_PSA/TESTS/compliance_its/test_s002/main.c +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s002/main.c @@ -1,9 +1,6 @@ #include "val_interfaces.h" #include "pal_mbed_os_intf.h" #include "lifecycle.h" -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] PSA compliance its test not supported -#else #ifdef ITS_TEST void test_entry_s002(val_api_t *val_api, psa_api_t *psa_api); @@ -19,4 +16,3 @@ int main(void) test_start(test_entry_p002, COMPLIANCE_TEST_STORAGE); #endif } -#endif \ No newline at end of file diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s004/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s004/main.c index 2037936db7..952dbdf905 100644 --- a/components/TARGET_PSA/TESTS/compliance_its/test_s004/main.c +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s004/main.c @@ -1,8 +1,5 @@ #include "val_interfaces.h" #include "pal_mbed_os_intf.h" -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] PSA compliance its test not supported -#else #ifdef ITS_TEST void test_entry_s004(val_api_t *val_api, psa_api_t *psa_api); @@ -18,4 +15,3 @@ int main(void) test_start(test_entry_p004, COMPLIANCE_TEST_STORAGE); #endif } -#endif \ No newline at end of file diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s005/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s005/main.c index 9a9ba86877..c587e5371a 100644 --- a/components/TARGET_PSA/TESTS/compliance_its/test_s005/main.c +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s005/main.c @@ -1,10 +1,6 @@ #include "val_interfaces.h" #include "pal_mbed_os_intf.h" -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] PSA compliance its test not supported -#else - #ifdef ITS_TEST void test_entry_s005(val_api_t *val_api, psa_api_t *psa_api); #elif PS_TEST @@ -19,4 +15,3 @@ int main(void) test_start(test_entry_p005, COMPLIANCE_TEST_STORAGE); #endif } -#endif diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s006/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s006/main.c index e3c89519dd..c438256557 100644 --- a/components/TARGET_PSA/TESTS/compliance_its/test_s006/main.c +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s006/main.c @@ -1,10 +1,6 @@ #include "val_interfaces.h" #include "pal_mbed_os_intf.h" -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] PSA compliance its test not supported -#else - #ifdef ITS_TEST void test_entry_s006(val_api_t *val_api, psa_api_t *psa_api); #elif PS_TEST @@ -19,4 +15,3 @@ int main(void) test_start(test_entry_p006, COMPLIANCE_TEST_STORAGE); #endif } -#endif \ No newline at end of file diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s007/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s007/main.c index 3491b13062..b79fbc893b 100644 --- a/components/TARGET_PSA/TESTS/compliance_its/test_s007/main.c +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s007/main.c @@ -1,10 +1,6 @@ #include "val_interfaces.h" #include "pal_mbed_os_intf.h" -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] PSA compliance its test not supported -#else - #ifdef ITS_TEST void test_entry_s007(val_api_t *val_api, psa_api_t *psa_api); #elif PS_TEST @@ -19,4 +15,3 @@ int main(void) test_start(test_entry_p007, COMPLIANCE_TEST_STORAGE); #endif } -#endif \ No newline at end of file diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s008/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s008/main.c index 0096e53dac..8faecab01e 100644 --- a/components/TARGET_PSA/TESTS/compliance_its/test_s008/main.c +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s008/main.c @@ -1,10 +1,6 @@ #include "val_interfaces.h" #include "pal_mbed_os_intf.h" -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] PSA compliance its test not supported -#else - #ifdef ITS_TEST void test_entry_s008(val_api_t *val_api, psa_api_t *psa_api); #elif PS_TEST @@ -19,4 +15,3 @@ int main(void) test_start(test_entry_p008, COMPLIANCE_TEST_STORAGE); #endif } -#endif diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s009/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s009/main.c index 226a0a592f..adf65a3d8a 100644 --- a/components/TARGET_PSA/TESTS/compliance_its/test_s009/main.c +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s009/main.c @@ -1,10 +1,6 @@ #include "val_interfaces.h" #include "pal_mbed_os_intf.h" -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] PSA compliance its test not supported -#else - #ifdef ITS_TEST void test_entry_s009(val_api_t *val_api, psa_api_t *psa_api); #elif PS_TEST @@ -19,4 +15,3 @@ int main(void) test_start(test_entry_p009, COMPLIANCE_TEST_STORAGE); #endif } -#endif diff --git a/components/TARGET_PSA/TESTS/compliance_its/test_s010/main.c b/components/TARGET_PSA/TESTS/compliance_its/test_s010/main.c index d506becb12..dd110a6a4d 100644 --- a/components/TARGET_PSA/TESTS/compliance_its/test_s010/main.c +++ b/components/TARGET_PSA/TESTS/compliance_its/test_s010/main.c @@ -1,10 +1,6 @@ #include "val_interfaces.h" #include "pal_mbed_os_intf.h" -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] PSA compliance its test not supported -#else - #ifdef ITS_TEST void test_entry_s010(val_api_t *val_api, psa_api_t *psa_api); #elif PS_TEST @@ -19,4 +15,3 @@ int main(void) test_start(test_entry_p010, COMPLIANCE_TEST_STORAGE); #endif } -#endif \ No newline at end of file diff --git a/components/storage/blockdevice/COMPONENT_SD/SDBlockDevice.cpp b/components/storage/blockdevice/COMPONENT_SD/SDBlockDevice.cpp index a0082b3ce1..769fcfbbe3 100644 --- a/components/storage/blockdevice/COMPONENT_SD/SDBlockDevice.cpp +++ b/components/storage/blockdevice/COMPONENT_SD/SDBlockDevice.cpp @@ -872,9 +872,7 @@ uint32_t SDBlockDevice::_go_idle_state() if (R1_IDLE_STATE == response) { break; } -#if defined(MBED_CONF_RTOS_PRESENT) rtos::ThisThread::sleep_for(1); -#endif } return response; } diff --git a/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/parallel/main.cpp b/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/parallel/main.cpp index 1c3944e139..39e1aa4476 100644 --- a/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/parallel/main.cpp +++ b/components/storage/blockdevice/COMPONENT_SD/TESTS/filesystem/parallel/main.cpp @@ -13,9 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] test not supported -#else #include "mbed.h" #include "greentea-client/test_env.h" @@ -210,4 +207,3 @@ int main() { return !Harness::run(specification); } -#endif // !defined(MBED_CONF_RTOS_PRESENT) \ 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 959fdea754..22bd47d41d 100644 --- a/features/device_key/TESTS/device_key/functionality/main.cpp +++ b/features/device_key/TESTS/device_key/functionality/main.cpp @@ -14,10 +14,6 @@ * limitations under the License. */ -#if !DEVICEKEY_ENABLED -#error [NOT_SUPPORTED] DeviceKey needs to be enabled for this test -#else - #include "DeviceKey.h" #include "mbedtls/config.h" #include "utest/utest.h" @@ -32,6 +28,10 @@ using namespace utest::v1; using namespace mbed; +#if !DEVICEKEY_ENABLED +#error [NOT_SUPPORTED] DeviceKey needs to be enabled for this test +#else + #define MSG_VALUE_DUMMY "0" #define MSG_VALUE_LEN 32 #define MSG_KEY_LEN 32 diff --git a/features/frameworks/TARGET_PSA/pal/pal_mbed_os_intf.cpp b/features/frameworks/TARGET_PSA/pal/pal_mbed_os_intf.cpp index ab1803ddc1..f125d1be5e 100644 --- a/features/frameworks/TARGET_PSA/pal/pal_mbed_os_intf.cpp +++ b/features/frameworks/TARGET_PSA/pal/pal_mbed_os_intf.cpp @@ -135,11 +135,9 @@ int test_start(test_entry_f test_f, compliance_test_type type) { test_g = test_f; type_g = type; -#if defined(MBED_CONF_RTOS_PRESENT) MBED_ASSERT((type > COMPLIANCE_TEST_START) && (type < COMPLIANCE_TEST_END)); Thread thread(osPriorityNormal, TEST_STACK_SIZE, NULL); thread.start(main_wrapper); thread.join(); -#endif return 0; } diff --git a/features/storage/TESTS/blockdevice/general_block_device/main.cpp b/features/storage/TESTS/blockdevice/general_block_device/main.cpp index bde71b3771..cfe324780b 100644 --- a/features/storage/TESTS/blockdevice/general_block_device/main.cpp +++ b/features/storage/TESTS/blockdevice/general_block_device/main.cpp @@ -310,7 +310,6 @@ end: static void test_thread_job() { -#if defined(MBED_CONF_RTOS_PRESENT) static int thread_num = 0; _mutex->lock(); int block_num = thread_num++ % TEST_NUM_OF_THREADS; @@ -336,12 +335,10 @@ static void test_thread_job() end: delete[] read_block; delete[] write_block; -#endif } void test_multi_threads() { -#if defined(MBED_CONF_RTOS_PRESENT) utest_printf("\nTest Multi Threaded Erase/Program/Read Starts..\n"); TEST_SKIP_UNLESS_MESSAGE(block_device != NULL, "no block device found."); @@ -395,7 +392,7 @@ void test_multi_threads() delete[] bd_thread; } -#endif + } void test_erase_functionality() diff --git a/features/storage/TESTS/kvstore/filesystemstore_tests/main.cpp b/features/storage/TESTS/kvstore/filesystemstore_tests/main.cpp index c7b73f633c..da9e6e5148 100644 --- a/features/storage/TESTS/kvstore/filesystemstore_tests/main.cpp +++ b/features/storage/TESTS/kvstore/filesystemstore_tests/main.cpp @@ -15,9 +15,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if !defined(TARGET_K64F) && !defined(TARGET_ARM_FM) || !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices,Fastmodels and RTOS -#else #include "rtos/Thread.h" #include "mbed_trace.h" @@ -30,6 +27,10 @@ #include "utest.h" #include +#if !defined(TARGET_K64F) && !defined(TARGET_ARM_FM) +#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices and Fastmodels +#else + #define FSST_TEST_NUM_OF_THREADS 5 static const int heap_alloc_threshold_size = 4096; 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 50571203f4..1568693d3e 100644 --- a/features/storage/TESTS/kvstore/general_tests_phase_1/main.cpp +++ b/features/storage/TESTS/kvstore/general_tests_phase_1/main.cpp @@ -14,9 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if !defined(TARGET_K64F) && !defined(TARGET_ARM_FM) || !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices,Fastmodels and RTOS -#else #include "SecureStore.h" #include "TDBStore.h" @@ -32,6 +29,10 @@ using namespace utest::v1; using namespace mbed; +#if !defined(TARGET_K64F) && !defined(TARGET_ARM_FM) +#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices and Fastmodels +#else + static const char data[] = "data"; static const char key[] = "key"; static char buffer[20] = {}; 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 7654ff1d90..aa8105e8aa 100644 --- a/features/storage/TESTS/kvstore/general_tests_phase_2/main.cpp +++ b/features/storage/TESTS/kvstore/general_tests_phase_2/main.cpp @@ -14,9 +14,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#if !defined(TARGET_K64F) && !defined(TARGET_ARM_FM) || !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices,Fastmodels and RTOS -#else #include "SecureStore.h" #include "TDBStore.h" @@ -32,6 +29,10 @@ using namespace utest::v1; using namespace mbed; +#if !defined(TARGET_K64F) && !defined(TARGET_ARM_FM) +#error [NOT_SUPPORTED] Kvstore API tests run only on K64F devices and Fastmodels +#else + static const char data[] = "data"; static const char key[] = "key"; static char buffer[20] = {}; diff --git a/features/storage/TESTS/kvstore/static_tests/main.cpp b/features/storage/TESTS/kvstore/static_tests/main.cpp index ee56ca5c68..b6f60cd1b7 100644 --- a/features/storage/TESTS/kvstore/static_tests/main.cpp +++ b/features/storage/TESTS/kvstore/static_tests/main.cpp @@ -15,9 +15,7 @@ * limitations under the License. */ -#if defined(MBED_CONF_RTOS_PRESENT) #include "Thread.h" -#endif #include "mbed_error.h" #include "greentea-client/test_env.h" #include "unity/unity.h" @@ -35,10 +33,10 @@ static size_t actual_size = 0; static const size_t buffer_size = 20; static const int num_of_threads = 3; static const char num_of_keys = 3; -#if defined(MBED_CONF_RTOS_PRESENT) + /* Forked 3 threads plus misc, so minimum (4 * OS_STACK_SIZE) heap are required. */ static const int heap_alloc_threshold_size = 4 * OS_STACK_SIZE; -#endif + static const char *keys[] = {"key1", "key2", "key3"}; static int init_res = MBED_ERROR_NOT_READY; @@ -69,7 +67,6 @@ static void parse_default_kv() //init the blockdevice static void kvstore_init() { -#if defined(MBED_CONF_RTOS_PRESENT) uint8_t *dummy = new (std::nothrow) uint8_t[heap_alloc_threshold_size]; TEST_SKIP_UNLESS_MESSAGE(dummy, "Not enough heap to run test"); delete[] dummy; @@ -79,7 +76,6 @@ static void kvstore_init() init_res = kv_reset(def_kv); TEST_SKIP_UNLESS_MESSAGE(init_res != MBED_ERROR_UNSUPPORTED, "Unsupported configuration. Test skipped."); TEST_ASSERT_EQUAL_ERROR_CODE(MBED_SUCCESS, init_res); -#endif } /*----------------set()------------------*/ @@ -148,7 +144,6 @@ static void test_thread_set(char *th_key) //get several keys multithreaded static void set_several_keys_multithreaded() { -#if defined(MBED_CONF_RTOS_PRESENT) TEST_SKIP_UNLESS(!init_res); rtos::Thread kvstore_thread[num_of_threads]; osStatus threadStatus; @@ -174,7 +169,6 @@ static void set_several_keys_multithreaded() res = kv_remove(keys[i]); TEST_ASSERT_EQUAL_ERROR_CODE(MBED_SUCCESS, res); } -#endif } //set key "write once" and try to set it again @@ -470,7 +464,6 @@ static void test_thread_get(const void *th_key) //get several keys multithreaded static void get_several_keys_multithreaded() { -#if defined(MBED_CONF_RTOS_PRESENT) TEST_SKIP_UNLESS(!init_res); int i = 0, res = 0; rtos::Thread kvstore_thread[num_of_threads]; @@ -496,7 +489,6 @@ static void get_several_keys_multithreaded() res = kv_remove(keys[i]); TEST_ASSERT_EQUAL_ERROR_CODE(MBED_SUCCESS, res); } -#endif } /*----------------remove()------------------*/ diff --git a/features/storage/nvstore/TESTS/nvstore/functionality/main.cpp b/features/storage/nvstore/TESTS/nvstore/functionality/main.cpp index 8ac5eeff81..5bd263bd87 100644 --- a/features/storage/nvstore/TESTS/nvstore/functionality/main.cpp +++ b/features/storage/nvstore/TESTS/nvstore/functionality/main.cpp @@ -14,10 +14,6 @@ * limitations under the License. */ -#if !NVSTORE_ENABLED -#error [NOT_SUPPORTED] NVSTORE needs to be enabled for this test -#else - #include "nvstore.h" #ifdef MBED_CONF_RTOS_PRESENT #include "Thread.h" @@ -31,6 +27,10 @@ #include #include +#if !NVSTORE_ENABLED +#error [NOT_SUPPORTED] NVSTORE needs to be enabled for this test +#else + using namespace utest::v1; static const uint16_t max_test_keys = 20;