mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-11-19 12:43:08 +00:00
b35695c4ce
this gets quite a few more tests working. We now handle crypted disks, tests with czech keyboard layout, and the proxy tests. We also handle the package tests that boot to lightdm because they install Xfce, by allowing forced console login after graphical boot with FORCE_CONSOLE_LOGIN. We also allow (require, in fact) specifying URLs for the HTTP and NFS test repos (we don't do anything for generating those, you're expected to do it with the script from kickstart-tests). We now handle the filesystem type tests when run on a Server image (previously they would fail because default FS on those is xfs while the kickstart test expects ext4). We workaround the kickstart test 'fail' in the openQA test for now, as fixing the kickstart test is actually quite complex (detecting a Server install from a %post script is not super clean). Note these changes depend on kickstart-tests PRs #14 and #15 to some extent (without #14 in fact the 'kickstarts' command will die in a fire, as it expects the Makefile from that PR to be present). Without #15 the reqpart test may fail.
58 lines
1.7 KiB
Perl
58 lines
1.7 KiB
Perl
use base "fedorabase";
|
|
use strict;
|
|
use testapi;
|
|
|
|
sub _map_string {
|
|
my $self = shift;
|
|
my $string = shift;
|
|
if (get_var("LOGIN_KEYMAP")) {
|
|
$string = $self->keymap_string($string, get_var("LOGIN_KEYMAP"));
|
|
}
|
|
return $string;
|
|
}
|
|
|
|
sub run {
|
|
my $self = shift;
|
|
|
|
# If KICKSTART is set and ENCRYPT_PASSWORD is not, then the
|
|
# wait_time needs to consider the install time
|
|
my $wait_time = (get_var("KICKSTART") && !(get_var("ENCRYPT_PASSWORD"))) ? 1800 : 300;
|
|
|
|
# FORCE_CONSOLE_LOGIN tells us to wait for a graphical login
|
|
# then switch to a console
|
|
if (get_var("FORCE_CONSOLE_LOGIN")) {
|
|
assert_screen "graphical_login", $wait_time;
|
|
$wait_time = 20;
|
|
send_key "ctrl-alt-f3";
|
|
}
|
|
|
|
# Wait for the text login
|
|
assert_screen "text_console_login", $wait_time;
|
|
|
|
# do user login unless USER_LOGIN is set to string 'false'
|
|
my $user = get_var("USER_LOGIN", "test");
|
|
unless ($user eq "false") {
|
|
my $userpass = get_var("USER_PASSWORD", "weakpassword");
|
|
$self->console_login(user=>$self->_map_string($user), password=>$self->_map_string($userpass));
|
|
}
|
|
if (get_var("ROOT_PASSWORD")) {
|
|
$self->console_login(user=>$self->_map_string("root"), password=>$self->_map_string(get_var("ROOT_PASSWORD")));
|
|
}
|
|
# if requested, load US keymap.
|
|
if (get_var("LOADKEYS")) {
|
|
type_string $self->_map_string("loadkeys us\n");
|
|
}
|
|
}
|
|
|
|
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:
|