diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -222,10 +222,18 @@ if tests: # Individual tests have been specified. Run specified tests that exist # in the all_scripts list. Accept the name with or without .py - # extension. - test_list = [t for t in all_scripts if - (t in tests or re.sub(".py$", "", t) in tests)] - cutoff = sys.maxsize # do not cut off explicitly specified tests + # extension. Allow for wildcards in the name, so a single input can + # match multiple tests + patterns = [re.sub(".py$", "", t).replace("*", ".*") for t in tests] + regex = "(" + ")|(".join(patterns) + ")$" + test_list = [t for t in all_scripts if re.match( + regex, re.sub(".py$", "", t))] + # Transform the list to set, then back to list to make the elements + # unique + test_list = list(set(test_list)) + + # do not cut off explicitly specified tests + cutoff = sys.maxsize else: # No individual tests have been specified. # Run all tests that do not exceed