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 <j@w1.fi>
This commit is contained in:
parent
6ace13a9e5
commit
9007391650
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue