@@ -30,16 +30,15 @@ using namespace utest::v1;
3030
3131/* *
3232 * WiFi tests require following macros to be defined:
33- * - WIFI_TEST_SSID - SSID of a network the test will try connecting to
34- * - WIFI_TEST_PASS - Passphrase that will be used to connecting to the network
33+ * - MBED_CONF_APP_WIFI_SSID - SSID of a network the test will try connecting to
34+ * - MBED_CONF_APP_WIFI_PASSWORD - Passphrase that will be used to connecting to the network
3535 * - WIFI_TEST_NETWORKS - List of network that presence will be asserted e.g. "net1", "net2", "net3"
3636 */
37- #if !defined(WIFI_TEST_SSID ) || !defined(WIFI_TEST_PASS ) || !defined(WIFI_TEST_NETWORKS )
38- #error WIFI_TEST_NETWORKS, WIFI_TEST_PASS and WIFI_TEST_NETWORKS have to be defined for this test.
37+ #if !defined(MBED_CONF_APP_WIFI_SSID ) || !defined(MBED_CONF_APP_WIFI_PASSWORD ) || !defined(MBED_CONF_APP_WIFI_NETWORKS )
38+ #error MBED_CONF_APP_WIFI_SSID, MBED_CONF_APP_WIFI_PASSWORD and MBED_CONF_APP_WIFI_NETWORKS have to be defined for this test.
3939#endif
4040
41-
42- const char *networks[] = {WIFI_TEST_NETWORKS, NULL };
41+ const char *networks[] = {MBED_CONF_APP_WIFI_NETWORKS, NULL };
4342
4443WiFiInterface *wifi;
4544
@@ -101,7 +100,7 @@ void wifi_connect()
101100{
102101 int ret;
103102
104- ret = get_wifi ()->connect (WIFI_TEST_SSID, WIFI_TEST_PASS , NSAPI_SECURITY_WPA_WPA2);
103+ ret = get_wifi ()->connect (MBED_CONF_APP_WIFI_SSID, MBED_CONF_APP_WIFI_PASSWORD , NSAPI_SECURITY_WPA_WPA2);
105104 TEST_ASSERT_MESSAGE (ret == 0 , " Connect failed" );
106105
107106 ret = get_wifi ()->disconnect ();
@@ -118,7 +117,7 @@ void wifi_connect_scan()
118117
119118 memset (net_stat, 0 , sizeof (net_stat));
120119
121- ret = get_wifi ()->connect (WIFI_TEST_SSID, WIFI_TEST_PASS , NSAPI_SECURITY_WPA_WPA2);
120+ ret = get_wifi ()->connect (MBED_CONF_APP_WIFI_SSID, MBED_CONF_APP_WIFI_PASSWORD , NSAPI_SECURITY_WPA_WPA2);
122121 TEST_ASSERT_MESSAGE (ret == 0 , " Connect failed" );
123122
124123 count = get_wifi ()->scan (NULL , 0 );
@@ -146,7 +145,7 @@ void wifi_http()
146145 TCPSocket socket;
147146 int ret;
148147
149- ret = get_wifi ()->connect (WIFI_TEST_SSID, WIFI_TEST_PASS , NSAPI_SECURITY_WPA_WPA2);
148+ ret = get_wifi ()->connect (MBED_CONF_APP_WIFI_SSID, MBED_CONF_APP_WIFI_PASSWORD , NSAPI_SECURITY_WPA_WPA2);
150149 TEST_ASSERT_MESSAGE (ret == 0 , " Connect failed" );
151150
152151 // Open a socket on the network interface, and create a TCP connection to www.arm.com
0 commit comments