richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
ff6046
From 63e71bda5a00c04c16f330cfc0e6f91e7dcead59 Mon Sep 17 00:00:00 2001
ff6046
From: Frantisek Sumsal <fsumsal@redhat.com>
ff6046
Date: Thu, 17 Jan 2019 12:03:10 +0100
ff6046
Subject: [PATCH] travis: reboot the container before running tests
ff6046
ff6046
---
ff6046
 ci/travis-centos-rhel7.sh | 4 ++++
ff6046
 ci/travis-centos-rhel8.sh | 4 ++++
ff6046
 2 files changed, 8 insertions(+)
ff6046
ff6046
diff --git a/ci/travis-centos-rhel7.sh b/ci/travis-centos-rhel7.sh
ff6046
index b1b3de1cc2..73416798ed 100755
ff6046
--- a/ci/travis-centos-rhel7.sh
ff6046
+++ b/ci/travis-centos-rhel7.sh
ff6046
@@ -52,6 +52,10 @@ for phase in "${PHASES[@]}"; do
ff6046
                                      --enable-gtk-doc --enable-compat-libs --disable-sysusers \
ff6046
                                      --disable-ldconfig --enable-lz4 --with-sysvinit-path=/etc/rc.d/init.d
ff6046
             $DOCKER_EXEC make
ff6046
+            # Let's install the new systemd and "reboot" the container to avoid
ff6046
+            # unexpected fails due to incompatibilities with older systemd
ff6046
+            $DOCKER_EXEC make install
ff6046
+            docker restart $CONT_NAME
ff6046
             if ! $DOCKER_EXEC make check; then
ff6046
                 $DOCKER_EXEC cat test-suite.log
ff6046
                 exit 1
ff6046
diff --git a/ci/travis-centos-rhel8.sh b/ci/travis-centos-rhel8.sh
ff6046
index 8eda5e982f..1f72d984e0 100755
ff6046
--- a/ci/travis-centos-rhel8.sh
ff6046
+++ b/ci/travis-centos-rhel8.sh
ff6046
@@ -113,6 +113,10 @@ for phase in "${PHASES[@]}"; do
ff6046
             )
ff6046
             docker exec -it -e CFLAGS='-g -O0 -ftrapv' $CONT_NAME meson build "${CONFIGURE_OPTS[@]}"
ff6046
             $DOCKER_EXEC ninja -v -C build
ff6046
+            # Let's install the new systemd and "reboot" the container to avoid
ff6046
+            # unexpected fails due to incompatibilities with older systemd
ff6046
+            $DOCKER_EXEC ninja -C build install
ff6046
+            docker restart $CONT_NAME
ff6046
             # "Mask" the udev-test.pl, as it requires newer version of systemd-detect-virt
ff6046
             # and it's pointless to run it on a VM in a Docker container...
ff6046
             echo -ne "#!/usr/bin/perl\nexit(0);\n" > "test/udev-test.pl"