mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-24 23:03:08 +00:00
Tweak how update-upgrade tests are handled a bit
Looking at this, it's a bit weird: the updated packages are actually included in the upgrade process, but we still run _advisory_update, which does basically nothing...then reboots. That's kinda silly and makes the tests a bit flaky, let's fix it. I don't think there's actually any problem with doing the upload of updatepkgs.txt in _repo_setup_updates, becase that already guards against being run more than once, it just bails very early if it's already been run. Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
parent
5d501433e8
commit
a49f328dc6
@ -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
|
||||
|
6
main.pm
6
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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user