[CRIU] [PATCH] test: add scripts, which are used by jenkins

Andrey Vagin avagin at openvz.org
Thu Jan 16 07:14:39 PST 2014


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 test/jenkins/criu-btrfs.sh | 12 ++++++++++++
 test/jenkins/criu-by-id.sh | 12 ++++++++++++
 test/jenkins/criu-rpi.sh   |  7 +++++++
 test/jenkins/criu.sh       | 33 +++++++++++++++++++++++++++++++++
 4 files changed, 64 insertions(+)
 create mode 100644 test/jenkins/criu-btrfs.sh
 create mode 100644 test/jenkins/criu-by-id.sh
 create mode 100644 test/jenkins/criu-rpi.sh
 create mode 100644 test/jenkins/criu.sh

diff --git a/test/jenkins/criu-btrfs.sh b/test/jenkins/criu-btrfs.sh
new file mode 100644
index 0000000..02c08c5
--- /dev/null
+++ b/test/jenkins/criu-btrfs.sh
@@ -0,0 +1,12 @@
+echo 950000 > /sys/fs/cgroup/cpu,cpuacct/system/cpu.rt_runtime_us || true
+echo 950000 > /sys/fs/cgroup/cpu,cpuacct/system/jenkins.service/cpu.rt_runtime_us || true
+git clean -dfx &&
+make -j 4 && make -C test/zdtm &&
+
+# A few tests is excluded due to:
+# mountpoints works only from a root mount
+# maps04 is too slow on btrfs
+bash -x test/zdtm.sh -C -x "\(maps04\|mountpoints\)" || {
+    tar -czf /home/criu-btrfs-${GIT_COMMIT}-$(date +%m%d%H%M).tar.gz .
+    exit 1
+}
diff --git a/test/jenkins/criu-by-id.sh b/test/jenkins/criu-by-id.sh
new file mode 100644
index 0000000..1ce7ed5
--- /dev/null
+++ b/test/jenkins/criu-by-id.sh
@@ -0,0 +1,12 @@
+echo 950000 > /sys/fs/cgroup/cpu,cpuacct/system/cpu.rt_runtime_us
+echo 950000 > /sys/fs/cgroup/cpu,cpuacct/system/jenkins.service/cpu.rt_runtime_us
+git checkout -f ${TEST_COMMIT}
+git clean -dfx &&
+make -j 4 && make -C test/zdtm &&
+
+# execute tests in parallel
+make -C test -j 32 zdtm_ns &&
+true || {
+    tar -czf /home/criu-by-id-${TEST_COMMIT}-$(date +%m%d%H%M).tar.gz .
+    exit 1
+}
diff --git a/test/jenkins/criu-rpi.sh b/test/jenkins/criu-rpi.sh
new file mode 100644
index 0000000..282fcef
--- /dev/null
+++ b/test/jenkins/criu-rpi.sh
@@ -0,0 +1,7 @@
+set -e
+export CR_IP_TOOL=/root/iproute2/ip/ip
+ulimit -c unlimited
+git clean -dxf
+make clean
+make
+bash test//zdtm.sh -C -x '\(maps\|fanot\|fpu\|mmx\|sse\|rtc\)'
diff --git a/test/jenkins/criu.sh b/test/jenkins/criu.sh
new file mode 100644
index 0000000..be2816f
--- /dev/null
+++ b/test/jenkins/criu.sh
@@ -0,0 +1,33 @@
+# systemd executes jenkins in a separate cpu cgroup
+echo 950000 > /sys/fs/cgroup/cpu,cpuacct/system/cpu.rt_runtime_us || true
+echo 950000 > /sys/fs/cgroup/cpu,cpuacct/system/jenkins.service/cpu.rt_runtime_us || true
+
+git clean -dfx &&
+make -j 4 && make -C test/zdtm &&
+
+# Dump/restore
+bash test/zdtm.sh -C &&
+
+# Three iterations of dump/restore
+bash test/zdtm.sh -C -i 3 &&
+
+# Use page-server
+bash test/zdtm.sh -p -C &&
+
+# Dump w/o restore
+bash test/zdtm.sh -d -C &&
+
+# Make three iterative snapshots and check the last one
+bash test/zdtm.sh -s -i 3 -C -x '\(unlink\|socket-tcp\)' &&
+
+true || {
+    tar -czf /home/criu-p-${GIT_COMMIT}-$(date +%m%d%H%M).tar.gz .
+    exit 1
+}
+
+# Execute per-commit job
+git rev-parse tested || ( git tag tested; exit )
+for i in `git rev-list --reverse tested..HEAD`; do
+    curl "http://localhost:8080/job/CRIU-by-id/buildWithParameters?token=d6edab71&TEST_COMMIT=$i" || exit 1
+done
+git tag -f tested
-- 
1.8.3.1



More information about the CRIU mailing list