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

Submitted by Andrey Vagin on June 1, 2018, 9:03 p.m.

Details

Message ID 20180601210304.30164-15-avagin@virtuozzo.com
State Accepted
Series "More changes to be compatible with python 3"
Headers show

Commit Message

Andrey Vagin June 1, 2018, 9:03 p.m.
Signed-off-by: Andrei Vagin <avagin@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

Patch hide | download patch | download mbox

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"