Changeset View
Changeset View
Standalone View
Standalone View
test/functional/test_runner.py
Show First 20 Lines • Show All 219 Lines • ▼ Show 20 Lines | for test in TEST_PARAMS: | ||||
sys.exit(1) | sys.exit(1) | ||||
if tests: | if tests: | ||||
# Individual tests have been specified. Run specified tests that exist | # Individual tests have been specified. Run specified tests that exist | ||||
# in the all_scripts list. Accept the name with or without .py | # in the all_scripts list. Accept the name with or without .py | ||||
# extension. | # extension. | ||||
test_list = [t for t in all_scripts if | test_list = [t for t in all_scripts if | ||||
(t in tests or re.sub(".py$", "", t) in tests)] | (t in tests or re.sub(".py$", "", t) in tests)] | ||||
cutoff = sys.maxsize # do not cut off explicitly specified tests | |||||
# Allow for wildcard at the end of the name, so a single input can | |||||
# match multiple tests | |||||
for test in tests: | |||||
if test.endswith('*'): | |||||
test_list.extend( | |||||
[t for t in all_scripts if t.startswith(test[:-1])]) | |||||
# Make the list unique | |||||
test_list = list(set(test_list)) | |||||
# do not cut off explicitly specified tests | |||||
cutoff = sys.maxsize | |||||
else: | else: | ||||
# No individual tests have been specified. | # No individual tests have been specified. | ||||
# Run all tests that do not exceed | # Run all tests that do not exceed | ||||
test_list = all_scripts | test_list = all_scripts | ||||
cutoff = args.cutoff | cutoff = args.cutoff | ||||
if args.extended: | if args.extended: | ||||
cutoff = sys.maxsize | cutoff = sys.maxsize | ||||
▲ Show 20 Lines • Show All 486 Lines • Show Last 20 Lines |