mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2025-08-08 09:55:44 +00:00
69 lines
2.2 KiB
Perl
69 lines
2.2 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;
|
|
|
|
# If we want to test system upgrade via GUI, we need to make sure
|
|
# that Gnome Software allows to see prerelease upgrades, too.
|
|
# We want to deal with it here, in order to save one restart
|
|
# between the steps.
|
|
#
|
|
|
|
if (get_var("GUI_UPGRADE")) {
|
|
# If we want to use Software or some other GUI tool to handle
|
|
# upgrades, we need to take into account that for most of our
|
|
# tests we will be upgrading to a prerelease version. Therefore
|
|
# we need to enable such version to be shown and accessible
|
|
# as normally we prevent this behaviour.
|
|
#
|
|
# First, let's become the corresponding user.
|
|
my $login = get_var("USER_LOGIN") // "test";
|
|
my $password = get_var("USER_PASSWORD") // "weakpassword";
|
|
desktop_login($login, $password);
|
|
# Run Terminal to be able to issue commands
|
|
menu_launch_type("gnome-terminal");
|
|
save_screenshot;
|
|
wait_still_screen(3);
|
|
# Use gsettings to enable prerelease versions to be shown
|
|
type_safely("gsettings set org.gnome.software show-upgrade-prerelease true\n");
|
|
sleep 2;
|
|
# Use gsettings to disable screen dim on inactivity.
|
|
type_safely("gsettings set org.gnome.settings-daemon.plugins.power idle-dim false\n");
|
|
# Use gsettings to disable powering off the display
|
|
type_safely("gsettings set org.gnome.desktop.session idle-delay 0\n");
|
|
sleep 2;
|
|
type_safely("exit\n");
|
|
}
|
|
|
|
# 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;
|
|
}
|
|
|
|
|
|
sub test_flags {
|
|
return { fatal => 1 };
|
|
}
|
|
|
|
1;
|
|
|
|
# vim: set sw=4 et:
|