mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
auto-t: known networks
1) wait for a device to become available 2) add try, except block for the clean termination of iwd in the case of a failure 3) increase the max execution time to help with valgrind
This commit is contained in:
parent
6bffa395d9
commit
63232dd7fe
@ -10,7 +10,7 @@ from iwd import IWD
|
|||||||
class Test(unittest.TestCase):
|
class Test(unittest.TestCase):
|
||||||
|
|
||||||
def connect_to_new_network(self, wd):
|
def connect_to_new_network(self, wd):
|
||||||
devices = wd.list_devices();
|
devices = wd.list_devices(1);
|
||||||
self.assertIsNotNone(devices)
|
self.assertIsNotNone(devices)
|
||||||
device = devices[0]
|
device = devices[0]
|
||||||
|
|
||||||
@ -35,8 +35,7 @@ class Test(unittest.TestCase):
|
|||||||
condition = 'not obj.connected'
|
condition = 'not obj.connected'
|
||||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||||
|
|
||||||
def test_list_removal_and_addition(self):
|
def list_removal_and_addition(self, wd):
|
||||||
wd = IWD(start_iwd_daemon = True)
|
|
||||||
|
|
||||||
known_networks = wd.list_known_networks()
|
known_networks = wd.list_known_networks()
|
||||||
self.assertEqual(len(known_networks), 3)
|
self.assertEqual(len(known_networks), 3)
|
||||||
@ -57,6 +56,17 @@ class Test(unittest.TestCase):
|
|||||||
known_networks = wd.list_known_networks()
|
known_networks = wd.list_known_networks()
|
||||||
self.assertEqual(len(known_networks), 0)
|
self.assertEqual(len(known_networks), 0)
|
||||||
|
|
||||||
|
def test_known_networks(self):
|
||||||
|
wd = IWD(True)
|
||||||
|
|
||||||
|
try:
|
||||||
|
self.list_removal_and_addition(wd)
|
||||||
|
except:
|
||||||
|
del wd
|
||||||
|
raise
|
||||||
|
|
||||||
|
del wd
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
IWD.copy_to_storage('known_networks/ssidOpen.open')
|
IWD.copy_to_storage('known_networks/ssidOpen.open')
|
||||||
|
Loading…
Reference in New Issue
Block a user