mirror of
https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git
synced 2024-12-22 10:23:09 +00:00
df195a7853
Summary: BOOT_UPDATES_IMG_URL is a pretty misleading name - it used to be the actual URL, but now it's simply a boolean that decides whether we look for the effect of the openQA updates image or not. TEST_UPDATES seems clearer. GRUBADD does the same thing as GRUB, on top of it. The point of this is so we can add an option to the scheduler CLI that lets you say 'run the normal tests, but with this updates image' - so we can easily (albeit manually triggered) check the impact of some anaconda change that needs testing. It should never be set in the templates or the tests, it's there strictly for the scheduler (whether that's fedora_openqa_schedule or literally a person calling `client isos post`) to use as a kind of override. The tests that test updates image loading will probably fail when doing this, but all other tests should work as intended, including ones that specify GRUB, becase the extra params will just get added on top. That's why I invented a new var instead of just letting the scheduler override GRUB's value when POST ing. Test Plan: Check the rename didn't break anything (updates tests still work). Run tests with GRUBADD param, make sure value is correctly appended to cmdline both when GRUB is also specified and when it is not. Reviewers: jskladan, garretraziel Reviewed By: garretraziel Subscribers: tflink Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D801
104 lines
3.3 KiB
Perl
104 lines
3.3 KiB
Perl
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
|
|
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.
|
|
send_key "up";
|
|
send_key "up";
|
|
|
|
# if variable GRUB is set, add its value into kernel line in grub
|
|
if( get_var("GRUB")){
|
|
get_kernel_line;
|
|
type_string " ".get_var("GRUB");
|
|
|
|
}
|
|
|
|
# if GRUBADD is set, add that to kernel line too. this is for doing
|
|
# stuff like running the tests with an updates.img to test some
|
|
# anaconda change
|
|
if (get_var("GRUBADD")) {
|
|
# unless GRUB was also set, we need to get to the kernel line now
|
|
get_kernel_line unless (get_var("GRUB"));
|
|
type_string " ".get_var("GRUBADD");
|
|
}
|
|
|
|
# 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") || get_var("GRUBADD")) {
|
|
get_kernel_line;
|
|
}
|
|
my $repourl = "";
|
|
|
|
# REPOSITORY_VARIATION should be set to repository URL without version and architecture
|
|
# appended (it will be appended automatically)
|
|
$repourl = get_var("REPOSITORY_VARIATION")."/".lc(get_var("VERSION"))."/Everything/".get_var("ARCH")."/os";
|
|
type_string " inst.repo=".$repourl;
|
|
}
|
|
|
|
# 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"))
|
|
{
|
|
# on lives, we have to explicitly launch anaconda
|
|
if (get_var('LIVE')) {
|
|
assert_and_click "live_start_anaconda_icon", '', 300;
|
|
}
|
|
my $language = get_var('LANGUAGE') || 'english';
|
|
# wait for anaconda to appear
|
|
assert_screen "anaconda_select_install_lang", 300;
|
|
# Select install language
|
|
assert_and_click "anaconda_select_install_lang_input";
|
|
type_string "${language}";
|
|
# Needle filtering in main.pm ensures we will only look for the
|
|
# appropriate language, here
|
|
assert_and_click "anaconda_select_install_lang_filtered";
|
|
assert_screen "anaconda_select_install_lang_selected", 3;
|
|
assert_and_click "anaconda_select_install_lang_continue";
|
|
|
|
if ( check_screen "anaconda_rawhide_accept_fate" ) {
|
|
assert_and_click "anaconda_rawhide_accept_fate";
|
|
}
|
|
|
|
# wait for Anaconda hub to appear
|
|
assert_screen "anaconda_main_hub", 900; #
|
|
}
|
|
}
|
|
|
|
|
|
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:
|