diff --git a/lib/utils.pm b/lib/utils.pm index 3cdce8fd..c81bfd4b 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -436,9 +436,9 @@ sub _repo_setup_updates { # } # log the exact packages in the update at test time, with their - # source packages and epochs. log is uploaded by _advisory_update - # and used for later comparison by _advisory_post + # source packages and epochs assert_script_run 'rpm -qp *.rpm --qf "%{SOURCERPM} %{EPOCH} %{NAME}-%{VERSION}-%{RELEASE}\n" | sort -u > /var/log/updatepkgs.txt'; + upload_logs "/var/log/updatepkgs.txt"; # create the repo metadata assert_script_run "createrepo ."; # write a repo config file diff --git a/main.pm b/main.pm index 8a46462a..4e040d0e 100644 --- a/main.pm +++ b/main.pm @@ -269,8 +269,10 @@ sub load_postinstall_tests() { # if scheduler passed an advisory, update packages from that advisory # (intended for the updates testing workflow, so we install the updates - # to be tested) - if (get_var("ADVISORY")) { + # to be tested). Don't do this for UPGRADE tests, as the update gets + # installed as part of the upgrade in that case and we don't need the + # extra reboot. + if (get_var("ADVISORY") && !get_var("UPGRADE")) { autotest::loadtest "tests/_advisory_update.pm"; # now load the early boot tests again, as _advisory_update reboots _load_early_postinstall_tests(2); diff --git a/tests/_advisory_update.pm b/tests/_advisory_update.pm index 3c65d42c..af2787fa 100644 --- a/tests/_advisory_update.pm +++ b/tests/_advisory_update.pm @@ -9,10 +9,6 @@ sub run { # update packages and run 'dnf update' $self->root_console(tty=>3); repo_setup; - # upload the log of installed packages which repo_setup created - # we do this here and not in repo_setup because this is the best - # place to make sure it happens once and only once per job - upload_logs "/var/log/updatepkgs.txt"; # reboot, in case any of the updates need a reboot to apply script_run "reboot", 0; }