3
0
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:
Tim Kourt 2018-09-19 09:34:55 -07:00 committed by Denis Kenzior
parent 59c4c8ac6b
commit dcdfdde5dc
29 changed files with 33 additions and 58 deletions

View File

@ -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'

View File

@ -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]

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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:

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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()

View File

@ -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()

View File

@ -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:

View File

@ -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:

View File

@ -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'

View File

@ -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

View File

@ -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()

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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'

View File

@ -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'