tests: Follow test sequence from run-tests.py command line
It can be useful to specify an exact order of test cases and also to allow the same test case to be run multiple times when the list of tests is provided on the command line. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
3882a70841
commit
499c5e9dc6
1 changed files with 13 additions and 9 deletions
|
@ -239,11 +239,15 @@ def main():
|
|||
args.testmodules.append(line)
|
||||
|
||||
tests_to_run = []
|
||||
if args.tests:
|
||||
for selected in args.tests:
|
||||
for t in tests:
|
||||
name = t.__name__.replace('test_', '', 1)
|
||||
if name == selected:
|
||||
tests_to_run.append(t)
|
||||
else:
|
||||
for t in tests:
|
||||
name = t.__name__.replace('test_', '', 1)
|
||||
if args.tests:
|
||||
if not name in args.tests:
|
||||
continue
|
||||
if args.testmodules:
|
||||
if not t.__module__.replace('test_', '', 1) in args.testmodules:
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue