diff options
author | Pavel Emelyanov <xemul@virtuozzo.com> | 2016-03-24 15:56:00 +0300 |
---|---|---|
committer | Pavel Emelyanov <xemul@virtuozzo.com> | 2016-03-25 23:39:22 +0300 |
commit | bd7081202395bbe1460b108c85fab9bdc9746441 (patch) | |
tree | 2acc0dd6ef12a09dd5270ec345d61a14126c3bc3 | |
parent | 06cc12a275522c1e7b6fd7a922dcc381841b7872 (diff) |
zdtm: Add ability to run tests from list
Sometimes when running tests manually it's tempting to
prepare the list of tests to run in advance and then
run only those. E.g. -- when testing a new feature
that affects only _some_ tests. This option allows it.
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
-rwxr-xr-x | test/zdtm.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/zdtm.py b/test/zdtm.py index 07ae42fb4..3a01b3332 100755 --- a/test/zdtm.py +++ b/test/zdtm.py @@ -1198,6 +1198,13 @@ def run_tests(opts): elif opts['test']: torun = opts['test'] run_all = False + elif opts['from']: + if not os.access(opts['from'], os.R_OK): + print "No such file" + return + + torun = map(lambda x: x.strip(), open(opts['from'])) + run_all = True else: print "Specify test with -t <name> or -a" return @@ -1458,6 +1465,7 @@ 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", "--from", help = "From file") rp.add_argument("-f", "--flavor", help = "Flavor to run") rp.add_argument("-x", "--exclude", help = "Exclude tests from --all run", action = 'append') |