[CRIU] [PATCH] test: add a target to execute non-zdtm tests

Andrew Vagin avagin at openvz.org
Mon Jun 23 08:35:05 PDT 2014


make -C test other

Signed-off-by: Andrew Vagin <avagin at openvz.org>
---
 test/Makefile               |  7 +++++++
 test/libcriu/Makefile       |  3 +++
 test/libcriu/run.sh         |  3 ++-
 test/mem-snap/Makefile      |  2 ++
 test/mem-snap/run.sh        | 13 +++++++++++++
 test/rpc/Makefile           |  3 +++
 test/tcp/Makefile           |  3 +++
 test/unix-callback/Makefile |  3 +++
 8 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 test/mem-snap/Makefile
 create mode 100755 test/mem-snap/run.sh

diff --git a/test/Makefile b/test/Makefile
index 5231275..5386d2d 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -9,6 +9,13 @@ all: .FORCE
 	$(MAKE) zdtm
 .PHONY: all
 
+TESTS = unix-callback mem-snap rpc libcriu
+
+other: .FORCE
+	for t in $(TESTS); do			\
+		$(MAKE) -C $$t run || break;	\
+	done					\
+
 zdtm: .FORCE
 	$(MAKE) zdtm_ns
 	for t in $(shell echo "$(TST)" | tr ' ' '\n' | grep -Pv $(EXP)); do \
diff --git a/test/libcriu/Makefile b/test/libcriu/Makefile
index a1af1f5..88df427 100644
--- a/test/libcriu/Makefile
+++ b/test/libcriu/Makefile
@@ -1,6 +1,9 @@
 all: build/test
 .PHONY: all
 
+run: all
+	./run.sh
+
 build/test: build/test.o
 	gcc $^ -L ../../lib -lcriu -o $@
 
diff --git a/test/libcriu/run.sh b/test/libcriu/run.sh
index 04a8c10..1437bcf 100755
--- a/test/libcriu/run.sh
+++ b/test/libcriu/run.sh
@@ -53,7 +53,8 @@ LOOP_PID=${!}
 echo "pid ${LOOP_PID}"
 
 title_print "Run test.c"
-LD_LIBRARY_PATH=../../../lib
+ln -s ../../../lib/libcriu.so libcriu.so.1
+LD_LIBRARY_PATH=.
 export LD_LIBRARY_PATH
 ./test ${LOOP_PID} || _exit $?
 
diff --git a/test/mem-snap/Makefile b/test/mem-snap/Makefile
new file mode 100644
index 0000000..f5185e7
--- /dev/null
+++ b/test/mem-snap/Makefile
@@ -0,0 +1,2 @@
+run: all
+	./run.sh
diff --git a/test/mem-snap/run.sh b/test/mem-snap/run.sh
new file mode 100755
index 0000000..b3995ec
--- /dev/null
+++ b/test/mem-snap/run.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# Don't execute tests, which use maps04, they are executed by zdtm
+
+set -e
+
+#./run-predump-2.sh
+./run-predump.sh
+./run-snap-auto-dedup.sh
+./run-snap-dedup-on-restore.sh
+./run-snap-dedup.sh
+#./run-snap-maps04.sh
+./run-snap.sh
diff --git a/test/rpc/Makefile b/test/rpc/Makefile
index ac52ae5..f2cecb0 100644
--- a/test/rpc/Makefile
+++ b/test/rpc/Makefile
@@ -1,6 +1,9 @@
 all: test-c rpc_pb2.py
 .PHONY: all
 
+run: all
+	./run.sh
+
 test-c: rpc.pb-c.o test.o
 	gcc $^ -o $@ -lprotobuf-c
 
diff --git a/test/tcp/Makefile b/test/tcp/Makefile
index 365ea3d..311d68b 100644
--- a/test/tcp/Makefile
+++ b/test/tcp/Makefile
@@ -3,6 +3,9 @@ OBJS=cln srv
 all: $(OBJS)
 .PHONY: all
 
+run: all
+	./run.sh
+
 clean:
 	rm -f $(OBJS)
 .PHONY: clean
diff --git a/test/unix-callback/Makefile b/test/unix-callback/Makefile
index 191de67..f2993c5 100644
--- a/test/unix-callback/Makefile
+++ b/test/unix-callback/Makefile
@@ -1,5 +1,8 @@
 all: unix-lib.so unix-server unix-client syslog-lib.so
 
+run: all
+	./run.sh
+
 unix.pb-c.c: unix.proto
 	protoc-c --proto_path=. --c_out=. unix.proto
 
-- 
1.9.0



More information about the CRIU mailing list