mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-25 08:02:38 +01:00
auto-t: speed up testHiddenNetworks
The CI was sometimes taking ~10-15 minutes to run just this test. This is likely due to the test having 7 radios and which is a lot of beacons/probes to process. Disabling the unused hostapd instances drops the runtime down to about 1 minute.
This commit is contained in:
parent
bc3722060e
commit
2acbe26684
@ -7,6 +7,7 @@ sys.path.append('../util')
|
||||
import iwd
|
||||
from iwd import IWD
|
||||
from iwd import PSKAgent
|
||||
from hostapd import HostapdCLI
|
||||
import testutil
|
||||
import time
|
||||
|
||||
@ -67,11 +68,20 @@ class TestConnectionAfterHiddenNetwork(unittest.TestCase):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
pass
|
||||
cls.disabled = [HostapdCLI('ssidHiddenOpen.conf'),
|
||||
HostapdCLI('ssidHiddenWPA.conf'),
|
||||
HostapdCLI('ssidOverlap1.conf'),
|
||||
HostapdCLI('ssidOverlap2.conf')]
|
||||
|
||||
for hapd in cls.disabled:
|
||||
hapd.disable()
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
IWD.clear_storage()
|
||||
|
||||
for hapd in cls.disabled:
|
||||
hapd.reload()
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main(exit=True)
|
||||
|
@ -8,6 +8,7 @@ import iwd
|
||||
import validation
|
||||
from validation import TestHiddenNetworks
|
||||
from iwd import IWD
|
||||
from hostapd import HostapdCLI
|
||||
|
||||
class TestWpaNetwork(unittest.TestCase):
|
||||
'''
|
||||
@ -34,9 +35,19 @@ class TestWpaNetwork(unittest.TestCase):
|
||||
def setUpClass(cls):
|
||||
IWD.copy_to_storage('ssidAlreadyKnown.open')
|
||||
|
||||
cls.disabled = [HostapdCLI('ssidHiddenOpen.conf'),
|
||||
HostapdCLI('ssidHiddenWPA.conf'),
|
||||
HostapdCLI('ssidSomeHidden.conf')]
|
||||
|
||||
for hapd in cls.disabled:
|
||||
hapd.disable()
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
IWD.clear_storage()
|
||||
|
||||
for hapd in cls.disabled:
|
||||
hapd.reload()
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main(exit=True)
|
||||
|
@ -8,6 +8,7 @@ import iwd
|
||||
import validation
|
||||
from validation import TestHiddenNetworks
|
||||
from iwd import IWD
|
||||
from hostapd import HostapdCLI
|
||||
|
||||
class TestOpenNetwork(unittest.TestCase):
|
||||
'''
|
||||
@ -24,9 +25,22 @@ class TestOpenNetwork(unittest.TestCase):
|
||||
tca.validate('ssidHiddenOpen', False)
|
||||
tca.validate('ssidHiddenOpen', True)
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.disabled = [HostapdCLI('ssidHiddenWPA.conf'),
|
||||
HostapdCLI('ssidOpen.conf'),
|
||||
HostapdCLI('ssidOverlap1.conf'),
|
||||
HostapdCLI('ssidOverlap2.conf'),
|
||||
HostapdCLI('ssidSomeHidden.conf')]
|
||||
for hapd in cls.disabled:
|
||||
hapd.disable()
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
IWD.clear_storage()
|
||||
|
||||
for hapd in cls.disabled:
|
||||
hapd.reload()
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main(exit=True)
|
||||
|
@ -8,6 +8,7 @@ import iwd
|
||||
import validation
|
||||
from validation import TestHiddenNetworks
|
||||
from iwd import IWD
|
||||
from hostapd import HostapdCLI
|
||||
|
||||
class TestWpaNetwork(unittest.TestCase):
|
||||
'''
|
||||
@ -25,9 +26,23 @@ class TestWpaNetwork(unittest.TestCase):
|
||||
tca.validate('ssidHiddenWPA', False, None, True)
|
||||
tca.validate('ssidHiddenWPA', True, None, True)
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
cls.disabled = [HostapdCLI('ssidHiddenOpen.conf'),
|
||||
HostapdCLI('ssidOpen.conf'),
|
||||
HostapdCLI('ssidOverlap1.conf'),
|
||||
HostapdCLI('ssidOverlap2.conf'),
|
||||
HostapdCLI('ssidSomeHidden.conf')]
|
||||
|
||||
for hapd in cls.disabled:
|
||||
hapd.disable()
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
IWD.clear_storage()
|
||||
|
||||
for hapd in cls.disabled:
|
||||
hapd.reload()
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main(exit=True)
|
||||
|
Loading…
Reference in New Issue
Block a user