1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-26 17:25:34 +03:00

Merge pull request #11095 from evverx/use-systemd-as-pid1-yolo

travis: use systemd as PID1 in debian containers
This commit is contained in:
Evgeny Vereshchagin 2018-12-09 16:53:03 +03:00 committed by GitHub
commit a01eb97b6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,25 +30,25 @@ for phase in "${PHASES[@]}"; do
SETUP)
info "Setup phase"
info "Using Debian $DEBIAN_RELEASE"
# Pull a Docker image and start a new container
docker pull debian:$DEBIAN_RELEASE
printf "FROM debian:$DEBIAN_RELEASE\nRUN bash -c 'apt-get -y update && apt-get install -y systemd'\n" | docker build -t debian-with-systemd/latest -
info "Starting container $CONT_NAME"
$DOCKER_RUN -v $REPO_ROOT:/build:rw \
-w /build --privileged=true --name $CONT_NAME \
-dit --net=host debian:$DEBIAN_RELEASE /bin/bash
-dit --net=host debian-with-systemd/latest /usr/bin/systemd
$DOCKER_EXEC bash -c "echo deb-src http://deb.debian.org/debian $DEBIAN_RELEASE main >>/etc/apt/sources.list"
$DOCKER_EXEC apt-get -y update
$DOCKER_EXEC apt-get -y build-dep systemd
$DOCKER_EXEC apt-get -y install "${ADDITIONAL_DEPS[@]}"
# overlayfs on TravisCI is having trouble delivering inotify events to test-path and test-event.
# Let's use tmpfs instead for now.
$DOCKER_EXEC mount -t tmpfs tmpfs /tmp
;;
RUN)
info "Run phase"
$DOCKER_EXEC meson --werror -Dtests=unsafe -Dslow-tests=true -Dsplit-usr=true build
$DOCKER_EXEC ninja -v -C build
# The tests are failing on Travis CI: https://travis-ci.org/systemd/systemd/jobs/464904604
# so let's skip them for now.
#$DOCKER_EXEC ninja -C build test
#$DOCKER_EXEC tools/check-directives.sh
$DOCKER_EXEC ninja -C build test
$DOCKER_EXEC tools/check-directives.sh
;;
RUN_CLANG)
docker exec -e CC=clang -e CXX=clang++ -it $CONT_NAME meson --werror -Dtests=unsafe -Dslow-tests=true -Dsplit-usr=true build