mirror of https://github.com/ARMmbed/mbed-os.git
Updated greentea DNS tests to use default interface
parent
5fa2edc73f
commit
aa80d6d14b
|
|
@ -15,7 +15,9 @@
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBED_CONF_APP_CONNECT_STATEMENT
|
#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))
|
||||||
#error [NOT_SUPPORTED] No network configuration found for this target.
|
#error [NOT_SUPPORTED] No network configuration found for this target.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -27,8 +29,6 @@
|
||||||
#include "EventQueue.h"
|
#include "EventQueue.h"
|
||||||
#include "dns_tests.h"
|
#include "dns_tests.h"
|
||||||
|
|
||||||
#include MBED_CONF_APP_HEADER_FILE
|
|
||||||
|
|
||||||
using namespace utest::v1;
|
using namespace utest::v1;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
@ -116,12 +116,10 @@ static void net_bringup()
|
||||||
{
|
{
|
||||||
MBED_ASSERT(MBED_CONF_APP_DNS_TEST_HOSTS_NUM >= MBED_CONF_NSAPI_DNS_CACHE_SIZE && MBED_CONF_APP_DNS_TEST_HOSTS_NUM >= MBED_CONF_APP_DNS_SIMULT_QUERIES + 1);
|
MBED_ASSERT(MBED_CONF_APP_DNS_TEST_HOSTS_NUM >= MBED_CONF_NSAPI_DNS_CACHE_SIZE && MBED_CONF_APP_DNS_TEST_HOSTS_NUM >= MBED_CONF_APP_DNS_SIMULT_QUERIES + 1);
|
||||||
|
|
||||||
net = MBED_CONF_APP_OBJECT_CONSTRUCTION;
|
net = NetworkInterface::get_default_instance();
|
||||||
int err = MBED_CONF_APP_CONNECT_STATEMENT;
|
nsapi_error_t err = net->connect();
|
||||||
TEST_ASSERT_EQUAL(0, err);
|
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, err);
|
||||||
|
printf("MBED: IP address is '%s'\n", net->get_ip_address());
|
||||||
printf("MBED: Connected to network\n");
|
|
||||||
printf("MBED: IP Address: %s\n", net->get_ip_address());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test setup
|
// Test setup
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue