3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-24 16:49:25 +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:
James Prestwood 2022-10-06 10:40:39 -07:00 committed by Denis Kenzior
parent bc3722060e
commit 2acbe26684
4 changed files with 51 additions and 1 deletions

View File

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

View File

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

View File

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

View File

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