mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-14 16:09:24 +01:00
auto-t: use device waiting feature in all tests
This commit is contained in:
parent
59c4c8ac6b
commit
dcdfdde5dc
@ -48,8 +48,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("secret123")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -17,8 +17,7 @@ class Test(unittest.TestCase):
|
||||
def test_disconnect(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
hostapd_if = list(hostapd_map.values())[0]
|
||||
|
@ -21,8 +21,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -21,8 +21,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -16,8 +16,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -29,8 +29,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -16,8 +16,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = iwd.PSKAgent(*secrets)
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
try:
|
||||
|
@ -21,8 +21,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -27,8 +27,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -13,8 +13,7 @@ class Test(unittest.TestCase):
|
||||
def test_connection_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -26,8 +26,7 @@ class Test(unittest.TestCase):
|
||||
hostapd_ifname = ifname
|
||||
break
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -13,8 +13,7 @@ class Test(unittest.TestCase):
|
||||
def test_connection_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -13,8 +13,7 @@ class Test(unittest.TestCase):
|
||||
def test_connection_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -13,8 +13,7 @@ class Test(unittest.TestCase):
|
||||
def test_connection_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -18,8 +18,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent('abc', ('user', 'testpasswd'))
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -14,8 +14,7 @@ class Test(unittest.TestCase):
|
||||
def test_connection_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -16,8 +16,7 @@ class Test(unittest.TestCase):
|
||||
def test_push_button_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
device.wps_push_button()
|
||||
|
@ -16,8 +16,7 @@ class Test(unittest.TestCase):
|
||||
def test_push_button_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
device.wps_push_button()
|
||||
|
@ -26,7 +26,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
device = wd.list_devices()[0];
|
||||
device = wd.list_devices(1)[0];
|
||||
|
||||
# Check that iwd selects BSS 0 first
|
||||
rule0.signal = -2000
|
||||
@ -107,7 +107,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
device = wd.list_devices()[0];
|
||||
device = wd.list_devices(1)[0];
|
||||
|
||||
# Check that iwd selects BSS 0 first
|
||||
rule0.signal = -2000
|
||||
@ -182,7 +182,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
hwsim = Hwsim()
|
||||
wd = IWD()
|
||||
device = wd.list_devices()[0]
|
||||
device = wd.list_devices(1)[0]
|
||||
try:
|
||||
device.disconnect()
|
||||
except:
|
||||
|
@ -30,7 +30,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("EasilyGuessedPassword")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
device = wd.list_devices()[0];
|
||||
device = wd.list_devices(1)[0];
|
||||
|
||||
# Check that iwd selects BSS 0 first
|
||||
rule0.signal = -2000
|
||||
@ -116,7 +116,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("EasilyGuessedPassword")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
device = wd.list_devices()[0];
|
||||
device = wd.list_devices(1)[0];
|
||||
|
||||
# Check that iwd selects BSS 0 first
|
||||
rule0.signal = -2000
|
||||
@ -193,7 +193,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
hwsim = Hwsim()
|
||||
wd = IWD()
|
||||
device = wd.list_devices()[0]
|
||||
device = wd.list_devices(1)[0]
|
||||
try:
|
||||
device.disconnect()
|
||||
except:
|
||||
|
@ -14,8 +14,7 @@ class Test(unittest.TestCase):
|
||||
def test_connection_success(self):
|
||||
wd = IWD()
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -62,7 +62,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
device = wd.list_devices()[0];
|
||||
device = wd.list_devices(1)[0];
|
||||
|
||||
# Check that iwd selects BSS 0 first
|
||||
rule0.signal = -2500
|
||||
|
@ -23,7 +23,7 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd = IWD()
|
||||
|
||||
device = wd.list_devices()[0];
|
||||
device = wd.list_devices(1)[0];
|
||||
|
||||
# Register agent early to catch any unexpected notifications
|
||||
agent = TstAgent()
|
||||
|
@ -37,8 +37,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("secret123")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -30,8 +30,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("secret123")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -17,8 +17,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("secret123")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -17,8 +17,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("secret123")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -18,8 +18,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("secret123")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
@ -17,8 +17,7 @@ class Test(unittest.TestCase):
|
||||
psk_agent = PSKAgent("secret123")
|
||||
wd.register_psk_agent(psk_agent)
|
||||
|
||||
devices = wd.list_devices();
|
||||
self.assertIsNotNone(devices)
|
||||
devices = wd.list_devices(1);
|
||||
device = devices[0]
|
||||
|
||||
condition = 'not obj.scanning'
|
||||
|
Loading…
Reference in New Issue
Block a user