make sure we get logs from failed kickstart installs

Summary:
by waiting for the bootloader in _boot_to_anaconda rather than
_console_wait_login, we can ensure that we use the anaconda
post-fail hook and thus get logs uploaded when a kickstart
install fails.

Test Plan:
Run a kickstart install test that fails and check
anaconda logs get uploaded. Then run one that works and make
sure it...still works.

Reviewers: jskladan, garretraziel

Reviewed By: garretraziel

Subscribers: tflink

Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D1005
This commit is contained in:
Adam Williamson 2016-09-19 16:50:42 -07:00
parent af00b71790
commit 1cdd8e18b7
7 changed files with 16 additions and 9 deletions

View File

@ -110,11 +110,11 @@ sub do_bootloader {
# if not postinstall and not UEFI, syslinux
$args{bootloader} //= ($args{uefi} || $args{postinstall}) ? "grub" : "syslinux";
if ($args{uefi}) {
# we don't just tag all screens with 'bootloader' because we
# want to be sure we actually did a UEFI boot
# we use the firmware-type specific tags because we want to be
# sure we actually did a UEFI boot
assert_screen "bootloader_uefi", $args{timeout};
} else {
assert_screen "bootloader", $args{timeout};
assert_screen "bootloader_bios", $args{timeout};
}
if ($args{mutex}) {
# cancel countdown

View File

@ -10,6 +10,7 @@
],
"tags": [
"bootloader",
"bootloader_bios",
"ENV-DISTRI-fedora"
]
}

View File

@ -10,6 +10,7 @@
],
"tags": [
"bootloader",
"bootloader_bios",
"ENV-DISTRI-fedora",
"ENV-FLAVOR-server"
]

View File

@ -10,6 +10,7 @@
],
"tags": [
"bootloader",
"bootloader_bios",
"ENV-DISTRI-fedora",
"ENV-FLAVOR-server"
]

View File

@ -4,7 +4,8 @@
"ENV-FLAVOR-server_boot",
"ENV-FLAVOR-workstation_live",
"ENV-UEFI-1",
"bootloader_uefi"
"bootloader_uefi",
"bootloader"
],
"area": [
{

View File

@ -28,8 +28,13 @@ sub run {
$self->do_bootloader(postinstall=>0, params=>$params, mutex=>$mutex);
# proceed to installer
unless (get_var("KICKSTART"))
{
if (get_var("KICKSTART")) {
# wait for the bootloader *here* - in a test that inherits from
# anacondatest - so that if something goes wrong during install,
# we get anaconda logs
assert_screen "bootloader", 1800;
}
else {
if (get_var("ANACONDA_TEXT")) {
# select that we don't want to start VNC; we want to run in text mode
assert_screen "anaconda_use_text_mode", 300;

View File

@ -4,10 +4,8 @@ use testapi;
sub run {
my $self = shift;
# If KICKSTART is set, then the wait_time needs to consider the
# install time. if UPGRADE, we have to wait for the entire upgrade
# If UPGRADE is set, we have to wait for the entire upgrade
my $wait_time = 300;
$wait_time = 1800 if (get_var("KICKSTART"));
$wait_time = 6000 if (get_var("UPGRADE"));
# handle bootloader, if requested