mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-09 17:04:21 +00:00
c7a1b94c84
This sets us up to test the release-blocking aarch64 disk images (Minimal, Server and Workstation). It also allows for testing armhfp disk images on aarch64 worker hosts (though my testing of that isn't going too well so far), and fixes the initial-setup handling for a change upstream ('use password' is now the default so we don't need to choose it). We rewire disk image deployment test loading to work through the generic loader code rather than using ENTRYPOINT, as it allows us to more gracefully handle graphical (Workstation) vs. console (Server, Minimal), moving the code for handling console initial-setup to a helper function just like the code for gnome-initial-setup and having _console_ wait_login call it when appropriate. We also tweak desktop_vt a bit because now we need to switch from a console running as test to a desktop, which breaks the assumption that the highest numbered session of user test is the desktop... Signed-off-by: Adam Williamson <awilliam@redhat.com>
46 lines
1.3 KiB
Perl
46 lines
1.3 KiB
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
use utils;
|
|
|
|
sub run {
|
|
my $self = shift;
|
|
# If UPGRADE is set, we have to wait for the entire upgrade
|
|
my $wait_time = 300;
|
|
$wait_time = 6000 if (get_var("UPGRADE"));
|
|
|
|
# handle bootloader, if requested
|
|
if (get_var("GRUB_POSTINSTALL")) {
|
|
do_bootloader(postinstall=>1, params=>get_var("GRUB_POSTINSTALL"), timeout=>$wait_time);
|
|
$wait_time = 240;
|
|
}
|
|
|
|
# handle initial-setup, if we're expecting it (ARM disk image)
|
|
if (get_var("INSTALL_NO_USER")) {
|
|
console_initial_setup;
|
|
}
|
|
|
|
# Wait for the text login
|
|
boot_to_login_screen(timeout => $wait_time);
|
|
|
|
# do user login unless USER_LOGIN is set to string 'false'
|
|
unless (get_var("USER_LOGIN") eq "false") {
|
|
# this avoids us waiting 90 seconds for a # to show up
|
|
my $origprompt = $testapi::distri->{serial_term_prompt};
|
|
$testapi::distri->{serial_term_prompt} = '$ ';
|
|
console_login(user=>get_var("USER_LOGIN", "test"), password=>get_var("USER_PASSWORD", "weakpassword"));
|
|
$testapi::distri->{serial_term_prompt} = $origprompt;
|
|
}
|
|
if (get_var("ROOT_PASSWORD")) {
|
|
console_login(user=>"root", password=>get_var("ROOT_PASSWORD"));
|
|
}
|
|
}
|
|
|
|
sub test_flags {
|
|
return { fatal => 1, milestone => 1 };
|
|
}
|
|
|
|
1;
|
|
|
|
# vim: set sw=4 et:
|