daandemeyer / rpms / systemd

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