[CRIU] [PATCH 2/3] zdtm.py: Run tests in best flavor

Pavel Emelyanov xemul at parallels.com
Fri Dec 4 06:06:49 PST 2015


If someone wants to run all tests in any, but the most
difficult for criu, flavor, the 'best' one is introduced.

Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
 test/zdtm.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/zdtm.py b/test/zdtm.py
index bc61d1d..00ddcdb 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -920,7 +920,10 @@ def run_tests(opts):
 
 			test_flavs = tdesc.get('flavor', 'h ns uns').split()
 			opts_flavs = (opts['flavor'] or 'h,ns,uns').split(',')
-			run_flavs = set(test_flavs) & set(opts_flavs)
+			if opts_flavs != ['best']:
+				run_flavs = set(test_flavs) & set(opts_flavs)
+			else:
+				run_flavs = set([test_flavs.pop()])
 
 			if run_flavs:
 				l.run_test(t, tdesc, run_flavs)
-- 
1.9.3




More information about the CRIU mailing list