[5/5] travis: switch to the Ubuntu Xenial

Submitted by Andrei Vagin on Nov. 27, 2018, 5:45 p.m.

Details

Message ID 20181127174545.3872-6-avagin@gmail.com
State Accepted
Series "travis: switch to the Ubuntu Xenial"
Headers show

Commit Message

Andrei Vagin Nov. 27, 2018, 5:45 p.m.
Signed-off-by: Andrei Vagin <avagin@gmail.com>
---
 .travis.yml                              |  2 +-
 scripts/build/Dockerfile.fedora-asan.hdr |  2 +-
 scripts/travis/Makefile                  | 16 ++++++++++++----
 test/zdtm.py                             |  2 +-
 4 files changed, 15 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/.travis.yml b/.travis.yml
index 7e47b5a9e..b69b87a3e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,6 @@ 
 language: c
 sudo: required
-dist: trusty
+dist: xenial
 cache: ccache
 services:
   - docker
diff --git a/scripts/build/Dockerfile.fedora-asan.hdr b/scripts/build/Dockerfile.fedora-asan.hdr
index 8c77c2551..3ec09c1c0 100644
--- a/scripts/build/Dockerfile.fedora-asan.hdr
+++ b/scripts/build/Dockerfile.fedora-asan.hdr
@@ -1,2 +1,2 @@ 
-FROM fedora:27
+FROM fedora:29
 ENV ASAN=1
diff --git a/scripts/travis/Makefile b/scripts/travis/Makefile
index 1b2858280..07c46fa48 100644
--- a/scripts/travis/Makefile
+++ b/scripts/travis/Makefile
@@ -16,15 +16,23 @@  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
 
+define DOCKER_JSON
+{
+	"storage-driver": "devicemapper"
+}
+endef
+
+export DOCKER_JSON
 $(TARGETS):
-	echo 'DOCKER_OPTS="--storage-driver=devicemapper"' > /etc/default/docker
-	restart docker
+	echo "$$DOCKER_JSON" > /etc/docker/daemon.json
+	systemctl 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
+	ip6tables -L -n
+	echo "$$DOCKER_JSON" > /etc/docker/daemon.json
+	systemctl restart docker
 	$(MAKE) -C ../build $@$(target-suffix)
 	docker run --rm -it --privileged -v /lib/modules:/lib/modules --tmpfs /run criu-$@ ./scripts/travis/asan.sh $(ZDTM_OPTIONS)
 
diff --git a/test/zdtm.py b/test/zdtm.py
index f3fc8c10e..d151c869d 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -1762,7 +1762,7 @@  class Launcher:
 
 			if sub['log']:
 				with open(sub['log']) as sublog:
-					print(sublog.read().encode('ascii', 'ignore'))
+					print("%s" % sublog.read().encode('ascii', 'ignore').decode('utf-8'))
 				os.unlink(sub['log'])
 
 			return True