]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: remote: Allow hwsim test cases with more than two arguments
authorJanusz Dziedzic <janusz.dziedzic@gmail.com>
Sun, 12 Jan 2020 22:02:18 +0000 (23:02 +0100)
committerJouni Malinen <j@w1.fi>
Sun, 23 Feb 2020 13:21:22 +0000 (15:21 +0200)
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>
tests/remote/hwsim_wrapper.py
tests/remote/run-tests.py

index 36df8d7a82db1e906fd7e86e88a7a46714b78bff..38f927f6e8200b40b02291c100d552f2da208ed2 100644 (file)
@@ -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)
             apdev.append(dut_host.dev)
 
-        # run hwsim test/currently only 2 params tests
         if hwsim_test.__code__.co_argcount == 1:
             hwsim_test(dev)
         elif hwsim_test.__code__.co_argcount == 2:
             hwsim_test(dev, apdev)
         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
         for wpas in dev:
index b686108166a5a14a6c84f47436948121664000c0..8c5d02b445e501704077124f825ba6ea30ba74a3 100755 (executable)
@@ -200,7 +200,7 @@ def main():
                 t = None
                 for tt in hwsim_tests:
                     name = tt.__name__.replace('test_', '', 1)
-                    if name == test and tt.__code__.co_argcount <= 2:
+                    if name == test:
                         t = tt
                         break
                 if not t: