diff --git a/TESTS/lorawan/loraradio/main.cpp b/TESTS/lorawan/loraradio/main.cpp index f5daaa1308..5c7ba2f83a 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 require a 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 dd85271243..bcabd5f2f1 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/asynchronous_dns_cache.cpp b/TESTS/netsocket/dns/asynchronous_dns_cache.cpp index fa4a82361c..24dfb5f2fb 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/asynchronous_dns_cancel.cpp b/TESTS/netsocket/dns/asynchronous_dns_cancel.cpp index 1c744ee709..1069ec0b90 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 // 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 f786ac88b2..0a1334cb5d 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 383e34d36d..74777cb4a3 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 bdd3f8a359..b360091d8c 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 bd26e0af91..1a221daf57 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 // 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 5a3e25cbd0..0be6f77f63 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 // 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 d8040f747b..f424104d7d 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp b/TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp index f8aee5c543..8c01298245 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/main.cpp b/TESTS/netsocket/dns/main.cpp index 5eccbf851a..13ec86f1ac 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] dns test cases require a 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)) @@ -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 e1118cabbe..ef3d5f1456 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/synchronous_dns_cache.cpp b/TESTS/netsocket/dns/synchronous_dns_cache.cpp index affca8c2b1..9d50b72aaf 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/synchronous_dns_invalid.cpp b/TESTS/netsocket/dns/synchronous_dns_invalid.cpp index 3e549043bc..baf2428ca3 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/dns/synchronous_dns_multiple.cpp b/TESTS/netsocket/dns/synchronous_dns_multiple.cpp index 88b5e209ce..e7ae53814f 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/main.cpp b/TESTS/netsocket/tcp/main.cpp index 019908cde2..210f6c5be6 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 require a 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/tcpsocket_bind_address.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_address.cpp index 625b19e3f9..78a8bf6e0d 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 // 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 0e9a07c856..489175ac6b 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 // 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 2f48cd75b3..37008c8599 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 // 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 90a9a23ff4..feba0e5396 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_port.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_port.cpp index 91cf90230f..1c2e2514f8 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 // 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 fdb29a8890..2087761ecb 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp b/TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp index 5af3aa92fb..53a5474b47 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 // 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 77d5a63954..0a6cf9ece4 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp b/TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp index 640265d81f..02be4dbc57 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_echotest.cpp b/TESTS/netsocket/tcp/tcpsocket_echotest.cpp index b72284da35..b472da2f8b 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 @@ END: tc_exec_time.stop(); free(stack_mem); } +#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 7d7f659d4e..d1629a8d39 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp b/TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp index 65b7767b4f..cf54f00fd3 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 // 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 a8a4485d4e..f93bcca13f 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp b/TESTS/netsocket/tcp/tcpsocket_open_destruct.cpp index 39ddcc1c36..c8dd5c825f 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_open_limit.cpp b/TESTS/netsocket/tcp/tcpsocket_open_limit.cpp index 82b0925d8a..4d9854820b 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_open_twice.cpp b/TESTS/netsocket/tcp/tcpsocket_open_twice.cpp index a9476dcdd8..63fdd1886b 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp b/TESTS/netsocket/tcp/tcpsocket_recv_100k.cpp index 434cd0e0f0..2ca6b165c4 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp b/TESTS/netsocket/tcp/tcpsocket_recv_timeout.cpp index 24aec0d881..49a43bc649 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 @@ CLEANUP: tc_exec_time.stop(); TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } +#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 8c257527c9..8e8a124d89 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp b/TESTS/netsocket/tcp/tcpsocket_send_timeout.cpp index 7aa31a17b3..e04a3fac1b 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 // 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 d843c37bfa..54fb970d04 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 // 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 c88e0dad23..eb8ca27a3f 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/netsocket/tls/main.cpp b/TESTS/netsocket/tls/main.cpp index b79056a9f9..d09970b566 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 require a 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)) @@ -257,3 +260,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/udp/main.cpp b/TESTS/netsocket/udp/main.cpp index 680b2cc92f..7f9d9d660b 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 require a 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 ea0c807988..e9c02b7f0a 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_TestNetworkStack.cpp b/TESTS/network/emac/emac_TestNetworkStack.cpp index 3a4f63cde0..f72ebc96eb 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 // defined(MBED_CONF_RTOS_PRESENT) #endif diff --git a/TESTS/network/emac/emac_ctp.cpp b/TESTS/network/emac/emac_ctp.cpp index ba4de82dac..5e19c3af69 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_membuf.cpp b/TESTS/network/emac/emac_membuf.cpp index 3df35301f2..19407dd33e 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_test_broadcast.cpp b/TESTS/network/emac/emac_test_broadcast.cpp index 4d378b2cbf..3d6585f03a 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_test_initialize.cpp b/TESTS/network/emac/emac_test_initialize.cpp index e297c26e87..d462fd7e5d 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_test_memory.cpp b/TESTS/network/emac/emac_test_memory.cpp index 1cea935721..94822954fc 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 // 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 d7e898f021..af37a7fcdf 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_test_unicast.cpp b/TESTS/network/emac/emac_test_unicast.cpp index 1933ef1738..7aac8da55b 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 // 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 7391de797b..51c20eb269 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 // 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 84e3b713bf..4d0a583695 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 // 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 f8bacaf979..04a9a3acca 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/emac_util.cpp b/TESTS/network/emac/emac_util.cpp index 9e90f2587b..e74278cbc8 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 // defined(MBED_CONF_RTOS_PRESENT) diff --git a/TESTS/network/emac/main.cpp b/TESTS/network/emac/main.cpp index 2b17fce2f2..da8028744d 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 require a 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 123bcf9bc5..b7799de2d4 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 require a 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 c8eee25a7c..74a7833935 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 // defined(MBED_CONF_RTOS_PRESENT) /** * @} */ diff --git a/TESTS/network/l3ip/main.cpp b/TESTS/network/l3ip/main.cpp index abca2b7e3f..8263e87ccd 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 require a RTOS to run +#else #include "mbed.h" #include "greentea-client/test_env.h" @@ -78,3 +80,4 @@ int main() { return !Harness::run(specification); } +#endif