2015-08-05 06:23:59 +00:00
|
|
|
use base "anacondatest";
|
2015-02-04 12:02:54 +00:00
|
|
|
use strict;
|
|
|
|
use testapi;
|
|
|
|
|
|
|
|
sub run {
|
create fedora base class, factor out console login
Summary:
Root console in anaconda got broken by RHBZ #1222413 - no
shell on tty2. Decided to clean up console use in general as
part of fixing it.
This creates a class 'fedorabase' and has 'anacondalog' and
'fedoralog' both inherit from it. boot_to_login_screen is
moved there (as it seems appropriate) and it has a new
method, console_login, which basically handles 'get me a
shell on a console': if we're already at one it returns,
if not it'll type the user name and the password *if
necessary* (sometimes it's not) and return once it sees a
prompt. It takes a hash of named parameters for user,
password and 'check', which is whether it should die if it
fails to reach a console or not (some users don't want it
to).
anacondalog and fedoralog both get 'root_console' methods
which do something appropriate and then call
console_login; both have a hash of named parameters,
anacondalog's version only bothers with 'check', while
fedoralog's also accepts 'tty' to pick the tty to use.
This also adjusts all things which try to get to a console
prompt to use either root_console or console_login as
appropriate.
It also tweaks the needle tags a bit, drops some unneeded
needles, and adds a new 'user console prompt' needle; we
really just need two versions of the root prompt needle
and two of the user prompt needle (one for <F23, one for
F23+ - the console font changed in F23, and the @ character
at least doesn't match between the two). I think we still
need the <F23 case for upgrade tests, for now.
Test Plan:
Do a full test run and see that more tests
succeed. I've done a run on happyassassin with a hack to
workaround the SELinux issue for interactive installs,
and the results look good. I also fiddled about a bit to
test some different cases, like forcing a failure in a
live test to test post_fail_hook (and hence root_console)
in that scenario, and forcing failures after some console
commands had been run to check that it DTRT when we've
already reached a console, etc.
Reviewers: jskladan, garretraziel
Reviewed By: jskladan, garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D462
2015-07-22 18:24:40 +00:00
|
|
|
my $self = shift;
|
2015-02-04 12:02:54 +00:00
|
|
|
# Anaconda hub
|
|
|
|
assert_screen "anaconda_main_hub", 300; #
|
|
|
|
|
2015-02-19 15:55:29 +00:00
|
|
|
# Go into the Install Source spoke
|
2015-02-04 12:02:54 +00:00
|
|
|
assert_and_click "anaconda_main_hub_installation_source";
|
|
|
|
|
|
|
|
# select "http" on the network
|
|
|
|
assert_and_click "anaconda_install_source_on_the_network";
|
|
|
|
send_key "tab";
|
|
|
|
for (my $i=0; $i<4; $i++){
|
|
|
|
send_key "up";
|
|
|
|
}
|
|
|
|
assert_screen "anaconda_install_source_http_selected";
|
|
|
|
|
|
|
|
|
|
|
|
# insert the url
|
|
|
|
send_key "tab";
|
|
|
|
my $repourl = "";
|
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
|
|
|
my $fedora_release = $self->get_release;
|
2015-02-04 12:02:54 +00:00
|
|
|
|
2015-08-05 06:23:59 +00:00
|
|
|
# if either MIRRORLIST_GRAPHICAL or REPOSITORY_GRAPHICAL is set, type this into
|
|
|
|
# the repository url input
|
2015-02-04 12:02:54 +00:00
|
|
|
if (get_var("MIRRORLIST_GRAPHICAL")){
|
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 = "mirrors.fedoraproject.org/mirrorlist?repo=".$fedora_release."&arch=".get_var('ARCH');
|
2015-02-04 12:02:54 +00:00
|
|
|
type_string $repourl;
|
|
|
|
|
|
|
|
# select as mirror list
|
|
|
|
assert_and_click "anaconda_install_source_repo_select_mirrorlist";
|
|
|
|
}
|
|
|
|
elsif (get_var("REPOSITORY_GRAPHICAL")){
|
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_GRAPHICAL")."/".$fedora_release."/".get_var("ARCH")."/os";
|
2015-02-04 12:02:54 +00:00
|
|
|
type_string $repourl;
|
|
|
|
}
|
|
|
|
|
|
|
|
assert_and_click "anaconda_spoke_done";
|
|
|
|
|
|
|
|
# Anaconda hub
|
|
|
|
assert_screen "anaconda_main_hub", 300;
|
|
|
|
|
|
|
|
# check that the repo was used
|
create fedora base class, factor out console login
Summary:
Root console in anaconda got broken by RHBZ #1222413 - no
shell on tty2. Decided to clean up console use in general as
part of fixing it.
This creates a class 'fedorabase' and has 'anacondalog' and
'fedoralog' both inherit from it. boot_to_login_screen is
moved there (as it seems appropriate) and it has a new
method, console_login, which basically handles 'get me a
shell on a console': if we're already at one it returns,
if not it'll type the user name and the password *if
necessary* (sometimes it's not) and return once it sees a
prompt. It takes a hash of named parameters for user,
password and 'check', which is whether it should die if it
fails to reach a console or not (some users don't want it
to).
anacondalog and fedoralog both get 'root_console' methods
which do something appropriate and then call
console_login; both have a hash of named parameters,
anacondalog's version only bothers with 'check', while
fedoralog's also accepts 'tty' to pick the tty to use.
This also adjusts all things which try to get to a console
prompt to use either root_console or console_login as
appropriate.
It also tweaks the needle tags a bit, drops some unneeded
needles, and adds a new 'user console prompt' needle; we
really just need two versions of the root prompt needle
and two of the user prompt needle (one for <F23, one for
F23+ - the console font changed in F23, and the @ character
at least doesn't match between the two). I think we still
need the <F23 case for upgrade tests, for now.
Test Plan:
Do a full test run and see that more tests
succeed. I've done a run on happyassassin with a hack to
workaround the SELinux issue for interactive installs,
and the results look good. I also fiddled about a bit to
test some different cases, like forcing a failure in a
live test to test post_fail_hook (and hence root_console)
in that scenario, and forcing failures after some console
commands had been run to check that it DTRT when we've
already reached a console, etc.
Reviewers: jskladan, garretraziel
Reviewed By: jskladan, garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D462
2015-07-22 18:24:40 +00:00
|
|
|
$self->root_console;
|
2015-11-04 13:38:36 +00:00
|
|
|
validate_script_output "grep \"".$repourl."\" /tmp/packaging.log", sub { $_ =~ m/added repo: 'anaconda'/ };
|
2015-02-04 12:02:54 +00:00
|
|
|
send_key "ctrl-alt-f6";
|
|
|
|
|
|
|
|
# Anaconda hub
|
|
|
|
assert_screen "anaconda_main_hub", 30; #
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
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:
|