[CRIU] [RFC PATCH 10/21] zdtm: separate test launch and cmdline generation phases
Ivan Shapovalov
intelfx at intelfx.name
Fri Feb 19 06:50:33 PST 2016
this adds overhead and is more fragile, but is needed for multi-test launcher
(if we want to keep it flexible and avoid hardcoding suffixes/pathes in tests).
Signed-off-by: Ivan Shapovalov <intelfx at intelfx.name>
---
test/zdtm/live/Makefile.live | 21 +++++++++++++--------
test/zdtm/live/static/Makefile | 18 ++++++++----------
2 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/test/zdtm/live/Makefile.live b/test/zdtm/live/Makefile.live
index 160abb3..1dff0ec 100644
--- a/test/zdtm/live/Makefile.live
+++ b/test/zdtm/live/Makefile.live
@@ -24,17 +24,22 @@ all: $(TST)
install: all
.PHONY: all install
-$(TST_NOFILE:%=%.pid): %.pid: %
- $(<D)/$(<F) --pidfile=$@ --outfile=$<.out
+%.args-global:
+ @echo --pidfile=$(basename $@).pid --outfile=$(basename $@).out
-$(TST_FILE:%=%.pid): %.pid: %
- $(<D)/$(<F) --pidfile=$@ --outfile=$<.out --filename=$<.test
+$(TST_NOFILE:%=%.args):
-$(TST_DIR:%=%.pid): %.pid: %
- $(<D)/$(<F) --pidfile=$@ --outfile=$<.out --dirname=$<.test
+$(TST_FILE:%=%.args):
+ @echo --filename=$(basename $@).test
-$(TST_DIR_FILE:%=%.pid): %.pid: %
- $(<D)/$(<F) --pidfile=$@ --outfile=$<.out --dirname=$<.dir.test --filename=$<.test
+$(TST_DIR:%=%.args):
+ @echo --dirname=$(basename $@).test
+
+$(TST_DIR_FILE:%=%.args):
+ @echo --dirname=$(basename $@).dir.test --filename=$(basename $@).test
+
+%.pid: %
+ $(<D)/$(<F) $(shell $(MAKE) -s $<.args-global) $(shell $(MAKE) -s $<.args)
%.out: %.pid %
-kill -TERM `cat $<`
diff --git a/test/zdtm/live/static/Makefile b/test/zdtm/live/static/Makefile
index 2fc88d2..8d9340c 100644
--- a/test/zdtm/live/static/Makefile
+++ b/test/zdtm/live/static/Makefile
@@ -242,16 +242,14 @@ all: criu-rtc.so
inotify_system_nodel.c: inotify_system.c
ln -sf inotify_system.c inotify_system_nodel.c
-cmdlinenv00.pid: cmdlinenv00
- $(<D)/$(<F) --pidfile=$@ --outfile=$<.out --arg1=arg1 --arg2=arg2 --arg3=arg3
-
-env00.pid: env00
- $(<D)/$(<F) --pidfile=$@ --outfile=$<.out --envname=ENV_00_TEST
-umask00.pid: umask00
- $(<D)/$(<F) --pidfile=$@ --outfile=$<.out --mask=0345
-
-fifo-rowo-pair.pid: fifo-rowo-pair
- $(<D)/$(<F) --pidfile=$@ --outfile=$<.out --name_master=$<.master.test --name_slave=$<.slave.test
+cmdlinenv00.args:
+ @echo --arg1=arg1 --arg2=arg2 --arg3=arg3
+env00.args:
+ @echo --envname=ENV_00_TEST
+umask00.args:
+ @echo --mask=0345
+fifo-rowo-pair.args:
+ @echo --name_master=$(basename $@).master.test --name_slave=$(basename $@).slave.test
aio00: override LDLIBS += -laio
different_creds: override LDLIBS += -lcap
--
2.7.1
More information about the CRIU
mailing list