[CRIU] [PATCH] zdtm.py: Do not run tests marked with excl in parallel
Pavel Emelyanov
xemul at parallels.com
Thu Nov 12 01:20:36 PST 2015
There are tests (e.g. on locks) that can conflict with each other, so
wait for all the other jobs to finish before running such.
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
test/zdtm.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/test/zdtm.py b/test/zdtm.py
index 87051ac..03e7054 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -701,6 +701,11 @@ class launcher:
print "=== Run %d/%d %s" % (self.__nr, self.__total, '=' * perc + '-' * (16 - perc))
def run_test(self, name, desc, flavor):
+ if test_flag(desc, 'excl'):
+ self.wait_all()
+ if self.__fail:
+ raise test_fail_exc('')
+
if len(self.__subs) >= self.__max:
self.wait()
if self.__fail:
@@ -737,9 +742,12 @@ class launcher:
if not self.__wait_one(os.WNOHANG):
break
- def finish(self):
+ def wait_all(self):
while self.__subs:
self.__wait_one(0)
+
+ def finish(self):
+ self.wait_all()
if self.__fail:
print_sep("FAIL", "#")
sys.exit(1)
--
1.9.3
More information about the CRIU
mailing list