c62b8e
From 8be66c69d122e077d9638fb59274d8ca369918d7 Mon Sep 17 00:00:00 2001
c62b8e
From: Frantisek Sumsal <fsumsal@redhat.com>
c62b8e
Date: Thu, 17 Jan 2019 12:03:10 +0100
c62b8e
Subject: [PATCH] travis: reboot the container before running tests
c62b8e
c62b8e
(cherry picked from commit f8cbf4a84876a42b86670d88f3c0772839b0f0c1)
c62b8e
---
c62b8e
 ci/travis-centos-rhel7.sh | 4 ++++
c62b8e
 ci/travis-centos-rhel8.sh | 4 ++++
c62b8e
 2 files changed, 8 insertions(+)
c62b8e
c62b8e
diff --git a/ci/travis-centos-rhel7.sh b/ci/travis-centos-rhel7.sh
c62b8e
index 870f4d8e33..9f128ab8e2 100755
c62b8e
--- a/ci/travis-centos-rhel7.sh
c62b8e
+++ b/ci/travis-centos-rhel7.sh
c62b8e
@@ -60,6 +60,10 @@ for phase in "${PHASES[@]}"; do
c62b8e
             $DOCKER_EXEC sed -i '/test_path_changed,/d' src/test/test-path.c
c62b8e
 
c62b8e
             # Run the internal testsuite
c62b8e
+            # Let's install the new systemd and "reboot" the container to avoid
c62b8e
+            # unexpected fails due to incompatibilities with older systemd
c62b8e
+            $DOCKER_EXEC make install
c62b8e
+            docker restart $CONT_NAME
c62b8e
             if ! $DOCKER_EXEC make check; then
c62b8e
                 $DOCKER_EXEC cat test-suite.log
c62b8e
                 exit 1
c62b8e
diff --git a/ci/travis-centos-rhel8.sh b/ci/travis-centos-rhel8.sh
c62b8e
index 8eda5e982f..1f72d984e0 100755
c62b8e
--- a/ci/travis-centos-rhel8.sh
c62b8e
+++ b/ci/travis-centos-rhel8.sh
c62b8e
@@ -113,6 +113,10 @@ for phase in "${PHASES[@]}"; do
c62b8e
             )
c62b8e
             docker exec -it -e CFLAGS='-g -O0 -ftrapv' $CONT_NAME meson build "${CONFIGURE_OPTS[@]}"
c62b8e
             $DOCKER_EXEC ninja -v -C build
c62b8e
+            # Let's install the new systemd and "reboot" the container to avoid
c62b8e
+            # unexpected fails due to incompatibilities with older systemd
c62b8e
+            $DOCKER_EXEC ninja -C build install
c62b8e
+            docker restart $CONT_NAME
c62b8e
             # "Mask" the udev-test.pl, as it requires newer version of systemd-detect-virt
c62b8e
             # and it's pointless to run it on a VM in a Docker container...
c62b8e
             echo -ne "#!/usr/bin/perl\nexit(0);\n" > "test/udev-test.pl"