mirror of https://github.com/ARMmbed/mbed-os.git
Netsocket,lora,cellular,nework test case requires RTOS so MBED_CONF_RTOS_PRESENT guard to all test cases
parent
e4164bee51
commit
c9eb48a0c5
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 //#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#ifndef EMAC_TEST_MEMORY_MANAGER_H
|
||||
#define EMAC_TEST_MEMORY_MANAGER_H
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include <list>
|
||||
|
||||
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 //#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue