1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2025-08-09 10:25:44 +00:00
os-autoinst-distri-fedora/tests/upgrade_boot.pm
2021-12-01 13:19:32 +01:00

49 lines
1.4 KiB
Perl

use base "installedtest";
use strict;
use testapi;
use utils;
sub run {
my $self = shift;
# handle bootloader, if requested
if (get_var("GRUB_POSTINSTALL")) {
do_bootloader(postinstall=>1, params=>get_var("GRUB_POSTINSTALL"));
}
# decrypt disks during boot if necessary
if (get_var("ENCRYPT_PASSWORD")) {
boot_decrypt(60);
}
boot_to_login_screen;
# switch to TTY3 for both, graphical and console tests
$self->root_console(tty=>3);
# disable screen blanking (update can take a long time)
script_run "setterm -blank 0";
# adjust repo files to use mirrorlist not metalink (to avoid
# metalink checksum timing issue causing infra repo to be rejected)
repos_mirrorlist;
# If this should be a GUI upgrade test, we need to set up Gnome to accept prerelease.
# Let's do it here and we will save one system restart later.
if (get_var("GUI_UPGRADE")) {
# Get the login, or select test.
my $login = get_var("USER_LOGIN") // "test";
# Switch to the test user
type_string("su $login\n";)
# Use gsettings to enable showing the prerelease
script_run("gsettings set org.gnome.software show-upgrade-prerelease true");
# Return to the root console.
type_string("exit\n");
}
}
sub test_flags {
return { fatal => 1 };
}
1;
# vim: set sw=4 et: