2015-08-05 06:23:59 +00:00
|
|
|
use base "anacondatest";
|
2015-01-26 14:58:07 +00:00
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
|
2015-09-15 09:04:01 +00:00
|
|
|
# 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";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-26 14:58:07 +00:00
|
|
|
sub run {
|
2016-01-28 05:40:07 +00:00
|
|
|
my $self = shift;
|
2015-01-26 14:58:07 +00:00
|
|
|
# Wait for bootloader to appear
|
2015-09-15 09:04:01 +00:00
|
|
|
if( get_var("UEFI")){
|
|
|
|
assert_screen "bootloader_uefi", 30;
|
|
|
|
} else {
|
|
|
|
assert_screen "bootloader", 30;
|
|
|
|
}
|
2015-01-26 14:58:07 +00:00
|
|
|
|
2015-03-18 21:28:03 +00:00
|
|
|
# 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";
|
2015-01-26 14:58:07 +00:00
|
|
|
|
2015-08-05 06:23:59 +00:00
|
|
|
# if variable GRUB is set, add its value into kernel line in grub
|
2015-02-04 13:05:20 +00:00
|
|
|
if( get_var("GRUB")){
|
2015-09-15 09:04:01 +00:00
|
|
|
get_kernel_line;
|
2015-02-04 13:05:20 +00:00
|
|
|
type_string " ".get_var("GRUB");
|
2015-02-04 13:45:37 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-08-05 06:23:59 +00:00
|
|
|
# if variable REPOSITORY_VARIATION is set, construct inst.repo url and add it to kernel line
|
2015-02-04 13:45:37 +00:00
|
|
|
if (get_var("REPOSITORY_VARIATION")){
|
|
|
|
unless (get_var("GRUB")){
|
2015-09-15 09:04:01 +00:00
|
|
|
get_kernel_line;
|
2015-02-04 13:45:37 +00:00
|
|
|
}
|
|
|
|
my $repourl = "";
|
|
|
|
|
2015-08-05 06:23:59 +00:00
|
|
|
# REPOSITORY_VARIATION should be set to repository URL without version and architecture
|
|
|
|
# appended (it will be appended automatically)
|
Pungi 4 conversion: handle Pungi-derived BUILD and FLAVOR
With the arrival of Pungi 4, the scheduler is no longer using
fedfind-provided BUILD and FLAVOR values, but ones derived from
Pungi properties. BUILD is now simply the Pungi compose_id.
FLAVOR is produced by joining the Pungi variant, type, and
format with '-' characters as the separators.
Pungi, unfortunately, does not treat 'Rawhide' as a release, it
synthesizes a release number for Rawhide composes and places
that in the compose ID. To cope with that, for now, the
scheduler will set RAWHIDE to '1' if the compose is a Rawhide
one. As we have to adapt all places where we parse the release
in any case, this commit consolidates them into a fedorabase
subroutine.
For the one place where we also used to parse the 'milestone'
from fedfind, there is a placeholder get_milestone subroutine
which currently returns an empty string, as I don't yet have a
good handle on how to draw the kinds of distinctions fedfind
mapped to 'milestone' from Pungi metadata.
2016-01-28 04:48:04 +00:00
|
|
|
$repourl = get_var("REPOSITORY_VARIATION")."/".$self->get_release."/".get_var("ARCH")."/os";
|
2015-02-04 13:45:37 +00:00
|
|
|
type_string " inst.repo=".$repourl;
|
2015-01-27 12:35:27 +00:00
|
|
|
}
|
|
|
|
|
2015-08-05 06:23:59 +00:00
|
|
|
# now we are on the correct "boot" menu item
|
2015-09-15 09:04:01 +00:00
|
|
|
# hit Ctrl+x for the case when the uefi kernel line was edited
|
|
|
|
send_key "ctrl-x";
|
|
|
|
# Return starts boot in all other cases
|
2015-02-04 13:05:20 +00:00
|
|
|
send_key "ret";
|
|
|
|
|
|
|
|
unless (get_var("KICKSTART"))
|
|
|
|
{
|
2015-03-18 21:28:03 +00:00
|
|
|
# on lives, we have to explicitly launch anaconda
|
|
|
|
if (get_var('LIVE')) {
|
2015-09-14 06:52:37 +00:00
|
|
|
assert_and_click "live_start_anaconda_icon", '', 300;
|
2015-03-18 21:28:03 +00:00
|
|
|
}
|
2015-09-15 01:08:58 +00:00
|
|
|
my $language = get_var('LANGUAGE') || 'english';
|
2015-07-29 06:16:05 +00:00
|
|
|
# wait for anaconda to appear
|
|
|
|
assert_screen "anaconda_select_install_lang", 300;
|
2015-01-27 12:35:27 +00:00
|
|
|
# Select install language
|
2015-02-20 09:30:23 +00:00
|
|
|
assert_and_click "anaconda_select_install_lang_input";
|
2015-09-15 01:08:58 +00:00
|
|
|
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;
|
2015-01-27 12:35:27 +00:00
|
|
|
assert_and_click "anaconda_select_install_lang_continue";
|
|
|
|
|
2015-02-19 14:40:33 +00:00
|
|
|
if ( check_screen "anaconda_rawhide_accept_fate" ) {
|
2015-02-04 12:02:54 +00:00
|
|
|
assert_and_click "anaconda_rawhide_accept_fate";
|
|
|
|
}
|
2015-01-30 09:35:13 +00:00
|
|
|
|
2015-08-05 06:23:59 +00:00
|
|
|
# wait for Anaconda hub to appear
|
2015-02-25 17:20:41 +00:00
|
|
|
assert_screen "anaconda_main_hub", 900; #
|
2015-01-27 12:35:27 +00:00
|
|
|
}
|
2015-01-26 14:58:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
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'
|
2015-01-28 12:42:34 +00:00
|
|
|
return { fatal => 1 };
|
2015-01-26 14:58:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
1;
|
|
|
|
|
|
|
|
# vim: set sw=4 et:
|