diff --git a/TESTS/lorawan/loraradio/main.cpp b/TESTS/lorawan/loraradio/main.cpp index f5daaa1308..ce42d25321 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 dd85271243..0d713224b0 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 fa4a82361c..bc5f8ac01e 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 1c744ee709..abf02d7db4 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 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..24d812986c 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 5a3e25cbd0..a4966f01c0 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 d8040f747b..f66a82de6c 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 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/dns_tests.h b/TESTS/netsocket/dns/dns_tests.h index 887e3a091f..f6ea697c8b 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 5eccbf851a..681e734333 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 e1118cabbe..70968d1db2 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 affca8c2b1..935d3f5716 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 3e549043bc..b956e98949 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 88b5e209ce..1891bf50ec 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 019908cde2..eb3111ea5d 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 08b3a22d71..fd7f0d8970 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 625b19e3f9..dcd9ee28d3 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 0e9a07c856..49222d9ac2 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 2f48cd75b3..d4b8348948 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 90a9a23ff4..b6ea7ca5ca 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 91cf90230f..bd5a693088 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 fdb29a8890..33461b9317 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 5af3aa92fb..c4eab7b69c 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 77d5a63954..4abc4f73ab 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 640265d81f..3fb81d7bc7 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 b72284da35..f05cf5ef75 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 \ 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 7d7f659d4e..532d9015b5 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 65b7767b4f..a04b95fa2e 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 a8a4485d4e..efc885851e 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 39ddcc1c36..508143c416 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 82b0925d8a..454c127260 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 a9476dcdd8..8ed0fb273b 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 434cd0e0f0..3485ebff44 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 24aec0d881..6c87c91374 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 \ 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 8c257527c9..ff7992d39b 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 7aa31a17b3..850a4b56bd 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 d843c37bfa..8e8c74785c 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 c88e0dad23..0767af43f9 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 e17eb53bfc..27f3cef164 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 85fad115e4..42ea6f0735 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 680b2cc92f..756a5c8e32 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 ea0c807988..dff17af5f1 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 319f14dffe..21e25a64f4 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 @@ private: unsigned int m_alloc_unit; bool m_memory_available; }; - +#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */ #endif /* EMAC_TEST_MEMORY_MANAGER_H */ diff --git a/TESTS/network/emac/emac_TestNetworkStack.cpp b/TESTS/network/emac/emac_TestNetworkStack.cpp index 3a4f63cde0..544cc5c55f 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 4cadc194ce..3631920508 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 @@ private: Interface *m_interface; }; - +#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */ #endif /* EMAC_TEST_NETWORK_STACK_H */ diff --git a/TESTS/network/emac/emac_ctp.cpp b/TESTS/network/emac/emac_ctp.cpp index ba4de82dac..377a95e6b2 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 e49cc87897..9c9a89d10c 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 ff54da1844..ed3f2729cf 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 3df35301f2..f6c1580acb 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 17510ae161..588c74cc53 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 4d378b2cbf..6f8f579d01 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 e297c26e87..91fd40d243 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 1cea935721..8b1c797a0d 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 d7e898f021..345bcc0f6d 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 1933ef1738..4ab914200b 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 7391de797b..3a193e866c 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 84e3b713bf..745fb09d67 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 f8bacaf979..3032341b37 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 6dbcd340a3..a645a3cfe0 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 9e90f2587b..a1cf7b9046 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 26f5b7339d..b6eccd6c63 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 2b17fce2f2..fc71288f15 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 123bcf9bc5..02b9084434 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 c8eee25a7c..6a0cfb4a6a 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 1772416c44..3ce7d163aa 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 @@ private: }; #endif /* CELLULAR_DRIVER_L3IP_H_ */ +#endif diff --git a/TESTS/network/l3ip/main.cpp b/TESTS/network/l3ip/main.cpp index abca2b7e3f..8e6145d22a 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