Skip to content

Skip Bare Metal green tea test for Network component #11824

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions TESTS/lorawan/loraradio/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
3 changes: 3 additions & 0 deletions TESTS/netsocket/dns/asynchronous_dns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
2 changes: 2 additions & 0 deletions TESTS/netsocket/dns/asynchronous_dns_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
2 changes: 2 additions & 0 deletions TESTS/netsocket/dns/asynchronous_dns_cancel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -86,3 +87,4 @@ void ASYNCHRONOUS_DNS_CANCEL()

ThisThread::sleep_for(5000);
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
2 changes: 2 additions & 0 deletions TESTS/netsocket/dns/asynchronous_dns_external_event_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -76,3 +77,4 @@ void ASYNCHRONOUS_DNS_EXTERNAL_EVENT_QUEUE()

nsapi_dns_call_in_set(0);
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
3 changes: 3 additions & 0 deletions TESTS/netsocket/dns/asynchronous_dns_invalid_host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
3 changes: 3 additions & 0 deletions TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
3 changes: 3 additions & 0 deletions TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
3 changes: 3 additions & 0 deletions TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
3 changes: 3 additions & 0 deletions TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -44,3 +46,4 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS_REPEAT()
TEST_ASSERT_EQUAL(0, result_exp_timeout);
}
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
3 changes: 3 additions & 0 deletions TESTS/netsocket/dns/asynchronous_dns_timeouts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -69,3 +71,4 @@ void ASYNCHRONOUS_DNS_TIMEOUTS()

nsapi_dns_call_in_set(0);
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
5 changes: 5 additions & 0 deletions TESTS/netsocket/dns/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)
2 changes: 2 additions & 0 deletions TESTS/netsocket/dns/synchronous_dns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
3 changes: 3 additions & 0 deletions TESTS/netsocket/dns/synchronous_dns_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -54,3 +56,4 @@ void SYNCHRONOUS_DNS_CACHE()
dns_test_hosts[0], address.get_ip_address(), delay_ms);
}
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
3 changes: 3 additions & 0 deletions TESTS/netsocket/dns/synchronous_dns_invalid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
2 changes: 2 additions & 0 deletions TESTS/netsocket/dns/synchronous_dns_multiple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)
5 changes: 5 additions & 0 deletions TESTS/netsocket/tcp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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)
2 changes: 2 additions & 0 deletions TESTS/netsocket/tcp/tcpsocket_bind_address.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -43,3 +44,4 @@ void TCPSOCKET_BIND_ADDRESS()

delete sock;
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
3 changes: 3 additions & 0 deletions TESTS/netsocket/tcp/tcpsocket_bind_address_invalid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -49,3 +51,4 @@ void TCPSOCKET_BIND_ADDRESS_INVALID()

delete sock;
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
2 changes: 2 additions & 0 deletions TESTS/netsocket/tcp/tcpsocket_bind_address_null.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -42,3 +43,4 @@ void TCPSOCKET_BIND_ADDRESS_NULL()

delete sock;
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
2 changes: 2 additions & 0 deletions TESTS/netsocket/tcp/tcpsocket_bind_address_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -42,3 +43,4 @@ void TCPSOCKET_BIND_ADDRESS_PORT()

delete sock;
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
2 changes: 2 additions & 0 deletions TESTS/netsocket/tcp/tcpsocket_bind_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -42,3 +43,4 @@ void TCPSOCKET_BIND_PORT()

delete sock;
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
2 changes: 2 additions & 0 deletions TESTS/netsocket/tcp/tcpsocket_bind_port_fail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -52,3 +53,4 @@ void TCPSOCKET_BIND_PORT_FAIL()
delete sock;
delete sock2;
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
2 changes: 2 additions & 0 deletions TESTS/netsocket/tcp/tcpsocket_bind_unopened.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -41,3 +42,4 @@ void TCPSOCKET_BIND_UNOPENED()

delete sock;
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
2 changes: 2 additions & 0 deletions TESTS/netsocket/tcp/tcpsocket_bind_wrong_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -51,3 +52,4 @@ void TCPSOCKET_BIND_WRONG_TYPE()

delete sock;
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
2 changes: 2 additions & 0 deletions TESTS/netsocket/tcp/tcpsocket_connect_invalid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -37,3 +38,4 @@ void TCPSOCKET_CONNECT_INVALID()

TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
2 changes: 2 additions & 0 deletions TESTS/netsocket/tcp/tcpsocket_echotest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -201,3 +202,4 @@ void TCPSOCKET_ECHOTEST_NONBLOCK()
tc_exec_time.stop();
free(stack_mem);
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
2 changes: 2 additions & 0 deletions TESTS/netsocket/tcp/tcpsocket_echotest_burst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -141,3 +142,4 @@ void TCPSOCKET_ECHOTEST_BURST_NONBLOCK()
END:
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
}
#endif // defined(MBED_CONF_RTOS_PRESENT)
2 changes: 2 additions & 0 deletions TESTS/netsocket/tcp/tcpsocket_endpoint_close.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Loading