[CRIU] [RFC PATCH 21/21] zdtm: Makefile.multi: add a makefile for using the multi-test launcher in multi-test mode

Ivan Shapovalov intelfx at intelfx.name
Fri Feb 19 06:50:44 PST 2016


Usage is as follows:

$ cd test/zdtm/live/static
$ make -f ../Makefile.multi aio00+busyloop00.pid
$ make -f ../Makefile.multi aio00+busyloop00.out

Mixing tests from different directories is not implemented.

Signed-off-by: Ivan Shapovalov <intelfx at intelfx.name>
---
 test/zdtm/live/Makefile.multi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 test/zdtm/live/Makefile.multi

diff --git a/test/zdtm/live/Makefile.multi b/test/zdtm/live/Makefile.multi
new file mode 100644
index 0000000..5055a0e
--- /dev/null
+++ b/test/zdtm/live/Makefile.multi
@@ -0,0 +1,17 @@
+define get-tests =
+	$(subst +, ,$(basename $@))
+endef
+
+# this file is ran from test/zdtm/live/*, hence ../../
+
+LAUNCHER := ../../launcher/launcher
+
+%.pid: %.build
+	$(LAUNCHER) $(shell $(MAKE) -s $(basename $@).args-global $(foreach test,$(call get-tests),$(test).args-multi $(test).args))
+
+%.out: %.pid
+	-kill -TERM `cat $<`
+
+.SECONDEXPANSION:
+%.build: $$(addsuffix .c,$$(get-tests))
+	$(MAKE) $(call get-tests)
-- 
2.7.1



More information about the CRIU mailing list