Commit 3ead6f0c authored by Mike Rapoport's avatar Mike Rapoport Committed by Pavel Emelyanov

zdtm: allow --keep-going anytime when running multiple tests

Currently it's possible to continue testing despite failures only when
running zdtm.py with --all option. Let's make --keep-going option also
valid when more than one test is requested with --tests or --from.
Signed-off-by: 's avatarMike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent b415a3c1
......@@ -1504,20 +1504,15 @@ def run_tests(opts):
print "Tracking memory is not available"
return
if opts['keep_going'] and (not opts['all']):
print "[WARNING] Option --keep-going is more useful with option --all."
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))
opts['keep_going'] = False
run_all = True
elif opts['test']:
torun = opts['test']
opts['keep_going'] = False
run_all = False
elif opts['from']:
if not os.access(opts['from'], os.R_OK):
......@@ -1531,6 +1526,10 @@ def run_tests(opts):
print "Specify test with -t <name> or -a"
return
if opts['keep_going'] and len(torun) < 2:
print "[WARNING] Option --keep-going is more useful when running multiple tests"
opts['keep_going'] = False
if opts['exclude']:
excl = re.compile(".*(" + "|".join(opts['exclude']) + ")")
print "Compiled exclusion list"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment