2015-08-05 06:23:59 +00:00
|
|
|
use base "installedtest";
|
2015-05-13 11:00:46 +00:00
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
|
|
|
|
sub run {
|
2016-01-28 05:40:07 +00:00
|
|
|
my $self = shift;
|
2016-01-28 07:34:01 +00:00
|
|
|
my $release = lc(get_var("VERSION"));
|
Pungi 4 conversion: handle Pungi-derived BUILD and FLAVOR
With the arrival of Pungi 4, the scheduler is no longer using
fedfind-provided BUILD and FLAVOR values, but ones derived from
Pungi properties. BUILD is now simply the Pungi compose_id.
FLAVOR is produced by joining the Pungi variant, type, and
format with '-' characters as the separators.
Pungi, unfortunately, does not treat 'Rawhide' as a release, it
synthesizes a release number for Rawhide composes and places
that in the compose ID. To cope with that, for now, the
scheduler will set RAWHIDE to '1' if the compose is a Rawhide
one. As we have to adapt all places where we parse the release
in any case, this commit consolidates them into a fedorabase
subroutine.
For the one place where we also used to parse the 'milestone'
from fedfind, there is a placeholder get_milestone subroutine
which currently returns an empty string, as I don't yet have a
good handle on how to draw the kinds of distinctions fedfind
mapped to 'milestone' from Pungi metadata.
2016-01-28 04:48:04 +00:00
|
|
|
# NOTE: this doesn't actually work yet, it's a FIXME in fedorabase
|
|
|
|
my $milestone = $self->get_milestone;
|
convert upgrade tests to dnf-plugin-system-upgrade
Summary:
This is a first cut which more or less works for now. Issues:
1) We're not really testing the BUILD, here. All the test does
is try and upgrade to the specified VERSION - so it'll be using
the latest 'stable' for the given VERSION at the time the test
runs. This isn't really that terrible, but especially for TC/RC
validation, we might want to make things a bit more elaborate
and set up the repo for the actual BUILD (and disable the main
repos).
2) We'd actually need --nogpgcheck for non-Rawhide, at one
specific point in the release cycle - after Branching but
before Bodhi activation (which is when we can be sure all
packages are signed). This won't matter until 24 branches, and
maybe releng will have it fixed by then...if not, I'll tweak
it.
3) We don't really test that the upgrade actually *happened*
for desktop, at the moment - the only thing in the old test
that really checked that was where we checked for the fedup
boot menu entry, but that has no analog in dnf. What we should
probably do is check that GUI login works, then switch to a
console and check /etc/fedora-release just as the minimal test
does.
Test Plan:
Run the tests. Note that creating the desktop disk
image doesn't work ATM, so I can't verify the desktop test
works, but the minimal one seems to (with D565). There'll be
a matching diff for openqa_fedora_tools to update the test
case names there.
Reviewers: jskladan, garretraziel
Reviewed By: jskladan, garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D567
2015-09-10 21:49:13 +00:00
|
|
|
my $args = "--releasever=${release}";
|
|
|
|
# This is excessive - after the Bodhi activation point we don't
|
|
|
|
# need --nogpgcheck for Branched. But that's hard to detect magically
|
|
|
|
if ($release eq 'rawhide' or $milestone eq 'branched') {
|
|
|
|
$args .= " --nogpgcheck";
|
2015-05-13 11:00:46 +00:00
|
|
|
}
|
2015-10-27 01:02:22 +00:00
|
|
|
# disable screen blanking (download can take a long time)
|
2015-11-04 13:38:36 +00:00
|
|
|
script_run "setterm -blank 0";
|
2015-10-27 01:02:22 +00:00
|
|
|
|
2016-05-05 23:39:47 +00:00
|
|
|
assert_script_run "dnf -y system-upgrade download ${args}", 6000;
|
2015-05-13 11:00:46 +00:00
|
|
|
|
convert upgrade tests to dnf-plugin-system-upgrade
Summary:
This is a first cut which more or less works for now. Issues:
1) We're not really testing the BUILD, here. All the test does
is try and upgrade to the specified VERSION - so it'll be using
the latest 'stable' for the given VERSION at the time the test
runs. This isn't really that terrible, but especially for TC/RC
validation, we might want to make things a bit more elaborate
and set up the repo for the actual BUILD (and disable the main
repos).
2) We'd actually need --nogpgcheck for non-Rawhide, at one
specific point in the release cycle - after Branching but
before Bodhi activation (which is when we can be sure all
packages are signed). This won't matter until 24 branches, and
maybe releng will have it fixed by then...if not, I'll tweak
it.
3) We don't really test that the upgrade actually *happened*
for desktop, at the moment - the only thing in the old test
that really checked that was where we checked for the fedup
boot menu entry, but that has no analog in dnf. What we should
probably do is check that GUI login works, then switch to a
console and check /etc/fedora-release just as the minimal test
does.
Test Plan:
Run the tests. Note that creating the desktop disk
image doesn't work ATM, so I can't verify the desktop test
works, but the minimal one seems to (with D565). There'll be
a matching diff for openqa_fedora_tools to update the test
case names there.
Reviewers: jskladan, garretraziel
Reviewed By: jskladan, garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D567
2015-09-10 21:49:13 +00:00
|
|
|
upload_logs "/var/log/dnf.log";
|
|
|
|
upload_logs "/var/log/dnf.rpm.log";
|
2015-05-13 11:00:46 +00:00
|
|
|
|
2015-11-04 13:38:36 +00:00
|
|
|
script_run "dnf system-upgrade reboot";
|
2015-12-07 23:46:20 +00:00
|
|
|
# fail immediately if we see a DNF error message
|
2015-11-18 19:17:49 +00:00
|
|
|
die "DNF reported failure" if (check_screen "upgrade_fail");
|
2015-05-13 11:00:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sub test_flags {
|
|
|
|
# without anything - rollback to 'lastgood' snapshot if failed
|
|
|
|
# 'fatal' - whole test suite is in danger if this fails
|
|
|
|
# 'milestone' - after this test succeeds, update 'lastgood'
|
|
|
|
# 'important' - if this fails, set the overall state to 'fail'
|
|
|
|
return { fatal => 1 };
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|