diff options
author | Adrian Reber <areber@redhat.com> | 2018-06-22 00:10:38 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@virtuozzo.com> | 2018-06-23 08:25:07 +0300 |
commit | 396c37dd62fe858615c7b3157d504ee79e6caa29 (patch) | |
tree | 3663da803f044e608bdebd901b430bfc4c74f694 | |
parent | b24a54b63ef8c8ba497f7e1b20bb8096add0abe3 (diff) |
tests: fix builds on alpine and centos
Install sudo, create test user with ID 1000, install bash,
fix pidfile creation and pidfile chmod.
v2:
* use sleep to give the criu daemon some time to start up
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
-rw-r--r-- | scripts/build/Dockerfile.alpine | 7 | ||||
-rw-r--r-- | scripts/build/Dockerfile.centos | 1 | ||||
-rw-r--r-- | test/others/rpc/Makefile | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/scripts/build/Dockerfile.alpine b/scripts/build/Dockerfile.alpine index a210d0662..4163bced5 100644 --- a/scripts/build/Dockerfile.alpine +++ b/scripts/build/Dockerfile.alpine @@ -4,6 +4,7 @@ ARG ENV1=FOOBAR RUN apk update && apk add \ $CC \ + bash \ build-base \ ccache \ coreutils \ @@ -15,7 +16,8 @@ RUN apk update && apk add \ pkgconfig \ protobuf-c-dev \ protobuf-dev \ - python + python \ + sudo COPY . /criu WORKDIR /criu @@ -37,5 +39,8 @@ RUN apk add \ e2fsprogs \ asciidoc xmlto +# The rpc test cases are running as user #1000, let's add the user +RUN adduser -u 1000 -D test + RUN pip install protobuf ipaddress junit_xml RUN make -C test/zdtm diff --git a/scripts/build/Dockerfile.centos b/scripts/build/Dockerfile.centos index 5f8470773..0160b7594 100644 --- a/scripts/build/Dockerfile.centos +++ b/scripts/build/Dockerfile.centos @@ -27,6 +27,7 @@ RUN yum install -y \ python2-junit_xml \ python-yaml \ python-six \ + sudo \ tar \ which \ e2fsprogs \ diff --git a/test/others/rpc/Makefile b/test/others/rpc/Makefile index 5b383cfb8..2b15873fd 100644 --- a/test/others/rpc/Makefile +++ b/test/others/rpc/Makefile @@ -9,6 +9,8 @@ run: all chmod a+rwx build @# need to start the criu daemon here to access the pidfile sudo -g '#1000' -u '#1000' ./criu service -v4 -W build -o service.log --address criu_service.socket -d --pidfile pidfile + # Give the criu daemon some time to start up + sleep 0.5 chmod a+rw build/pidfile sudo -g '#1000' -u '#1000' ./run.sh sudo -g '#1000' -u '#1000' ./version.py |