3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 06:29:23 +01:00

test-runner: start hwsim always (optionally --no-register)

Always start hwsim but if tests do not need radio rules start
with the --no-register option.
This commit is contained in:
James Prestwood 2020-12-17 11:36:07 -08:00 committed by Denis Kenzior
parent e8031bab2a
commit fe0879f7d1

View File

@ -675,6 +675,14 @@ class TestContext(Namespace):
def create_radios(self):
setup = self.hw_config['SETUP']
nradios = int(setup['num_radios'])
args = ['hwsim']
if not self.hw_config['SETUP'].get('hwsim_medium', 'yes') in ['yes', '1', 'true']:
# register hwsim as medium
args.extend(['--no-register'])
self.start_process(args)
self.wait_for_dbus_service('net.connman.hwsim')
for i in range(nradios):
name = 'rad%u' % i
@ -690,10 +698,6 @@ class TestContext(Namespace):
self.radios.append(VirtualRadio(name, rad_config))
self.cur_radio_id += 1
if self.hw_config['SETUP'].get('hwsim_medium', 'yes') in ['yes', '1', 'true']:
# register hwsim as medium
self.start_process(['hwsim'])
def discover_radios(self):
phys = []
iw = pyroute2.iwutil.IW()