[CRIU] [PATCH] jenkins: collect an report for each run

Andrey Vagin avagin at openvz.org
Thu Oct 29 11:45:03 PDT 2015


From: Andrew Vagin <avagin at openvz.org>

Now zdtm.py can construct an report which contains all required
inforamtion for investigating a problem. This patch adds support
of this functionality to jenkins scripts.

Signed-off-by: Andrew Vagin <avagin at openvz.org>
---
 test/jenkins/criu-iter.sh    |  6 ++----
 test/jenkins/criu-lib.sh     | 11 +++++++++++
 test/jenkins/criu-sibling.sh |  6 ++----
 3 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/test/jenkins/criu-iter.sh b/test/jenkins/criu-iter.sh
index bce1fc4..da7239a 100644
--- a/test/jenkins/criu-iter.sh
+++ b/test/jenkins/criu-iter.sh
@@ -2,7 +2,5 @@
 set -e
 source `dirname $0`/criu-lib.sh
 prep
-mkdir -p test/dump
-mount -t tmpfs dump test/dump
-cd test
-./zdtm.py run --all --parallel 4 --iter 3 -x 'maps04' || fail
+mount_tmpfs_to_dump
+./test/zdtm.py run --all --report dump/report --parallel 4 --iter 3 -x 'maps04' || fail
diff --git a/test/jenkins/criu-lib.sh b/test/jenkins/criu-lib.sh
index 686be2c..373953f 100644
--- a/test/jenkins/criu-lib.sh
+++ b/test/jenkins/criu-lib.sh
@@ -9,6 +9,16 @@ function prep()
 	make -j 4 &&
 	make -j 4 -C test/zdtm/live &&
 	make -C test zdtm_ct &&
+	mkdir -p test/dump/report &&
+	true
+}
+
+function mount_tmpfs_to_dump()
+{
+		
+	mkdir -p test/dump &&
+	mount -t tmpfs criu_dump test/dump &&
+	mkdir -p test/dump/report &&
 	true
 }
 
@@ -18,5 +28,6 @@ function fail()
 	ps axf > ps.log
 	cat /sys/kernel/debug/tracing/trace > trace.log
 	tar -czf /home/`basename $0`-${GIT_COMMIT}-$(date +%m%d%H%M).tar.gz .
+	tar -czf report.tar.gz -C test/dump report
 	exit 1
 }
diff --git a/test/jenkins/criu-sibling.sh b/test/jenkins/criu-sibling.sh
index 22417ac..300da44 100644
--- a/test/jenkins/criu-sibling.sh
+++ b/test/jenkins/criu-sibling.sh
@@ -2,7 +2,5 @@
 set -e
 source `dirname $0`/criu-lib.sh
 prep
-mkdir -p test/dump
-mount -t tmpfs dump test/dump
-cd test
-./zdtm.py run --all --sibling --parallel 4 || fail
+mount_tmpfs_to_dump
+./test/zdtm.py run --all --report test/dump/report --sibling --parallel 4 || fail
-- 
2.4.3



More information about the CRIU mailing list