Skip to content
Snippets Groups Projects
Commit fe406ec6 authored by Craig Tiller's avatar Craig Tiller
Browse files

Support taking a regex on test short name

Allows run_tests to focus on one particular test if necessary.
Useful in combination with runs_per_test.
parent 47f523b5
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,7 @@ import itertools ...@@ -36,6 +36,7 @@ import itertools
import json import json
import multiprocessing import multiprocessing
import os import os
import re
import sys import sys
import time import time
...@@ -168,6 +169,7 @@ argp.add_argument('-c', '--config', ...@@ -168,6 +169,7 @@ argp.add_argument('-c', '--config',
nargs='+', nargs='+',
default=_DEFAULT) default=_DEFAULT)
argp.add_argument('-n', '--runs_per_test', default=1, type=int) argp.add_argument('-n', '--runs_per_test', default=1, type=int)
argp.add_argument('-r', '--regex', default='.*', type=str)
argp.add_argument('-j', '--jobs', default=1000, type=int) argp.add_argument('-j', '--jobs', default=1000, type=int)
argp.add_argument('-f', '--forever', argp.add_argument('-f', '--forever',
default=False, default=False,
...@@ -205,7 +207,8 @@ one_run = set( ...@@ -205,7 +207,8 @@ one_run = set(
spec spec
for config in run_configs for config in run_configs
for language in args.language for language in args.language
for spec in _LANGUAGES[language].test_specs(config)) for spec in _LANGUAGES[language].test_specs(config)
if re.search(args.regex, spec.shortname))
runs_per_test = args.runs_per_test runs_per_test = args.runs_per_test
forever = args.forever forever = args.forever
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment