[CRIU] [PATCH v2] zdtm: allow --keep-going anytime when running multiple tests
Mike Rapoport
rppt at linux.vnet.ibm.com
Thu Dec 1 05:55:24 PST 2016
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: Mike Rapoport <rppt at linux.vnet.ibm.com>
---
test/zdtm.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/test/zdtm.py b/test/zdtm.py
index a17cce4..e8d5fa8 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -1521,20 +1521,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):
@@ -1548,6 +1543,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"
--
1.9.1
More information about the CRIU
mailing list