Merge pull request #11824 from rajkan01/feature-baremetal-greentea-net

Skip Bare Metal green tea test for Network component
pull/11872/head
Martin Kojtal 2019-11-12 11:09:46 +01:00 committed by GitHub
commit 09c24507c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
58 changed files with 148 additions and 5 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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 <stdio.h>
#include <stdarg.h>
#include <string.h>
@ -554,3 +554,4 @@ EmacTestMemoryManager &EmacTestMemoryManager::get_instance()
return test_memory_manager;
}
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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 <inttypes.h>
#include "mbed.h"
@ -117,3 +118,4 @@ bool emac_if_init(EMAC *emac)
return true;
}
#endif // defined(MBED_CONF_RTOS_PRESENT)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)
/**
* @}
*/

View File

@ -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