From 90073916500c104d22c2234ae93ff6e6052ef2c8 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 23 Mar 2014 11:59:43 +0200 Subject: [PATCH] tests: Allow test cases to receive additional parameters The optional third argument to the test case functions can now be used to receive additional parameters from run-tests.py. As the initial parameter, logdir value is provided so that test cases can use it to review the debug logs from the test run. Signed-off-by: Jouni Malinen --- tests/hwsim/run-tests.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py index 1bcf082..a5ddbc3 100755 --- a/tests/hwsim/run-tests.py +++ b/tests/hwsim/run-tests.py @@ -340,7 +340,11 @@ def main(): conn = None sys.exit(1) try: - if t.func_code.co_argcount > 1: + if t.func_code.co_argcount > 2: + params = {} + params['logdir'] = args.logdir + res = t(dev, apdev, params) + elif t.func_code.co_argcount > 1: res = t(dev, apdev) else: res = t(dev) -- 2.1.4