1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-12-24 03:03:08 +00:00

Adds uefi support to tests where it makes sense

What changed:
* There is a new needle for uefi bootloader.
* UEFI postinstallation phase
* UEFI tests and machine added to template
This commit is contained in:
Petr Schindler 2015-09-15 11:04:01 +02:00
parent 5d650b070d
commit 338b4bf513
7 changed files with 227 additions and 3 deletions

View File

@ -69,6 +69,7 @@ it also means that `B` conflicts `A` even if not shown in the table).
| `USER_LOGIN` | string | not set | should be used with `USER_PASSWORD` | when set, user login is set to this value |
| `USER_PASSWORD` | string | not set | should be used with `USER_LOGIN` | when set, user password is set to this value |
| `BOOT_UPDATES_IMG_URL` | boolean | `false`/not set | set to indicate that path to updates.img was appended to kernel line |
| `UEFI` | boolean | `false`/not set | nothing | whether to use UEFI, this variable isn't usually set in test suites but in machine definition |
Run variables
-------------

View File

@ -161,6 +161,10 @@ else
$storagepost = $loc if (-e $loc);
}
autotest::loadtest $storagepost if ($storagepost);
if (get_var("UEFI")) {
autotest::loadtest get_var('CASEDIR')."/tests/uefi_postinstall.pm";
}
}

View File

@ -0,0 +1,21 @@
{
"tags": [
"ENV-DESKTOP-gnome",
"ENV-DISTRI-fedora",
"ENV-FLAVOR-server_boot",
"ENV-FLAVOR-workstation_live",
"ENV-LANGUAGE-ALL",
"ENV-UEFI-1",
"bootloader_uefi"
],
"area": [
{
"width": 140,
"height": 14,
"xpos": 126,
"type": "match",
"ypos": 140
}
],
"properties": []
}

BIN
needles/bootloader_uefi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

152
templates
View File

@ -16,6 +16,16 @@
},
test_suite => { name => "default_install" },
},
{
machine => { name => "uefi" },
product => {
arch => "x86_64",
distri => "fedora",
flavor => "workstation_live",
version => "*",
},
test_suite => { name => "default_install" },
},
{
machine => { name => "64bit" },
product => {
@ -26,6 +36,16 @@
},
test_suite => { name => "default_install" },
},
{
machine => { name => "uefi" },
product => {
arch => "x86_64",
distri => "fedora",
flavor => "server_boot",
version => "*",
},
test_suite => { name => "default_install" },
},
{
machine => { name => "64bit" },
product => {
@ -36,6 +56,16 @@
},
test_suite => { name => "default_install" },
},
{
machine => { name => "uefi" },
product => {
arch => "x86_64",
distri => "fedora",
flavor => "generic_boot",
version => "*",
},
test_suite => { name => "default_install" },
},
{
machine => { name => "64bit" },
product => {
@ -96,6 +126,16 @@
},
test_suite => { name => "server_delete_pata" },
},
{
machine => { name => "uefi" },
product => {
arch => "x86_64",
distri => "fedora",
flavor => "universal",
version => "*",
},
test_suite => { name => "server_delete_pata" },
},
{
machine => { name => "64bit" },
product => {
@ -126,6 +166,16 @@
},
test_suite => { name => "server_sata_multi" },
},
{
machine => { name => "uefi" },
product => {
arch => "x86_64",
distri => "fedora",
flavor => "universal",
version => "*",
},
test_suite => { name => "server_sata_multi" },
},
{
machine => { name => "64bit" },
product => {
@ -216,6 +266,96 @@
},
test_suite => { name => "server_no_swap" },
},
{
machine => { name => "uefi" },
product => {
arch => "x86_64",
distri => "fedora",
flavor => "universal",
version => "*",
},
test_suite => { name => "server_simple_encrypted" },
},
{
machine => { name => "uefi" },
product => {
arch => "x86_64",
distri => "fedora",
flavor => "universal",
version => "*",
},
test_suite => { name => "server_simple_free_space" },
},
{
machine => { name => "uefi" },
product => {
arch => "x86_64",
distri => "fedora",
flavor => "universal",
version => "*",
},
test_suite => { name => "server_multi_empty" },
},
{
machine => { name => "uefi" },
product => {
arch => "x86_64",
distri => "fedora",
flavor => "universal",
version => "*",
},
test_suite => { name => "server_software_raid" },
},
{
machine => { name => "uefi" },
product => {
arch => "x86_64",
distri => "fedora",
flavor => "universal",
version => "*",
},
test_suite => { name => "server_delete_partial" },
},
{
machine => { name => "uefi" },
product => {
arch => "x86_64",
distri => "fedora",
flavor => "universal",
version => "*",
},
test_suite => { name => "server_btrfs" },
},
{
machine => { name => "uefi" },
product => {
arch => "x86_64",
distri => "fedora",
flavor => "universal",
version => "*",
},
test_suite => { name => "server_ext3" },
},
{
machine => { name => "uefi" },
product => {
arch => "x86_64",
distri => "fedora",
flavor => "universal",
version => "*",
},
test_suite => { name => "server_lvmthin" },
},
{
machine => { name => "uefi" },
product => {
arch => "x86_64",
distri => "fedora",
flavor => "universal",
version => "*",
},
test_suite => { name => "server_no_swap" },
},
{
machine => { name => "64bit" },
product => {
@ -570,6 +710,18 @@
],
variables => "",
},
{
backend => "qemu",
name => "uefi",
settings => [
{ key => "QEMUCPU", value => "qemu64" },
{ key => "QEMUCPUS", value => "2"},
{ key => "QEMUVGA", value => "std"},
{ key => "QEMURAM", value => "2048"},
{ key => "UEFI", value => "1"}
],
variables => "",
},
],
Products => [
{

View File

@ -2,9 +2,25 @@ use base "anacondatest";
use strict;
use testapi;
# get_kernel_line switches to menu edit screen and sets the cursor to the end of kernel line
sub get_kernel_line {
if( get_var("UEFI")){
send_key "e";
send_key "down";
send_key "down";
send_key "end";
} else {
send_key "tab";
}
}
sub run {
# Wait for bootloader to appear
assert_screen "bootloader", 30;
if( get_var("UEFI")){
assert_screen "bootloader_uefi", 30;
} else {
assert_screen "bootloader", 30;
}
# Make sure we skip media check if it's selected by default. Standard
# 'boot installer' menu entry is always first.
@ -13,7 +29,7 @@ sub run {
# if variable GRUB is set, add its value into kernel line in grub
if( get_var("GRUB")){
send_key "tab";
get_kernel_line;
type_string " ".get_var("GRUB");
}
@ -21,7 +37,7 @@ sub run {
# if variable REPOSITORY_VARIATION is set, construct inst.repo url and add it to kernel line
if (get_var("REPOSITORY_VARIATION")){
unless (get_var("GRUB")){
send_key "tab";
get_kernel_line;
}
my $fedora_version = "";
my $repourl = "";
@ -35,6 +51,9 @@ sub run {
}
# now we are on the correct "boot" menu item
# hit Ctrl+x for the case when the uefi kernel line was edited
send_key "ctrl-x";
# Return starts boot in all other cases
send_key "ret";
unless (get_var("KICKSTART"))

27
tests/uefi_postinstall.pm Normal file
View File

@ -0,0 +1,27 @@
use base "installedtest";
use strict;
use testapi;
sub run {
my $self=shift;
if (not( check_screen "root_console", 0)) {
$self->root_console(tty=>3);
}
assert_screen "root_console";
# this test shows if the system is booted with efi
type_string 'reset; [ -d /sys/firmware/efi/ ]; echo $?';
send_key "ret";
assert_screen "console_command_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: