mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 06:29:23 +01:00
auto-t: set autoconnect=True for tests that need it
After the default behavior was changed to disable autoconnect there were several tests which still needed it to be turned on.
This commit is contained in:
parent
a15b781feb
commit
836f0d9a08
@ -81,10 +81,8 @@ class Test(unittest.TestCase):
|
||||
|
||||
rule0.drop = False
|
||||
|
||||
# Next try autoconnecting to a network with a blacklisted BSS. Since an
|
||||
# explicit disconnect call would disable autoconnect we reset
|
||||
# hostapd which will disconnect IWD.
|
||||
bss_hostapd[1].reload()
|
||||
device.disconnect()
|
||||
device.autoconnect = True
|
||||
|
||||
condition = 'not obj.connected'
|
||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||
|
@ -28,6 +28,8 @@ class TestConnectAutoConnect(unittest.TestCase):
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
||||
def check_autoconnect(self, wd, device, ssid, throws):
|
||||
device.autoconnect = True
|
||||
|
||||
if throws is None:
|
||||
condition = 'obj.state == DeviceState.connected'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
@ -48,11 +48,13 @@ class TestConnectAutoConnect(unittest.TestCase):
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
device.autoconnect = autoconnect
|
||||
|
||||
if autoconnect:
|
||||
self.check_autoconnect_hidden_network(wd, device, ssid, throws)
|
||||
else:
|
||||
if wait_periodic_scan:
|
||||
device.autoconnect = True
|
||||
condition = 'obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -33,6 +33,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
device.autoconnect = True
|
||||
|
||||
# We are dependent on a periodic scan here. We want to wait for this
|
||||
# because this is the first opportunity IWD has to do ANQP. Once ANQP
|
||||
|
@ -23,6 +23,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
device.autoconnect = True
|
||||
|
||||
condition = 'obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
@ -17,6 +17,7 @@ class Test(unittest.TestCase):
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
device.autoconnect = True
|
||||
|
||||
condition = 'obj.state == DeviceState.connected'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
@ -28,6 +28,7 @@ class Test(unittest.TestCase):
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
device.autoconnect = True
|
||||
|
||||
# Device initiates a passive periodic scan.
|
||||
condition = 'obj.scanning'
|
||||
|
@ -30,6 +30,7 @@ class Test(unittest.TestCase):
|
||||
devices = wd.list_devices(1)
|
||||
self.assertIsNotNone(devices)
|
||||
device = devices[0]
|
||||
device.autoconnect = True
|
||||
|
||||
condition = 'obj.scanning'
|
||||
wd.wait_for_object_condition(device, condition)
|
||||
|
@ -24,6 +24,7 @@ class Test(unittest.TestCase):
|
||||
def validate_quick_scan(self, wd):
|
||||
devices = wd.list_devices(1)
|
||||
device = devices[0]
|
||||
device.autoconnect = True
|
||||
|
||||
# Device initiates a passive quick scan and scans only for the known
|
||||
# frequencies (listed in .known_network.freq file).
|
||||
|
Loading…
Reference in New Issue
Block a user