[CRIU] [PATCH 14/14] test: run a full set of tests in docker containers

Andrei Vagin avagin at virtuozzo.com
Sat Jun 2 00:03:04 MSK 2018


Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
---
 scripts/travis/Makefile     |  8 +++++++-
 scripts/travis/docker.env   |  4 ++++
 scripts/travis/travis-tests | 10 ++++++----
 3 files changed, 17 insertions(+), 5 deletions(-)
 create mode 100644 scripts/travis/docker.env

diff --git a/scripts/travis/Makefile b/scripts/travis/Makefile
index 5a740a034..52c183880 100644
--- a/scripts/travis/Makefile
+++ b/scripts/travis/Makefile
@@ -11,12 +11,18 @@ ifdef CLANG
 	target-suffix = -clang
 endif
 
-TARGETS := fedora-asan alpine fedora-rawhide phaul centos
+TARGETS := alpine fedora-rawhide phaul centos
 ZDTM_OPTIONS :=
 
 alpine: ZDTM_OPTIONS=-x zdtm/static/binfmt_misc -x zdtm/static/netns-nf -x zdtm/static/sched_policy00 -x zdtm/static/seccomp_strict -x zdtm/static/sigaltstack -x zdtm/static/signalfd00 -x zdtm/static/config_inotify_irmap
 
 $(TARGETS):
+	echo 'DOCKER_OPTS="--storage-driver=devicemapper"' > /etc/default/docker
+	restart docker
+	$(MAKE) -C ../build $@$(target-suffix)
+	docker run --env-file docker.env --rm -it --privileged -v /lib/modules:/lib/modules --tmpfs /run criu-$@ scripts/travis/travis-tests
+
+fedora-asan:
 	echo 'DOCKER_OPTS="--storage-driver=devicemapper"' > /etc/default/docker
 	restart docker
 	$(MAKE) -C ../build $@$(target-suffix)
diff --git a/scripts/travis/docker.env b/scripts/travis/docker.env
new file mode 100644
index 000000000..36154df0d
--- /dev/null
+++ b/scripts/travis/docker.env
@@ -0,0 +1,4 @@
+SKIP_TRAVIS_PREP=1
+ZDTM_OPTS=-x zdtm/static/binfmt_misc -x zdtm/static/sched_policy00
+CC=gcc
+SKIP_EXT_DEV_TEST=1
diff --git a/scripts/travis/travis-tests b/scripts/travis/travis-tests
index dc036cb63..fe4574049 100755
--- a/scripts/travis/travis-tests
+++ b/scripts/travis/travis-tests
@@ -84,7 +84,7 @@ chmod 0777 test/
 chmod 0777 test/zdtm/static
 chmod 0777 test/zdtm/transition
 
-./test/zdtm.py run -a -p 2
+./test/zdtm.py run -a -p 2 --keep-going $ZDTM_OPTS
 
 KERN_MAJ=`uname -r | cut -d. -f1`
 KERN_MIN=`uname -r | cut -d. -f2`
@@ -99,14 +99,16 @@ LAZY_EXCLUDE="$LAZY_EXCLUDE -x maps04"
 
 LAZY_TESTS=.*\(maps0\|uffd-events\|lazy-thp\|futex\|fork\).*
 
-./test/zdtm.py run -p 2 -T $LAZY_TESTS --lazy-pages $LAZY_EXCLUDE
-./test/zdtm.py run -p 2 -T $LAZY_TESTS --remote-lazy-pages $LAZY_EXCLUDE
+./test/zdtm.py run -p 2 -T $LAZY_TESTS --lazy-pages $LAZY_EXCLUDE $ZDTM_OPTS
+./test/zdtm.py run -p 2 -T $LAZY_TESTS --remote-lazy-pages $LAZY_EXCLUDE $ZDTM_OPTS
 
 bash ./test/jenkins/criu-fault.sh
 bash ./test/jenkins/criu-fcg.sh
 bash ./test/jenkins/criu-inhfd.sh
 
-make -C test/others/mnt-ext-dev/ run
+if [ -z "$SKIP_EXT_DEV_TEST" ]; then
+	make -C test/others/mnt-ext-dev/ run
+fi
 #make -C test/others/exec/ run
 make -C test/others/make/ run CC="$CC"
 
-- 
2.14.3



More information about the CRIU mailing list