mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 06:45:35 +00:00
travis: Do not run privileged containers in LXD
Travis uses unprivileged containers for aarch64 in LXD. Docker with '--privileged' fails in such situation. This changes the travis setup to only start docker with '--privileged' if running on x86_64. Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
committed by
Andrei Vagin
parent
62953d4334
commit
6be414bb2b
@@ -13,6 +13,9 @@ endif
|
|||||||
|
|
||||||
TARGETS := alpine fedora-rawhide centos
|
TARGETS := alpine fedora-rawhide centos
|
||||||
ZDTM_OPTIONS :=
|
ZDTM_OPTIONS :=
|
||||||
|
UNAME := $(shell uname -m)
|
||||||
|
|
||||||
|
export UNAME
|
||||||
|
|
||||||
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
|
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
|
||||||
|
|
||||||
@@ -23,17 +26,29 @@ define DOCKER_JSON
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
export DOCKER_JSON
|
export DOCKER_JSON
|
||||||
$(TARGETS):
|
|
||||||
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:
|
ifeq ($(UNAME),x86_64)
|
||||||
echo "$$DOCKER_JSON" > /etc/docker/daemon.json
|
CONTAINER_OPTS := --rm -it --privileged -v /lib/modules:/lib/modules --tmpfs /run
|
||||||
systemctl restart docker
|
else
|
||||||
|
CONTAINER_OPTS := --rm -v /lib/modules:/lib/modules --tmpfs /run
|
||||||
|
endif
|
||||||
|
|
||||||
|
restart-docker:
|
||||||
|
if [ "$$UNAME" = "x86_64" ]; then \
|
||||||
|
echo "$$DOCKER_JSON" > /etc/docker/daemon.json; \
|
||||||
|
cat /etc/docker/daemon.json; \
|
||||||
|
systemctl status docker; \
|
||||||
|
systemctl restart docker; \
|
||||||
|
systemctl status docker; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
$(TARGETS): restart-docker
|
||||||
$(MAKE) -C ../build $@$(target-suffix)
|
$(MAKE) -C ../build $@$(target-suffix)
|
||||||
docker run --rm -it --privileged -v /lib/modules:/lib/modules --tmpfs /run criu-$@ ./scripts/travis/asan.sh $(ZDTM_OPTIONS)
|
docker run --env-file docker.env $(CONTAINER_OPTS) criu-$@ scripts/travis/travis-tests
|
||||||
|
|
||||||
|
fedora-asan: restart-docker
|
||||||
|
$(MAKE) -C ../build $@$(target-suffix)
|
||||||
|
docker run -it $(CONTAINER_OPTS) criu-$@ ./scripts/travis/asan.sh $(ZDTM_OPTIONS)
|
||||||
|
|
||||||
docker-test:
|
docker-test:
|
||||||
./docker-test.sh
|
./docker-test.sh
|
||||||
|
Reference in New Issue
Block a user