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.
41 lines
1.5 KiB
Perl
41 lines
1.5 KiB
Perl
use base "installedtest";
|
|
use strict;
|
|
use testapi;
|
|
|
|
sub run {
|
|
my $self=shift;
|
|
if (not( check_screen "root_console", 0)) {
|
|
$self->root_console(tty=>3);
|
|
}
|
|
# As a special case, we treat 'default fstype is incorrect (got xfs;
|
|
# expected ext4)' as a pass when running the two 'default filesystem'
|
|
# tests on Server images, because xfs is the default filesystem for
|
|
# Server. This is complex to fix in the tests and I'm not sure
|
|
# anaconda would accept the PR. We use a very precise match for this
|
|
# case to make sure we don't pass if the /boot filesystem is wrong.
|
|
# Using 'ISO' here is kind of a hack, we might want to pass in subv
|
|
# from the scheduler for all jobs or something.
|
|
my @elems = split('-', get_var('ISO'));
|
|
my $subv = $elems[1];
|
|
if (get_var('KSTEST_SERVER_FSTYPE') && $subv eq 'Server') {
|
|
validate_script_output 'cat /root/RESULT', sub { $_ eq "default fstype is incorrect (got xfs; expected ext4)" };
|
|
}
|
|
else {
|
|
# we can't use ^SUCCESS$ because sometimes there are messages
|
|
# like 'SUCCESS but (some non-critical issue)'
|
|
validate_script_output 'cat /root/RESULT', sub { $_ =~ m/^SUCCESS/ };
|
|
}
|
|
}
|
|
|
|
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 };
|
|
}
|
|
|
|
1;
|
|
|
|
# vim: set sw=4 et:
|