@@ -30,16 +30,15 @@ using namespace utest::v1;
30
30
31
31
/* *
32
32
* 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
35
35
* - WIFI_TEST_NETWORKS - List of network that presence will be asserted e.g. "net1", "net2", "net3"
36
36
*/
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.
39
39
#endif
40
40
41
-
42
- const char *networks[] = {WIFI_TEST_NETWORKS, NULL };
41
+ const char *networks[] = {MBED_CONF_APP_WIFI_NETWORKS, NULL };
43
42
44
43
WiFiInterface *wifi;
45
44
@@ -101,7 +100,7 @@ void wifi_connect()
101
100
{
102
101
int ret;
103
102
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);
105
104
TEST_ASSERT_MESSAGE (ret == 0 , " Connect failed" );
106
105
107
106
ret = get_wifi ()->disconnect ();
@@ -118,7 +117,7 @@ void wifi_connect_scan()
118
117
119
118
memset (net_stat, 0 , sizeof (net_stat));
120
119
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);
122
121
TEST_ASSERT_MESSAGE (ret == 0 , " Connect failed" );
123
122
124
123
count = get_wifi ()->scan (NULL , 0 );
@@ -146,7 +145,7 @@ void wifi_http()
146
145
TCPSocket socket;
147
146
int ret;
148
147
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);
150
149
TEST_ASSERT_MESSAGE (ret == 0 , " Connect failed" );
151
150
152
151
// Open a socket on the network interface, and create a TCP connection to www.arm.com
0 commit comments