Commit 2c5b2785 authored by Adrian Reber's avatar Adrian Reber Committed by Andrei Vagin

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: 's avatarAdrian Reber <areber@redhat.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 6a49d037
...@@ -4,6 +4,7 @@ ARG ENV1=FOOBAR ...@@ -4,6 +4,7 @@ ARG ENV1=FOOBAR
RUN apk update && apk add \ RUN apk update && apk add \
$CC \ $CC \
bash \
build-base \ build-base \
ccache \ ccache \
coreutils \ coreutils \
...@@ -15,7 +16,8 @@ RUN apk update && apk add \ ...@@ -15,7 +16,8 @@ RUN apk update && apk add \
pkgconfig \ pkgconfig \
protobuf-c-dev \ protobuf-c-dev \
protobuf-dev \ protobuf-dev \
python python \
sudo
COPY . /criu COPY . /criu
WORKDIR /criu WORKDIR /criu
...@@ -36,5 +38,8 @@ RUN apk add \ ...@@ -36,5 +38,8 @@ RUN apk add \
e2fsprogs \ e2fsprogs \
asciidoc xmlto 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 pip install protobuf ipaddress junit_xml
RUN make -C test/zdtm RUN make -C test/zdtm
...@@ -27,6 +27,7 @@ RUN yum install -y \ ...@@ -27,6 +27,7 @@ RUN yum install -y \
python2-junit_xml \ python2-junit_xml \
python-yaml \ python-yaml \
python-six \ python-six \
sudo \
tar \ tar \
which \ which \
e2fsprogs \ e2fsprogs \
......
...@@ -9,6 +9,8 @@ run: all ...@@ -9,6 +9,8 @@ run: all
chmod a+rwx build chmod a+rwx build
@# need to start the criu daemon here to access the pidfile @# 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 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 chmod a+rw build/pidfile
sudo -g '#1000' -u '#1000' ./run.sh sudo -g '#1000' -u '#1000' ./run.sh
sudo -g '#1000' -u '#1000' ./version.py sudo -g '#1000' -u '#1000' ./version.py
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment