Skip to content

Commit f71756c

Browse files
author
Veijo Pesonen
committed
Greentea WIFI-SCAN - make possible to disable check against assumed channel
It's possible that a device does not support setting the channel to be used. In case channel is not set by the device lets disable the check.
1 parent 8c421e2 commit f71756c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

TESTS/network/wifi/wifi_scan.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,16 @@ void wifi_scan(void)
5454
if (strcmp(MBED_CONF_APP_WIFI_SECURE_SSID, ssid) == 0) {
5555
secure_found = true;
5656
TEST_ASSERT_EQUAL_INT(NSAPI_SECURITY_WPA2, security);
57-
TEST_ASSERT_EQUAL_INT(MBED_CONF_APP_WIFI_CH_SECURE, ch);
57+
if (MBED_CONF_APP_WIFI_CH_SECURE) {
58+
TEST_ASSERT_EQUAL_INT(MBED_CONF_APP_WIFI_CH_SECURE, ch);
59+
}
5860
}
5961
if (strcmp(MBED_CONF_APP_WIFI_UNSECURE_SSID, ssid) == 0) {
6062
unsecure_found = true;
6163
TEST_ASSERT_EQUAL_INT(NSAPI_SECURITY_NONE, security);
62-
TEST_ASSERT_EQUAL_INT(MBED_CONF_APP_WIFI_CH_UNSECURE, ch);
64+
if (MBED_CONF_APP_WIFI_CH_UNSECURE) {
65+
TEST_ASSERT_EQUAL_INT(MBED_CONF_APP_WIFI_CH_UNSECURE, ch);
66+
}
6367
}
6468
}
6569
TEST_ASSERT_TRUE(secure_found);

0 commit comments

Comments
 (0)