[WifiPasspointTest] Fix for failover test
Cherry picked changes from master branch
Bug: 158906029
Test: Verified the change
Merged-In: I1c93f99a8e979c638b0fc17e11a0e312f4200d01
Change-Id: I1c718f98e20354d3cd07e20f36d96fc0c2fef12a
diff --git a/acts/tests/google/wifi/WifiPasspointTest.py b/acts/tests/google/wifi/WifiPasspointTest.py
index 3e89be7..006c243 100755
--- a/acts/tests/google/wifi/WifiPasspointTest.py
+++ b/acts/tests/google/wifi/WifiPasspointTest.py
@@ -338,7 +338,7 @@
# Install both Passpoint profiles on the device.
passpoint_ssid = list()
for passpoint_config in self.passpoint_networks[:2]:
- passpoint_ssid.append(passpoint_config[WifiEnums.SSID_KEY])
+ passpoint_ssid.extend(passpoint_config[WifiEnums.SSID_KEY])
self.install_passpoint_profile(passpoint_config)
time.sleep(DEFAULT_TIMEOUT)
@@ -351,12 +351,12 @@
"configured Passpoint networks.")
expected_ssid = self.passpoint_networks[0][WifiEnums.SSID_KEY]
- if current_ssid == expected_ssid:
+ if current_ssid in expected_ssid:
expected_ssid = self.passpoint_networks[1][WifiEnums.SSID_KEY]
# Remove the current Passpoint profile.
for network in self.passpoint_networks[:2]:
- if network[WifiEnums.SSID_KEY] == current_ssid:
+ if current_ssid in network[WifiEnums.SSID_KEY]:
if not wutils.delete_passpoint(self.dut, network["fqdn"]):
raise signals.TestFailure("Failed to delete Passpoint"
" configuration with FQDN = %s" %
@@ -365,7 +365,7 @@
time.sleep(DEFAULT_TIMEOUT)
current_passpoint = self.dut.droid.wifiGetConnectionInfo()
- if current_passpoint[WifiEnums.SSID_KEY] != expected_ssid:
+ if current_passpoint[WifiEnums.SSID_KEY] not in expected_ssid:
raise signals.TestFailure("Device did not failover to the %s"
" passpoint network" % expected_ssid)
diff --git a/acts/tests/google/wifi/WifiSoftApTest.py b/acts/tests/google/wifi/WifiSoftApTest.py
index acd4564..78b1306 100644
--- a/acts/tests/google/wifi/WifiSoftApTest.py
+++ b/acts/tests/google/wifi/WifiSoftApTest.py
@@ -24,7 +24,6 @@
from acts import utils
from acts.keys import Config
from acts.test_decorators import test_tracker_info
-from acts.test_utils.net import arduino_test_utils as dutils
from acts.test_utils.net import socket_test_utils as sutils
from acts.test_utils.tel import tel_defines
from acts.test_utils.tel import tel_test_utils as tel_utils
@@ -155,31 +154,6 @@
wutils.start_wifi_connection_scan_and_ensure_network_not_found(
self.dut_client, ap_ssid);
- def validate_traffic_between_softap_clients(self, config):
- """Send traffic between softAp clients.
-
- Connect SoftAp clients to the wifi hotspot; one android
- device and the other arduino wifi controller. Send UDP traffic
- between the clients and verify that expected messages are received.
-
- Args:
- config: wifi network config with SSID, password
- """
- ad = self.dut_client
- wd = self.arduino_wifi_dongles[0]
- wutils.wifi_connect(ad, config, check_connectivity=False)
- dutils.connect_wifi(wd, config)
- local_ip = ad.droid.connectivityGetIPv4Addresses('wlan0')[0]
- remote_ip = wd.ip_address()
- port = random.randint(8000, 9000)
- self.log.info("IP addr on android device: %s" % local_ip)
- self.log.info("IP addr on arduino device: %s" % remote_ip)
-
- socket = sutils.open_datagram_socket(ad, local_ip, port)
- sutils.send_recv_data_datagram_sockets(
- ad, ad, socket, socket, remote_ip, port)
- sutils.close_datagram_socket(ad, socket)
-
def check_cell_data_and_enable(self):
"""Make sure that cell data is enabled if there is a sim present.
@@ -229,8 +203,6 @@
if test_ping:
self.validate_ping_between_softap_and_client(config)
if test_clients:
- if hasattr(self, 'arduino_wifi_dongles'):
- self.validate_traffic_between_softap_clients(config)
if len(self.android_devices) > 2:
self.validate_ping_between_two_clients(config)
wutils.stop_wifi_tethering(self.dut)
@@ -446,24 +418,6 @@
wutils.wifi_toggle_state(self.dut, True)
self.validate_full_tether_startup(WIFI_CONFIG_APBAND_2G)
- @test_tracker_info(uuid="05c6f929-7754-477f-a9cd-f77e850b818b")
- def test_full_tether_startup_2G_multiple_clients(self):
- """Test full startup of wifi tethering in 2G band, connect clients
- to softAp and send traffic between them.
-
- 1. Report current state.
- 2. Switch to AP mode.
- 3. verify SoftAP active.
- 4. Connect clients to softAp.
- 5. Send and recv UDP traffic between them.
- 6. Shutdown wifi tethering.
- 7. verify back to previous mode.
- """
- asserts.skip_if(not hasattr(self, 'arduino_wifi_dongles'),
- "No wifi dongles connected. Skipping test")
- self.validate_full_tether_startup(WIFI_CONFIG_APBAND_2G,
- test_clients=True)
-
@test_tracker_info(uuid="883dd5b1-50c6-4958-a50f-bb4bea77ccaf")
def test_full_tether_startup_2G_one_client_ping_softap(self):
"""(AP) 1 Device can connect to 2G hotspot