From c9eb48a0c5d4e9dad6cc4965d52b030cd273cb25 Mon Sep 17 00:00:00 2001 From: RAJKUMAR KANAGARAJ Date: Wed, 6 Nov 2019 04:06:11 -0800 Subject: [PATCH 1/3] Netsocket,lora,cellular,nework test case requires RTOS so MBED_CONF_RTOS_PRESENT guard to all test cases --- TESTS/lorawan/loraradio/main.cpp | 4 ++++ TESTS/netsocket/dns/asynchronous_dns.cpp | 3 +++ TESTS/netsocket/dns/asynchronous_dns_cache.cpp | 2 ++ TESTS/netsocket/dns/asynchronous_dns_cancel.cpp | 2 ++ .../netsocket/dns/asynchronous_dns_external_event_queue.cpp | 2 ++ TESTS/netsocket/dns/asynchronous_dns_invalid_host.cpp | 3 +++ TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp | 3 +++ TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp | 3 +++ TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp | 3 +++ TESTS/netsocket/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 ++ TESTS/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 ++ TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp | 2 ++ TESTS/netsocket/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 ++++- 69 files changed, 170 insertions(+), 16 deletions(-) diff --git a/TESTS/lorawan/loraradio/main.cpp b/TESTS/lorawan/loraradio/main.cpp index f5daaa13089..ce42d253213 100644 --- a/TESTS/lorawan/loraradio/main.cpp +++ b/TESTS/lorawan/loraradio/main.cpp @@ -13,6 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] LORADIO test cases requires RTOS to run. +#else #include "utest.h" #include "unity.h" @@ -284,3 +287,4 @@ 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/netsocket/dns/asynchronous_dns.cpp b/TESTS/netsocket/dns/asynchronous_dns.cpp index dd852712438..0d713224b09 100644 --- a/TESTS/netsocket/dns/asynchronous_dns.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) + #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -40,3 +42,4 @@ 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 fa4a82361cc..bc5f8ac01e0 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_cache.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_cache.cpp @@ -14,6 +14,7 @@ * 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" @@ -66,3 +67,4 @@ 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 1c744ee709d..abf02d7db43 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_cancel.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_cancel.cpp @@ -14,6 +14,7 @@ * 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" @@ -86,3 +87,4 @@ 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 f786ac88b21..0a1334cb5d3 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_external_event_queue.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_external_event_queue.cpp @@ -14,6 +14,7 @@ * 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,3 +77,4 @@ 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 383e34d36d3..74777cb4a37 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_invalid_host.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_invalid_host.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) + #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -64,3 +66,4 @@ 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 bdd3f8a3590..b360091d8cd 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) + #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -56,3 +58,4 @@ 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 bd26e0af912..24d812986c0 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) + #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -41,3 +43,4 @@ 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 5a3e25cbd09..a4966f01c00 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) + #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -42,3 +44,4 @@ 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 d8040f747b2..f66a82de6c6 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) + #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -44,3 +46,4 @@ 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 f8aee5c543d..8c01298245d 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) + #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -69,3 +71,4 @@ 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 887e3a091f6..f6ea697c8b5 100644 --- a/TESTS/netsocket/dns/dns_tests.h +++ b/TESTS/netsocket/dns/dns_tests.h @@ -17,6 +17,7 @@ #ifndef DNS_TESTS_H #define DNS_TESTS_H +#if defined(MBED_CONF_RTOS_PRESENT) #include "nsapi_dns.h" @@ -92,4 +93,5 @@ 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 5eccbf851a1..681e734333d 100644 --- a/TESTS/netsocket/dns/main.cpp +++ b/TESTS/netsocket/dns/main.cpp @@ -15,6 +15,10 @@ * 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)) @@ -215,3 +219,4 @@ 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 e1118cabbe8..70968d1db2f 100644 --- a/TESTS/netsocket/dns/synchronous_dns.cpp +++ b/TESTS/netsocket/dns/synchronous_dns.cpp @@ -14,6 +14,7 @@ * 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" @@ -40,3 +41,4 @@ 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 affca8c2b1f..935d3f5716f 100644 --- a/TESTS/netsocket/dns/synchronous_dns_cache.cpp +++ b/TESTS/netsocket/dns/synchronous_dns_cache.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) + #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -54,3 +56,4 @@ 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 3e549043bc4..b956e98949e 100644 --- a/TESTS/netsocket/dns/synchronous_dns_invalid.cpp +++ b/TESTS/netsocket/dns/synchronous_dns_invalid.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) + #include "mbed.h" #include "greentea-client/test_env.h" #include "unity.h" @@ -59,3 +61,4 @@ 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 88b5e209ce9..1891bf50ec2 100644 --- a/TESTS/netsocket/dns/synchronous_dns_multiple.cpp +++ b/TESTS/netsocket/dns/synchronous_dns_multiple.cpp @@ -14,6 +14,7 @@ * 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" @@ -40,3 +41,4 @@ 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 019908cde2c..eb3111ea5d2 100644 --- a/TESTS/netsocket/tcp/main.cpp +++ b/TESTS/netsocket/tcp/main.cpp @@ -15,6 +15,10 @@ * limitations under the License. */ +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] tcp test cases requires RTOS to run +#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)) @@ -240,3 +244,4 @@ 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 08b3a22d718..fd7f0d89703 100644 --- a/TESTS/netsocket/tcp/tcp_tests.h +++ b/TESTS/netsocket/tcp/tcp_tests.h @@ -17,6 +17,7 @@ #ifndef TCP_TESTS_H #define TCP_TESTS_H +#if defined(MBED_CONF_RTOS_PRESENT) #include "../test_params.h" @@ -88,3 +89,4 @@ 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 625b19e3f9c..dcd9ee28d39 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_address.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_address.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -43,3 +44,4 @@ 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 0e9a07c856d..49222d9ac2a 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) + #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -49,3 +51,4 @@ 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 2f48cd75b3a..d4b8348948a 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_address_null.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_address_null.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -42,3 +43,4 @@ 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 90a9a23ff4e..b6ea7ca5ca2 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_address_port.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_address_port.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -42,3 +43,4 @@ 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 91cf90230f3..bd5a6930889 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_port.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_port.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -42,3 +43,4 @@ 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 fdb29a88909..33461b9317e 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -52,3 +53,4 @@ 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 5af3aa92fba..c4eab7b69ca 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -41,3 +42,4 @@ 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 77d5a639543..4abc4f73abf 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -51,3 +52,4 @@ 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 640265d81f0..3fb81d7bc76 100644 --- a/TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -37,3 +38,4 @@ 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 b72284da35f..f05cf5ef751 100644 --- a/TESTS/netsocket/tcp/tcpsocket_echotest.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_echotest.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -201,3 +202,4 @@ void TCPSOCKET_ECHOTEST_NONBLOCK() 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 7d7f659d4ee..532d9015b5d 100644 --- a/TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -141,3 +142,4 @@ 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 65b7767b4f5..a04b95fa2e8 100644 --- a/TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -88,3 +89,4 @@ 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 a8a4485d4e0..efc885851e1 100644 --- a/TESTS/netsocket/tcp/tcpsocket_open_close_repeat.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_open_close_repeat.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -38,3 +39,4 @@ 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 39ddcc1c36c..508143c4166 100644 --- a/TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -36,3 +37,4 @@ 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 82b0925d8aa..454c127260e 100644 --- a/TESTS/netsocket/tcp/tcpsocket_open_limit.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_open_limit.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -96,3 +97,4 @@ 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 a9476dcdd87..8ed0fb273be 100644 --- a/TESTS/netsocket/tcp/tcpsocket_open_twice.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_open_twice.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "greentea-client/test_env.h" #include "mbed.h" #include "tcp_tests.h" @@ -37,3 +38,4 @@ 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 434cd0e0f0f..3485ebff44b 100644 --- a/TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -195,3 +196,4 @@ 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 24aec0d881d..6c87c91374f 100644 --- a/TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -88,3 +89,4 @@ void TCPSOCKET_RECV_TIMEOUT() 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 8c257527c9b..ff7992d39be 100644 --- a/TESTS/netsocket/tcp/tcpsocket_send_repeat.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_send_repeat.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -43,3 +44,4 @@ 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 7aa31a17b3c..850a4b56bd0 100644 --- a/TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -52,3 +53,4 @@ 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 d843c37bfa2..8e8c74785c4 100644 --- a/TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -49,3 +50,4 @@ 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 c88e0dad23c..0767af43f92 100644 --- a/TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed.h" #include "TCPSocket.h" #include "greentea-client/test_env.h" @@ -167,3 +168,4 @@ 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 e17eb53bfcb..27f3cef1647 100644 --- a/TESTS/netsocket/tls/main.cpp +++ b/TESTS/netsocket/tls/main.cpp @@ -15,6 +15,9 @@ * limitations under the License. */ +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] tls test cases requires RTOS to run +#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)) @@ -251,3 +254,4 @@ 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 85fad115e44..42ea6f0735f 100644 --- a/TESTS/netsocket/tls/tls_tests.h +++ b/TESTS/netsocket/tls/tls_tests.h @@ -17,6 +17,7 @@ #ifndef TLS_TESTS_H #define TLS_TESTS_H +#if defined(MBED_CONF_RTOS_PRESENT) #include "../test_params.h" #include "TLSSocket.h" @@ -83,5 +84,5 @@ void TLSSOCKET_SIMULTANEOUS(); void TLSSOCKET_SEND_TIMEOUT(); #endif // defined(MBEDTLS_SSL_CLI_C) || defined(DOXYGEN_ONLY) - +#endif // !defined(MBED_CONF_RTOS_PRESENT) #endif //TLS_TESTS_H diff --git a/TESTS/netsocket/udp/main.cpp b/TESTS/netsocket/udp/main.cpp index 680b2cc92fd..756a5c8e32a 100644 --- a/TESTS/netsocket/udp/main.cpp +++ b/TESTS/netsocket/udp/main.cpp @@ -15,6 +15,10 @@ * limitations under the License. */ +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] udp test cases requires RTOS to run. +#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)) @@ -204,3 +208,4 @@ 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 ea0c807988d..dff17af5f1b 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,3 +554,4 @@ 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 319f14dffec..21e25a64f40 100644 --- a/TESTS/network/emac/emac_TestMemoryManager.h +++ b/TESTS/network/emac/emac_TestMemoryManager.h @@ -17,6 +17,7 @@ #ifndef EMAC_TEST_MEMORY_MANAGER_H #define EMAC_TEST_MEMORY_MANAGER_H +#if defined(MBED_CONF_RTOS_PRESENT) #include @@ -225,5 +226,5 @@ class EmacTestMemoryManager : public EMACMemoryManager { 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 3a4f63cde01..544cc5c55f4 100644 --- a/TESTS/network/emac/emac_TestNetworkStack.cpp +++ b/TESTS/network/emac/emac_TestNetworkStack.cpp @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "unity.h" @@ -202,4 +203,5 @@ 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 4cadc194ce6..36319205080 100644 --- a/TESTS/network/emac/emac_TestNetworkStack.h +++ b/TESTS/network/emac/emac_TestNetworkStack.h @@ -17,6 +17,7 @@ #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" @@ -387,5 +388,5 @@ class EmacTestNetworkStack : public OnboardNetworkStack, private mbed::NonCopyab 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 ba4de82dac1..377a95e6b2c 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 e49cc878977..9c9a89d10c4 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 ff54da18441..ed3f2729cf9 100644 --- a/TESTS/network/emac/emac_initialize.h +++ b/TESTS/network/emac/emac_initialize.h @@ -17,10 +17,11 @@ #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 3df35301f2e..f6c1580acb5 100644 --- a/TESTS/network/emac/emac_membuf.cpp +++ b/TESTS/network/emac/emac_membuf.cpp @@ -14,6 +14,7 @@ * 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" @@ -75,3 +76,4 @@ 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 17510ae161b..588c74cc53a 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 4d378b2cbfa..6f8f579d010 100644 --- a/TESTS/network/emac/emac_test_broadcast.cpp +++ b/TESTS/network/emac/emac_test_broadcast.cpp @@ -14,6 +14,7 @@ * 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" @@ -99,3 +100,4 @@ 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 e297c26e872..91fd40d2439 100644 --- a/TESTS/network/emac/emac_test_initialize.cpp +++ b/TESTS/network/emac/emac_test_initialize.cpp @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include #include "mbed.h" @@ -117,3 +118,4 @@ 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 1cea9357211..8b1c797a0d7 100644 --- a/TESTS/network/emac/emac_test_memory.cpp +++ b/TESTS/network/emac/emac_test_memory.cpp @@ -14,6 +14,7 @@ * 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" @@ -161,3 +162,4 @@ 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 d7e898f0219..345bcc0f6d4 100644 --- a/TESTS/network/emac/emac_test_multicast_filter.cpp +++ b/TESTS/network/emac/emac_test_multicast_filter.cpp @@ -14,6 +14,7 @@ * 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" @@ -171,3 +172,5 @@ 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 1933ef1738a..4ab914200b0 100644 --- a/TESTS/network/emac/emac_test_unicast.cpp +++ b/TESTS/network/emac/emac_test_unicast.cpp @@ -14,6 +14,7 @@ * 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,3 +77,4 @@ 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 7391de797bd..3a193e866c2 100644 --- a/TESTS/network/emac/emac_test_unicast_burst.cpp +++ b/TESTS/network/emac/emac_test_unicast_burst.cpp @@ -14,6 +14,7 @@ * 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" @@ -84,3 +85,5 @@ 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 84e3b713bfc..745fb09d67a 100644 --- a/TESTS/network/emac/emac_test_unicast_frame_len.cpp +++ b/TESTS/network/emac/emac_test_unicast_frame_len.cpp @@ -14,6 +14,7 @@ * 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" @@ -79,3 +80,4 @@ 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 f8bacaf979e..3032341b37b 100644 --- a/TESTS/network/emac/emac_test_unicast_long.cpp +++ b/TESTS/network/emac/emac_test_unicast_long.cpp @@ -14,6 +14,7 @@ * 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" @@ -81,3 +82,4 @@ 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 6dbcd340a32..a645a3cfe05 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 9e90f2587b0..a1cf7b9046a 100644 --- a/TESTS/network/emac/emac_util.cpp +++ b/TESTS/network/emac/emac_util.cpp @@ -14,6 +14,7 @@ * 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" @@ -582,3 +583,4 @@ 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 26f5b7339d9..b6eccd6c632 100644 --- a/TESTS/network/emac/emac_util.h +++ b/TESTS/network/emac/emac_util.h @@ -17,6 +17,7 @@ #ifndef EMAC_UTIL_H #define EMAC_UTIL_H +#if defined(MBED_CONF_RTOS_PRESENT) #define SECOND_TO_US 1000000 #define SECOND_TO_MS 1000 @@ -124,5 +125,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 2b17fce2f21..fc71288f155 100644 --- a/TESTS/network/emac/main.cpp +++ b/TESTS/network/emac/main.cpp @@ -14,6 +14,9 @@ * 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 requires RTOS to run +#else #if !defined(MBED_CONF_APP_ECHO_SERVER) || \ !defined(MBED_CONF_APP_ECHO_SERVER_TRACE) || \ @@ -90,3 +93,4 @@ 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 123bcf9bc51..02b90844349 100644 --- a/TESTS/network/interface/main.cpp +++ b/TESTS/network/interface/main.cpp @@ -15,6 +15,10 @@ * limitations under the License. */ +#if !defined(MBED_CONF_RTOS_PRESENT) +#error [NOT_SUPPORTED] network interface test cases requires RTOS to run. +#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)) @@ -56,3 +60,4 @@ 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 c8eee25a7ca..6a0cfb4a6a7 100644 --- a/TESTS/network/l3ip/cellular_driver_l3ip.cpp +++ b/TESTS/network/l3ip/cellular_driver_l3ip.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#if defined(MBED_CONF_RTOS_PRESENT) #include "mbed_interface.h" #include "netsocket/nsapi_types.h" @@ -112,7 +113,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 1772416c44c..3ce7d163aa3 100644 --- a/TESTS/network/l3ip/cellular_driver_l3ip.h +++ b/TESTS/network/l3ip/cellular_driver_l3ip.h @@ -17,6 +17,7 @@ #ifndef CELLULAR_DRIVER_L3IP_H_ #define CELLULAR_DRIVER_L3IP_H_ +#if defined(MBED_CONF_RTOS_PRESENT) #include "L3IP.h" @@ -133,3 +134,4 @@ class Cellular_driver_L3IP : public L3IP { }; #endif /* CELLULAR_DRIVER_L3IP_H_ */ +#endif diff --git a/TESTS/network/l3ip/main.cpp b/TESTS/network/l3ip/main.cpp index abca2b7e3fa..8e6145d22af 100644 --- a/TESTS/network/l3ip/main.cpp +++ b/TESTS/network/l3ip/main.cpp @@ -14,7 +14,9 @@ * 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 requires RTOS to run +#else #include "mbed.h" #include "greentea-client/test_env.h" @@ -78,3 +80,4 @@ int main() { return !Harness::run(specification); } +#endif From 120ca1b245bd806049d0612e719f082939e24c06 Mon Sep 17 00:00:00 2001 From: RAJKUMAR KANAGARAJ Date: Thu, 7 Nov 2019 07:48:43 -0800 Subject: [PATCH 2/3] Incorporated the review comments --- TESTS/netsocket/dns/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TESTS/netsocket/dns/main.cpp b/TESTS/netsocket/dns/main.cpp index 681e734333d..46b7a613ac8 100644 --- a/TESTS/netsocket/dns/main.cpp +++ b/TESTS/netsocket/dns/main.cpp @@ -16,7 +16,7 @@ */ #if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] Test not supported. +#error [NOT_SUPPORTED] dns test cases requires RTOS to run. #else #define WIFI 2 From a682fde31ce19b0634a8459efb819ff5cafcfc50 Mon Sep 17 00:00:00 2001 From: RAJKUMAR KANAGARAJ Date: Mon, 11 Nov 2019 04:57:42 -0800 Subject: [PATCH 3/3] Incorporated review comments --- TESTS/lorawan/loraradio/main.cpp | 2 +- TESTS/netsocket/dns/asynchronous_dns.cpp | 2 +- TESTS/netsocket/dns/asynchronous_dns_cache.cpp | 2 +- TESTS/netsocket/dns/asynchronous_dns_cancel.cpp | 2 +- TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp | 2 +- TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp | 2 +- TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp | 2 +- TESTS/netsocket/dns/dns_tests.h | 2 -- TESTS/netsocket/dns/main.cpp | 2 +- TESTS/netsocket/dns/synchronous_dns.cpp | 2 +- TESTS/netsocket/dns/synchronous_dns_cache.cpp | 2 +- TESTS/netsocket/dns/synchronous_dns_invalid.cpp | 2 +- TESTS/netsocket/dns/synchronous_dns_multiple.cpp | 2 +- TESTS/netsocket/tcp/main.cpp | 2 +- TESTS/netsocket/tcp/tcp_tests.h | 2 -- TESTS/netsocket/tcp/tcpsocket_bind_address.cpp | 2 +- TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp | 2 +- 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 +- TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp | 2 +- TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp | 2 +- TESTS/netsocket/tls/main.cpp | 2 +- TESTS/netsocket/tls/tls_tests.h | 3 +-- TESTS/netsocket/udp/main.cpp | 2 +- TESTS/network/emac/emac_TestMemoryManager.cpp | 2 +- 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 | 2 +- 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 | 2 +- TESTS/network/emac/emac_test_unicast.cpp | 2 +- TESTS/network/emac/emac_test_unicast_burst.cpp | 2 +- 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 | 2 +- TESTS/network/interface/main.cpp | 2 +- TESTS/network/l3ip/cellular_driver_l3ip.cpp | 2 +- TESTS/network/l3ip/cellular_driver_l3ip.h | 2 -- TESTS/network/l3ip/main.cpp | 2 +- 65 files changed, 65 insertions(+), 76 deletions(-) diff --git a/TESTS/lorawan/loraradio/main.cpp b/TESTS/lorawan/loraradio/main.cpp index ce42d253213..5c7ba2f83ad 100644 --- a/TESTS/lorawan/loraradio/main.cpp +++ b/TESTS/lorawan/loraradio/main.cpp @@ -14,7 +14,7 @@ * limitations under the License. */ #if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] LORADIO test cases requires RTOS to run. +#error [NOT_SUPPORTED] LORADIO test cases require a RTOS to run. #else #include "utest.h" diff --git a/TESTS/netsocket/dns/asynchronous_dns.cpp b/TESTS/netsocket/dns/asynchronous_dns.cpp index 0d713224b09..bcabd5f2f18 100644 --- a/TESTS/netsocket/dns/asynchronous_dns.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns.cpp @@ -42,4 +42,4 @@ void ASYNCHRONOUS_DNS() TEST_ASSERT_EQUAL(0, result_dns_failure); TEST_ASSERT_EQUAL(0, result_exp_timeout); } -#endif +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/asynchronous_dns_cache.cpp b/TESTS/netsocket/dns/asynchronous_dns_cache.cpp index bc5f8ac01e0..24dfb5f2fb3 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_cache.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_cache.cpp @@ -67,4 +67,4 @@ void ASYNCHRONOUS_DNS_CACHE() dns_test_hosts[0], data.addr.get_ip_address(), delay_ms); } } -#endif +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/asynchronous_dns_cancel.cpp b/TESTS/netsocket/dns/asynchronous_dns_cancel.cpp index abf02d7db43..1069ec0b908 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_cancel.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_cancel.cpp @@ -87,4 +87,4 @@ void ASYNCHRONOUS_DNS_CANCEL() ThisThread::sleep_for(5000); } -#endif // #if defined(MBED_CONF_RTOS_PRESENT) +#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 24d812986c0..1a221daf575 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp @@ -43,4 +43,4 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS() TEST_ASSERT_EQUAL(0, result_dns_failure); TEST_ASSERT_EQUAL(0, result_exp_timeout); } -#endif +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp b/TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp index a4966f01c00..0be6f77f632 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp @@ -44,4 +44,4 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS_CACHE() TEST_ASSERT_EQUAL(0, result_dns_failure); TEST_ASSERT_EQUAL(0, result_exp_timeout); } -#endif +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp b/TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp index f66a82de6c6..f424104d7d5 100644 --- a/TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp +++ b/TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp @@ -46,4 +46,4 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS_REPEAT() TEST_ASSERT_EQUAL(0, result_exp_timeout); } } -#endif +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/dns_tests.h b/TESTS/netsocket/dns/dns_tests.h index f6ea697c8b5..887e3a091f6 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 46b7a613ac8..13ec86f1ac7 100644 --- a/TESTS/netsocket/dns/main.cpp +++ b/TESTS/netsocket/dns/main.cpp @@ -16,7 +16,7 @@ */ #if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] dns test cases requires RTOS to run. +#error [NOT_SUPPORTED] dns test cases require a RTOS to run. #else #define WIFI 2 diff --git a/TESTS/netsocket/dns/synchronous_dns.cpp b/TESTS/netsocket/dns/synchronous_dns.cpp index 70968d1db2f..ef3d5f1456d 100644 --- a/TESTS/netsocket/dns/synchronous_dns.cpp +++ b/TESTS/netsocket/dns/synchronous_dns.cpp @@ -41,4 +41,4 @@ void SYNCHRONOUS_DNS() TEST_ASSERT_EQUAL(0, result_dns_failure); TEST_ASSERT_EQUAL(0, result_exp_timeout); } -#endif +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/synchronous_dns_cache.cpp b/TESTS/netsocket/dns/synchronous_dns_cache.cpp index 935d3f5716f..9d50b72aaf8 100644 --- a/TESTS/netsocket/dns/synchronous_dns_cache.cpp +++ b/TESTS/netsocket/dns/synchronous_dns_cache.cpp @@ -56,4 +56,4 @@ void SYNCHRONOUS_DNS_CACHE() dns_test_hosts[0], address.get_ip_address(), delay_ms); } } -#endif +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/synchronous_dns_invalid.cpp b/TESTS/netsocket/dns/synchronous_dns_invalid.cpp index b956e98949e..baf2428ca3c 100644 --- a/TESTS/netsocket/dns/synchronous_dns_invalid.cpp +++ b/TESTS/netsocket/dns/synchronous_dns_invalid.cpp @@ -61,4 +61,4 @@ void SYNCHRONOUS_DNS_INVALID() TEST_ASSERT_EQUAL(expected_failures, result_dns_failure); TEST_ASSERT_EQUAL(0, result_exp_timeout); } -#endif +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/synchronous_dns_multiple.cpp b/TESTS/netsocket/dns/synchronous_dns_multiple.cpp index 1891bf50ec2..e7ae53814f4 100644 --- a/TESTS/netsocket/dns/synchronous_dns_multiple.cpp +++ b/TESTS/netsocket/dns/synchronous_dns_multiple.cpp @@ -41,4 +41,4 @@ void SYNCHRONOUS_DNS_MULTIPLE() TEST_ASSERT_EQUAL(0, result_dns_failure); TEST_ASSERT_EQUAL(0, result_exp_timeout); } -#endif +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/main.cpp b/TESTS/netsocket/tcp/main.cpp index eb3111ea5d2..210f6c5be68 100644 --- a/TESTS/netsocket/tcp/main.cpp +++ b/TESTS/netsocket/tcp/main.cpp @@ -16,7 +16,7 @@ */ #if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] tcp test cases requires RTOS to run +#error [NOT_SUPPORTED] tcp test cases require a RTOS to run #else #define WIFI 2 diff --git a/TESTS/netsocket/tcp/tcp_tests.h b/TESTS/netsocket/tcp/tcp_tests.h index fd7f0d89703..08b3a22d718 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 dcd9ee28d39..78a8bf6e0d6 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_address.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_address.cpp @@ -44,4 +44,4 @@ void TCPSOCKET_BIND_ADDRESS() delete sock; } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp index 49222d9ac2a..489175ac6be 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp @@ -51,4 +51,4 @@ void TCPSOCKET_BIND_ADDRESS_INVALID() delete sock; } -#endif +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_address_null.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_address_null.cpp index d4b8348948a..37008c8599f 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_address_null.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_address_null.cpp @@ -43,4 +43,4 @@ void TCPSOCKET_BIND_ADDRESS_NULL() delete sock; } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_address_port.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_address_port.cpp index b6ea7ca5ca2..feba0e5396f 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_address_port.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_address_port.cpp @@ -43,4 +43,4 @@ void TCPSOCKET_BIND_ADDRESS_PORT() delete sock; } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_port.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_port.cpp index bd5a6930889..1c2e2514f8f 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_port.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_port.cpp @@ -43,4 +43,4 @@ void TCPSOCKET_BIND_PORT() delete sock; } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp index 33461b9317e..2087761ecbb 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp @@ -53,4 +53,4 @@ void TCPSOCKET_BIND_PORT_FAIL() delete sock; delete sock2; } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp index c4eab7b69ca..53a5474b475 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp @@ -42,4 +42,4 @@ void TCPSOCKET_BIND_UNOPENED() delete sock; } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp index 4abc4f73abf..0a6cf9ece47 100644 --- a/TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp @@ -52,4 +52,4 @@ void TCPSOCKET_BIND_WRONG_TYPE() delete sock; } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp b/TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp index 3fb81d7bc76..02be4dbc57a 100644 --- a/TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp @@ -38,4 +38,4 @@ void TCPSOCKET_CONNECT_INVALID() TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_echotest.cpp b/TESTS/netsocket/tcp/tcpsocket_echotest.cpp index f05cf5ef751..b472da2f8bd 100644 --- a/TESTS/netsocket/tcp/tcpsocket_echotest.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_echotest.cpp @@ -202,4 +202,4 @@ void TCPSOCKET_ECHOTEST_NONBLOCK() tc_exec_time.stop(); free(stack_mem); } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp b/TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp index 532d9015b5d..d1629a8d397 100644 --- a/TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp @@ -142,4 +142,4 @@ void TCPSOCKET_ECHOTEST_BURST_NONBLOCK() END: TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp b/TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp index a04b95fa2e8..cf54f00fd36 100644 --- a/TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp @@ -89,4 +89,4 @@ void TCPSOCKET_ENDPOINT_CLOSE() tc_exec_time.stop(); TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_open_close_repeat.cpp b/TESTS/netsocket/tcp/tcpsocket_open_close_repeat.cpp index efc885851e1..f93bcca13f2 100644 --- a/TESTS/netsocket/tcp/tcpsocket_open_close_repeat.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_open_close_repeat.cpp @@ -39,4 +39,4 @@ void TCPSOCKET_OPEN_CLOSE_REPEAT() } delete sock; } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp b/TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp index 508143c4166..c8dd5c825fc 100644 --- a/TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp @@ -37,4 +37,4 @@ void TCPSOCKET_OPEN_DESTRUCT() delete sock; } } -#endif +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_open_limit.cpp b/TESTS/netsocket/tcp/tcpsocket_open_limit.cpp index 454c127260e..4d9854820b8 100644 --- a/TESTS/netsocket/tcp/tcpsocket_open_limit.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_open_limit.cpp @@ -97,4 +97,4 @@ 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 +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_open_twice.cpp b/TESTS/netsocket/tcp/tcpsocket_open_twice.cpp index 8ed0fb273be..63fdd1886b8 100644 --- a/TESTS/netsocket/tcp/tcpsocket_open_twice.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_open_twice.cpp @@ -38,4 +38,4 @@ void TCPSOCKET_OPEN_TWICE() delete sock; } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp b/TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp index 3485ebff44b..2ca6b165c46 100644 --- a/TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp @@ -196,4 +196,4 @@ void TCPSOCKET_RECV_100K_NONBLOCK() TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp b/TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp index 6c87c91374f..49a43bc649d 100644 --- a/TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp @@ -89,4 +89,4 @@ void TCPSOCKET_RECV_TIMEOUT() tc_exec_time.stop(); TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_send_repeat.cpp b/TESTS/netsocket/tcp/tcpsocket_send_repeat.cpp index ff7992d39be..8e8a124d89e 100644 --- a/TESTS/netsocket/tcp/tcpsocket_send_repeat.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_send_repeat.cpp @@ -44,4 +44,4 @@ void TCPSOCKET_SEND_REPEAT() TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp b/TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp index 850a4b56bd0..e04a3fac1b6 100644 --- a/TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp @@ -53,4 +53,4 @@ void TCPSOCKET_SEND_TIMEOUT() TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp b/TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp index 8e8c74785c4..54fb970d04e 100644 --- a/TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_setsockopt_keepalive_valid.cpp @@ -50,4 +50,4 @@ 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 +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp b/TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp index 0767af43f92..eb8ca27a3f2 100644 --- a/TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp +++ b/TESTS/netsocket/tcp/tcpsocket_thread_per_socket_safety.cpp @@ -168,4 +168,4 @@ void TCPSOCKET_THREAD_PER_SOCKET_SAFETY() running = false; thread.join(); } -#endif \ No newline at end of file +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tls/main.cpp b/TESTS/netsocket/tls/main.cpp index 27f3cef1647..33186b745fa 100644 --- a/TESTS/netsocket/tls/main.cpp +++ b/TESTS/netsocket/tls/main.cpp @@ -16,7 +16,7 @@ */ #if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] tls test cases requires RTOS to run +#error [NOT_SUPPORTED] tls test cases require a RTOS to run #else #define WIFI 2 #if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \ diff --git a/TESTS/netsocket/tls/tls_tests.h b/TESTS/netsocket/tls/tls_tests.h index 42ea6f0735f..85fad115e44 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 // !defined(MBED_CONF_RTOS_PRESENT) + #endif //TLS_TESTS_H diff --git a/TESTS/netsocket/udp/main.cpp b/TESTS/netsocket/udp/main.cpp index 756a5c8e32a..7f9d9d660b6 100644 --- a/TESTS/netsocket/udp/main.cpp +++ b/TESTS/netsocket/udp/main.cpp @@ -16,7 +16,7 @@ */ #if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] udp test cases requires RTOS to run. +#error [NOT_SUPPORTED] udp test cases require a RTOS to run. #else #define WIFI 2 diff --git a/TESTS/network/emac/emac_TestMemoryManager.cpp b/TESTS/network/emac/emac_TestMemoryManager.cpp index dff17af5f1b..e9c02b7f0a8 100644 --- a/TESTS/network/emac/emac_TestMemoryManager.cpp +++ b/TESTS/network/emac/emac_TestMemoryManager.cpp @@ -554,4 +554,4 @@ EmacTestMemoryManager &EmacTestMemoryManager::get_instance() return test_memory_manager; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_TestMemoryManager.h b/TESTS/network/emac/emac_TestMemoryManager.h index 21e25a64f40..319f14dffec 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 @@ class EmacTestMemoryManager : public EMACMemoryManager { 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 544cc5c55f4..f72ebc96eb8 100644 --- a/TESTS/network/emac/emac_TestNetworkStack.cpp +++ b/TESTS/network/emac/emac_TestNetworkStack.cpp @@ -203,5 +203,5 @@ OnboardNetworkStack &OnboardNetworkStack::get_default_instance() { return EmacTestNetworkStack::get_instance(); } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) +#endif // defined(MBED_CONF_RTOS_PRESENT) #endif diff --git a/TESTS/network/emac/emac_TestNetworkStack.h b/TESTS/network/emac/emac_TestNetworkStack.h index 36319205080..4cadc194ce6 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 @@ class EmacTestNetworkStack : public OnboardNetworkStack, private mbed::NonCopyab 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 377a95e6b2c..5e19c3af698 100644 --- a/TESTS/network/emac/emac_ctp.cpp +++ b/TESTS/network/emac/emac_ctp.cpp @@ -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) +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_ctp.h b/TESTS/network/emac/emac_ctp.h index 9c9a89d10c4..e49cc878977 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 ed3f2729cf9..ff54da18441 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 f6c1580acb5..19407dd33ea 100644 --- a/TESTS/network/emac/emac_membuf.cpp +++ b/TESTS/network/emac/emac_membuf.cpp @@ -76,4 +76,4 @@ void emac_if_memory_buffer_write(void *buf, unsigned char *eth_frame, bool write } } } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_membuf.h b/TESTS/network/emac/emac_membuf.h index 588c74cc53a..17510ae161b 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 6f8f579d010..3d6585f03a0 100644 --- a/TESTS/network/emac/emac_test_broadcast.cpp +++ b/TESTS/network/emac/emac_test_broadcast.cpp @@ -100,4 +100,4 @@ void test_emac_broadcast(void) RESET_OUTGOING_MSG_DATA; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_test_initialize.cpp b/TESTS/network/emac/emac_test_initialize.cpp index 91fd40d2439..d462fd7e5d0 100644 --- a/TESTS/network/emac/emac_test_initialize.cpp +++ b/TESTS/network/emac/emac_test_initialize.cpp @@ -118,4 +118,4 @@ bool emac_if_init(EMAC *emac) return true; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_test_memory.cpp b/TESTS/network/emac/emac_test_memory.cpp index 8b1c797a0d7..94822954fcc 100644 --- a/TESTS/network/emac/emac_test_memory.cpp +++ b/TESTS/network/emac/emac_test_memory.cpp @@ -162,4 +162,4 @@ void test_emac_memory() TEST_ASSERT_FALSE(ERROR_FLAGS); RESET_OUTGOING_MSG_DATA; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) +#endif // 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 345bcc0f6d4..af37a7fcdff 100644 --- a/TESTS/network/emac/emac_test_multicast_filter.cpp +++ b/TESTS/network/emac/emac_test_multicast_filter.cpp @@ -173,4 +173,4 @@ void test_emac_multicast_filter() RESET_OUTGOING_MSG_DATA; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_test_unicast.cpp b/TESTS/network/emac/emac_test_unicast.cpp index 4ab914200b0..7aac8da55b5 100644 --- a/TESTS/network/emac/emac_test_unicast.cpp +++ b/TESTS/network/emac/emac_test_unicast.cpp @@ -77,4 +77,4 @@ void test_emac_unicast() RESET_OUTGOING_MSG_DATA; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) +#endif // 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 3a193e866c2..51c20eb2699 100644 --- a/TESTS/network/emac/emac_test_unicast_burst.cpp +++ b/TESTS/network/emac/emac_test_unicast_burst.cpp @@ -86,4 +86,4 @@ void test_emac_unicast_burst() RESET_OUTGOING_MSG_DATA; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) +#endif // 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 745fb09d67a..4d0a5836955 100644 --- a/TESTS/network/emac/emac_test_unicast_frame_len.cpp +++ b/TESTS/network/emac/emac_test_unicast_frame_len.cpp @@ -80,4 +80,4 @@ void test_emac_unicast_frame_len() TEST_ASSERT_FALSE(ERROR_FLAGS); RESET_OUTGOING_MSG_DATA; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) +#endif // 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 3032341b37b..04a9a3acca5 100644 --- a/TESTS/network/emac/emac_test_unicast_long.cpp +++ b/TESTS/network/emac/emac_test_unicast_long.cpp @@ -82,4 +82,4 @@ void test_emac_unicast_long() TEST_ASSERT_FALSE(ERROR_FLAGS); RESET_OUTGOING_MSG_DATA; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_tests.h b/TESTS/network/emac/emac_tests.h index a645a3cfe05..6dbcd340a32 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 a1cf7b9046a..e74278cbc84 100644 --- a/TESTS/network/emac/emac_util.cpp +++ b/TESTS/network/emac/emac_util.cpp @@ -583,4 +583,4 @@ void emac_if_set_mtu_size(int mtu_size) { eth_mtu_size = mtu_size; } -#endif //#if defined(MBED_CONF_RTOS_PRESENT) +#endif // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_util.h b/TESTS/network/emac/emac_util.h index b6eccd6c632..26f5b7339d9 100644 --- a/TESTS/network/emac/emac_util.h +++ b/TESTS/network/emac/emac_util.h @@ -17,7 +17,6 @@ #ifndef EMAC_UTIL_H #define EMAC_UTIL_H -#if defined(MBED_CONF_RTOS_PRESENT) #define SECOND_TO_US 1000000 #define SECOND_TO_MS 1000 @@ -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 fc71288f155..da8028744da 100644 --- a/TESTS/network/emac/main.cpp +++ b/TESTS/network/emac/main.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ #if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] EMAC test cases requires RTOS to run +#error [NOT_SUPPORTED] EMAC test cases require a RTOS to run #else #if !defined(MBED_CONF_APP_ECHO_SERVER) || \ diff --git a/TESTS/network/interface/main.cpp b/TESTS/network/interface/main.cpp index 02b90844349..b7799de2d4d 100644 --- a/TESTS/network/interface/main.cpp +++ b/TESTS/network/interface/main.cpp @@ -16,7 +16,7 @@ */ #if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] network interface test cases requires RTOS to run. +#error [NOT_SUPPORTED] network interface test cases require a RTOS to run. #else #define WIFI 2 diff --git a/TESTS/network/l3ip/cellular_driver_l3ip.cpp b/TESTS/network/l3ip/cellular_driver_l3ip.cpp index 6a0cfb4a6a7..74a7833935c 100644 --- a/TESTS/network/l3ip/cellular_driver_l3ip.cpp +++ b/TESTS/network/l3ip/cellular_driver_l3ip.cpp @@ -113,7 +113,7 @@ MBED_WEAK L3IP &L3IP::get_default_instance() { return Cellular_driver_L3IP::get_instance(); } -#endif +#endif // defined(MBED_CONF_RTOS_PRESENT) /** * @} */ diff --git a/TESTS/network/l3ip/cellular_driver_l3ip.h b/TESTS/network/l3ip/cellular_driver_l3ip.h index 3ce7d163aa3..1772416c44c 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 @@ class Cellular_driver_L3IP : public L3IP { }; #endif /* CELLULAR_DRIVER_L3IP_H_ */ -#endif diff --git a/TESTS/network/l3ip/main.cpp b/TESTS/network/l3ip/main.cpp index 8e6145d22af..8263e87ccd5 100644 --- a/TESTS/network/l3ip/main.cpp +++ b/TESTS/network/l3ip/main.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ #if !defined(MBED_CONF_RTOS_PRESENT) -#error [NOT_SUPPORTED] l3ip test cases requires RTOS to run +#error [NOT_SUPPORTED] l3ip test cases require a RTOS to run #else #include "mbed.h"