[CRIU] [PATCH 05/10] phaul: add a script to run tests

Andrei Vagin avagin at openvz.org
Wed Oct 18 02:59:16 MSK 2017


From: Andrei Vagin <avagin at virtuozzo.com>

Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
---
 phaul/Makefile | 8 +++++++-
 phaul/test.sh  | 7 +++++++
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100755 phaul/test.sh

diff --git a/phaul/Makefile b/phaul/Makefile
index d504062a3..93bf2273a 100644
--- a/phaul/Makefile
+++ b/phaul/Makefile
@@ -1,7 +1,7 @@
 all: test piggie
 
 test: stats
-	go build -o test test
+	make -C src/test
 
 stats:
 	mkdir -p src/stats/
@@ -9,3 +9,9 @@ stats:
 
 piggie: piggie.c
 	gcc piggie.c -o piggie
+
+clean:
+	rm -rf test_images/
+
+run_test:
+	unshare -fpm --mount-proc ./test.sh
diff --git a/phaul/test.sh b/phaul/test.sh
new file mode 100755
index 000000000..23036bd14
--- /dev/null
+++ b/phaul/test.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e -x
+
+./piggie
+
+./src/test/test `pidof piggie`
-- 
2.13.3



More information about the CRIU mailing list