1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-08 00:44:20 +00:00
os-autoinst-distri-fedora/tests/_console_wait_login.pm
Adam Williamson 6dc20de0b0 move 'loadkeys us' call into avc_crash test for now
Ugh, there's no good way to do this ATM. If this doesn't work
I might just skip the test for this case.
2016-12-08 12:18:45 -08:00

41 lines
1.2 KiB
Perl

use base "fedorabase";
use strict;
use testapi;
use main_common;
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")) {
$self->do_bootloader(postinstall=>1, params=>get_var("GRUB_POSTINSTALL"), timeout=>$wait_time);
$wait_time = 180;
}
# 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") {
console_login(user=>get_var("USER_LOGIN", "test"), password=>get_var("USER_PASSWORD", "weakpassword"));
}
if (get_var("ROOT_PASSWORD")) {
console_login(user=>"root", password=>get_var("ROOT_PASSWORD"));
}
}
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, milestone => 1 };
}
1;
# vim: set sw=4 et: