From a20ea59961cb4cdb3877ca1b122ee4c990e1a817 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 7 Feb 2019 10:37:04 -0800 Subject: [PATCH] Don't install updates on support server if versions don't match I caught a few failed support_server update tests which failed because packages from the update weren't installed; they weren't installed because the update was for F28, but the support server runs on an F29 disk image. Obviously we should skip the 'install packages from the update' step in the support_server test unless the versions match. Arguably we could *never* install updates in support_server, but I think it's actually valuable to know if the update breaks support_server if we *are* on the right version. Signed-off-by: Adam Williamson --- main.pm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/main.pm b/main.pm index 8fe573b0..6aff7a24 100644 --- a/main.pm +++ b/main.pm @@ -276,9 +276,13 @@ sub load_postinstall_tests() { # are checking that an installer image built from the update works and do # not install the update themselves in this manner if (get_var("ADVISORY_OR_TASK") && !get_var("UPGRADE") && !get_var("INSTALL")) { - autotest::loadtest "tests/_advisory_update.pm"; - # now load the early boot tests again, as _advisory_update reboots - _load_early_postinstall_tests(2); + # don't try and install updates on the support server unless the + # update is for the same release as the support server disk image + if (get_var("TEST") ne "support_server" || get_var("VERSION") eq get_var("CURRREL")) { + autotest::loadtest "tests/_advisory_update.pm"; + # now load the early boot tests again, as _advisory_update reboots + _load_early_postinstall_tests(2); + } } # from now on, we have fully installed and booted system with root/specified user logged in @@ -321,7 +325,11 @@ sub load_postinstall_tests() { # do this for INSTALL test(s); these are checking that an installer image # built from the update works and do not install the update themselves. if (get_var("ADVISORY_OR_TASK") && !get_var("INSTALL")) { - autotest::loadtest "tests/_advisory_post.pm"; + # don't try and install updates on the support server unless the + # update is for the same release as the support server disk image + if (get_var("TEST") ne "support_server" || get_var("VERSION") eq get_var("CURRREL")) { + autotest::loadtest "tests/_advisory_post.pm"; + } } # we should shut down before uploading disk images