1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-08-09 18:35:44 +00:00

Add GUI variant of the upgrade test.

This commit is contained in:
Lukáš Růžička 2021-12-02 15:10:11 +01:00
parent ff6165c839
commit 7bb40c4d44

View File

@ -2,7 +2,6 @@ use base "installedtest";
use strict; use strict;
use testapi; use testapi;
use utils; use utils;
sub run { sub run {
my $self = shift; my $self = shift;
my $release = lc(get_var("VERSION")); my $release = lc(get_var("VERSION"));
@ -10,6 +9,59 @@ sub run {
if ($release eq "rawhide") { if ($release eq "rawhide") {
$relnum = get_var("RAWREL", "rawhide"); $relnum = get_var("RAWREL", "rawhide");
} }
if (get_var("GUI_UPGRADE")) {
# Get back to the desktop
desktop_vt();
# If the desktop is Gnome
if (get_var("DESKTOP") eq "gnome") {
desktop_login(get_var("USER_LOGIN"), get_var("USER_PASSWORD"));
# Start Gnome software
menu_launch_type("gnome-software");
# If it is run for the first time, hit the Browse button to
# speed things up.
if (check_screen("gnome_software_browse_button")) {
assert_and_click("gnome_software_browse_button");
}
# Click on the updates button. There should be no updates available,
# as updates were already handled by the upgrade_preinstall test,
# so we should only see the new version banner.
assert_and_click("gnome_software_updates_button", 60);
# Check that the banner is there.
assert_screen("gnome_software_new_version");
# Click on the Download button to download the new version.
assert_and_click("gnome_software_new_download");
# Wait until it gets downloaded. It can take a long time, so
# we will do regular checks.
wait_until_needlematch("gnome_software_new_install", 10, 120);
# Click to Install the updates
assert_and_click("gnome_software_new_install");
if (check_screen("gnome_software_authenticate")) {
# If authentication dialogue, then authenticate
type_safely(get_var("USER_PASSWORD"));
send_key("ret");
}
else {
die("There was no authentication dialogue requested for an activity where it should have been.");
}
if (check_screen("gnome_software_restart")) {
assert_and_click("gnome_software_restart");
}
}
}
else {
# disable screen blanking (download can take a long time) # disable screen blanking (download can take a long time)
script_run "setterm -blank 0"; script_run "setterm -blank 0";
@ -35,7 +87,7 @@ sub run {
# out for the bootloader so we can handle it if requested # out for the bootloader so we can handle it if requested
check_screen ["upgrade_fail", "bootloader"], 15; check_screen ["upgrade_fail", "bootloader"], 15;
die "DNF reported failure" if (match_has_tag "upgrade_fail"); die "DNF reported failure" if (match_has_tag "upgrade_fail");
}
# handle bootloader, if requested; set longer timeout as sometimes # handle bootloader, if requested; set longer timeout as sometimes
# reboot here seems to take a long time # reboot here seems to take a long time
if (get_var("GRUB_POSTINSTALL")) { if (get_var("GRUB_POSTINSTALL")) {