mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
tests: remote: Allow hwsim test cases with more than two arguments
This allows more test cases to be run in remote setup. Previously, we used to block all test cases that required more than two arguments (i.e., that needed the params argument). Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
This commit is contained in:
parent
876785aeba
commit
f8b26af741
@ -67,13 +67,15 @@ def run_hwsim_test(devices, setup_params, refs, duts, monitors, hwsim_test):
|
|||||||
dut_host.dev['bssid'] = rutils.get_mac_addr(dut_host)
|
dut_host.dev['bssid'] = rutils.get_mac_addr(dut_host)
|
||||||
apdev.append(dut_host.dev)
|
apdev.append(dut_host.dev)
|
||||||
|
|
||||||
# run hwsim test/currently only 2 params tests
|
|
||||||
if hwsim_test.__code__.co_argcount == 1:
|
if hwsim_test.__code__.co_argcount == 1:
|
||||||
hwsim_test(dev)
|
hwsim_test(dev)
|
||||||
elif hwsim_test.__code__.co_argcount == 2:
|
elif hwsim_test.__code__.co_argcount == 2:
|
||||||
hwsim_test(dev, apdev)
|
hwsim_test(dev, apdev)
|
||||||
else:
|
else:
|
||||||
raise Exception("more than 2 arguments required")
|
params = {}
|
||||||
|
params['long'] = 1
|
||||||
|
params['logdir'] = local_log_dir
|
||||||
|
hwsim_test(dev, apdev, params)
|
||||||
|
|
||||||
# hostapd/wpa_supplicant cleanup
|
# hostapd/wpa_supplicant cleanup
|
||||||
for wpas in dev:
|
for wpas in dev:
|
||||||
|
@ -200,7 +200,7 @@ def main():
|
|||||||
t = None
|
t = None
|
||||||
for tt in hwsim_tests:
|
for tt in hwsim_tests:
|
||||||
name = tt.__name__.replace('test_', '', 1)
|
name = tt.__name__.replace('test_', '', 1)
|
||||||
if name == test and tt.__code__.co_argcount <= 2:
|
if name == test:
|
||||||
t = tt
|
t = tt
|
||||||
break
|
break
|
||||||
if not t:
|
if not t:
|
||||||
|
Loading…
Reference in New Issue
Block a user