aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-24 13:55:12 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-24 13:55:12 -0800
commitfe406ec601601014edf20c9f9a04caf381e2fa1f (patch)
tree0860c30e742525c33af13ebec4b4ac8eb6363167 /tools
parent47f523b508b255db0a0b34f1c76efaf8714bd7b6 (diff)
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.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/run_tests/run_tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 64478b3753..7732466d6e 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -36,6 +36,7 @@ import itertools
import json
import multiprocessing
import os
+import re
import sys
import time
@@ -168,6 +169,7 @@ argp.add_argument('-c', '--config',
nargs='+',
default=_DEFAULT)
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('-f', '--forever',
default=False,
@@ -205,7 +207,8 @@ one_run = set(
spec
for config in run_configs
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
forever = args.forever