Blame SOURCES/0680-travis-reboot-the-container-before-running-tests.patch

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