From 0fdbffa10ef8da11d09bd2b20de6063e7b49064b Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Thu, 15 Oct 2015 17:25:00 +0300 Subject: [PATCH] zdtm.py: Run tests matching given regexp Signed-off-by: Pavel Emelyanov --- test/zdtm.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/zdtm.py b/test/zdtm.py index 4a5ab4afb..bec59f557 100755 --- a/test/zdtm.py +++ b/test/zdtm.py @@ -539,6 +539,10 @@ def run_tests(opts): if opts['all']: torun = all_tests(opts) run_all = True + elif opts['tests']: + r = re.compile(opts['tests']) + torun = filter(lambda x: r.match(x), all_tests(opts)) + run_all = True elif opts['test']: torun = opts['test'] run_all = False @@ -636,6 +640,7 @@ rp = sp.add_parser("run", help = "Run test(s)") rp.set_defaults(action = run_tests) rp.add_argument("-a", "--all", action = 'store_true') rp.add_argument("-t", "--test", help = "Test name", action = 'append') +rp.add_argument("-T", "--tests", help = "Regexp") rp.add_argument("-f", "--flavor", help = "Flavor to run") rp.add_argument("-x", "--exclude", help = "Exclude tests from --all run", action = 'append')