Skip to content

Commit

Permalink
phaul: run the phaul test in a docker container
Browse files Browse the repository at this point in the history
golang from the Ubuntu Trusty is too old.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
  • Loading branch information
avagin committed Nov 15, 2017
1 parent d282f75 commit 32f2a2c
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 12 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
- TR_ARCH=fedora-rawhide
- TR_ARCH=fedora-rawhide-aarch64
- TR_ARCH=docker-test
- TR_ARCH=phaul-test
matrix:
allow_failures:
- env: TR_ARCH=docker-test
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,10 @@ docker-build:
$(MAKE) -C scripts/build/ x86_64
.PHONY: docker-build

phaul-test:
docker run --rm -it --privileged criu-x86_64 ./scripts/travis/phaul
.PHONY: phaul-test

docker-test:
docker run --rm -it --privileged criu-x86_64 ./test/zdtm.py run -a -x tcp6 -x tcpbuf6 -x static/rtc -x cgroup
.PHONY: docker-test
Expand Down
3 changes: 2 additions & 1 deletion scripts/build/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ RUN apk add py-yaml \
iptables \
iproute2 \
tar \
bash
bash\
go

RUN pip install protobuf ipaddr
RUN make -C test/zdtm
1 change: 0 additions & 1 deletion scripts/build/Dockerfile.fedora.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ ENV CCACHE_DIR=/tmp/.ccache CCACHE_NOCOMPRESS=1 $ENV1=yes
RUN mv .ccache /tmp && make mrproper && ccache -s && ccache -z && \
date && make -j $(nproc) CC="$CC" && date && ccache -s
RUN make -C test/zdtm -j $(nproc)

8 changes: 7 additions & 1 deletion scripts/travis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ifdef CLANG
target-suffix = -clang
endif

TARGETS := fedora-asan alpine fedora-rawhide
TARGETS := fedora-asan alpine fedora-rawhide phaul
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
Expand All @@ -22,6 +22,12 @@ $(TARGETS):
$(MAKE) -C ../build $@$(target-suffix)
docker run --rm -it --privileged -v /lib/modules:/lib/modules --tmpfs /run criu-$@ ./scripts/travis/asan.sh $(ZDTM_OPTIONS)

phaul-test:
echo 'DOCKER_OPTS="--storage-driver=devicemapper"' > /etc/default/docker
restart docker
$(MAKE) -C ../build alpine
docker run --rm -it --privileged -v /lib/modules:/lib/modules --tmpfs /run criu-alpine ./scripts/travis/phaul

docker-test:
./docker-test.sh

Expand Down
12 changes: 12 additions & 0 deletions scripts/travis/phaul
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -e -x

export CC=gcc
export PATH=`pwd`/criu:$PATH &&
cd phaul/
mkdir -p src/github.com/xemul/criu &&
ln -s ../../../../ src/github.com/xemul/criu/phaul &&
export GOPATH=`pwd` &&
cd src/github.com/xemul/criu/phaul &&
make run_test
9 changes: 0 additions & 9 deletions scripts/travis/travis-tests
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,6 @@ ip net add test

./test/zdtm.py run --empty-ns -T zdtm/static/socket-tcp*-local --iter 2

(
mkdir -p src/github.com/xemul
ln -s ../../../ src/github.com/xemul/criu
export GOPATH=`pwd`
export PATH=`pwd`/criu:$PATH
cd src/github.com/xemul/criu
make -C phaul run_test
)

pip install flake8
make lint

Expand Down

0 comments on commit 32f2a2c

Please sign in to comment.