[CRIU] [PATCH] makefile: use zdtm.py to execute tests

Andrey Vagin avagin at openvz.org
Tue Dec 15 01:48:57 PST 2015


From: Andrew Vagin <avagin at virtuozzo.com>

Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
 test/Makefile      | 26 ++++++++++----------------
 test/Makefile.zdtm | 17 -----------------
 2 files changed, 10 insertions(+), 33 deletions(-)
 delete mode 100644 test/Makefile.zdtm

diff --git a/test/Makefile b/test/Makefile
index b2472d6..58d73e3 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -21,27 +21,21 @@ other: .FORCE
 		setsid $(MAKE) -C $$t run || exit 1;	\
 	done						\
 
-zdtm-tst-list: zdtm.sh
-	./zdtm.sh -l > zdtm-tst-list
+zdtm: .FORCE
+	./zdtm.py run -a --parallel 2
 
-zdtm: zdtm-tst-list .FORCE 
-	$(MAKE) -f Makefile.zdtm zdtm_nons
-	$(MAKE) -f Makefile.zdtm zdtm_ns
-	$(MAKE) clean_root
-	$(MAKE) -f Makefile.zdtm zdtm_ns_user
+zdtm-pre-dump:
+	./zdtm.py run --pre 2:1 -t zdtm/live/transition/fork -f uns
 
-zdtm-pre-dump: zdtm-tst-list
-	ZDTM_ARGS="-P -p -i 3 -C" $(MAKE) -f Makefile.zdtm ns/static/pipe00
+zdtm-snapshot:
+	./zdtm.py run --pre 2:1 --snap -t zdtm/live/transition/fork -f uns
 
-zdtm-snapshot: zdtm-tst-list
-	ZDTM_ARGS="-s -i 3 -C" $(MAKE) -f Makefile.zdtm ns/static/pipe00
-
-zdtm-iter: zdtm-tst-list
-	ZDTM_ARGS="-i 3 -C" $(MAKE) -f Makefile.zdtm ns/static/pipe00
+zdtm-iter:
+	./zdtm.py run --iters 3:1 -t zdtm/live/transition/fork -f uns
 
 zdtm-freezer:
-	ZDTM_ARGS="--freeze-cgroup /sys/fs/cgroup/freezer/test -i 3" $(MAKE) -f Makefile.zdtm transition/thread-bomb
-	ZDTM_ARGS="--freeze-cgroup /sys/fs/cgroup/freezer/test -d --frozen" $(MAKE) -f Makefile.zdtm transition/thread-bomb
+	./zdtm.sh --freeze-cgroup /sys/fs/cgroup/freezer/test -i 3 transition/thread-bomb
+	./zdtm.sh --frozen --freeze-cgroup /sys/fs/cgroup/freezer/test -i 3 transition/thread-bomb
 
 .PHONY: zdtm
 
diff --git a/test/Makefile.zdtm b/test/Makefile.zdtm
deleted file mode 100644
index 4bbe0c3..0000000
--- a/test/Makefile.zdtm
+++ /dev/null
@@ -1,17 +0,0 @@
-TST = $(shell cat zdtm-tst-list)
-CFLAGS += -D_GNU_SOURCE
-
-.FORCE:
-
-zdtm_ns: $(shell echo "$(TST)" | tr ' ' '\n' | awk '/^ns\// && !/ns\/user/ {print}')
-zdtm_ns_user: $(shell echo "$(TST)" | tr ' ' '\n' | awk '/^ns\/user/ {print}')
-zdtm_nons: $(shell echo "$(TST)" | tr ' ' '\n' | awk '!/^ns\// {print}')
-
-$(TST): zdtm_ct mount_cgroups .FORCE
-	./zdtm.sh --ct ${ZDTM_ARGS} -r $(@) > $(subst /,_,$@).log 2>&1;  \
-	{ ret=$$?; fname=$(subst /,_,$@).log; flock Makefile cat $$fname; unlink $$fname; exit $$ret; }
-
-mount_cgroups: .FORCE
-	flock zdtm_mount_cgroups ./zdtm_mount_cgroups
-
-zdtm_ct: zdtm_ct.c
-- 
2.4.3



More information about the CRIU mailing list