2015-08-05 06:23:59 +00:00
|
|
|
use base "anacondatest";
|
2015-01-26 14:58:07 +00:00
|
|
|
use strict;
|
2019-08-16 00:51:57 +00:00
|
|
|
use lockapi;
|
2015-01-26 14:58:07 +00:00
|
|
|
use testapi;
|
2017-01-18 07:15:44 +00:00
|
|
|
use utils;
|
2019-11-05 20:13:33 +00:00
|
|
|
use tapnet;
|
2017-01-18 07:15:44 +00:00
|
|
|
use anaconda;
|
2015-01-26 14:58:07 +00:00
|
|
|
|
|
|
|
sub run {
|
2016-05-04 18:53:11 +00:00
|
|
|
my $self = shift;
|
2019-08-16 00:51:57 +00:00
|
|
|
if (get_var("PXEBOOT")) {
|
|
|
|
# PXE tests have DELAYED_START set, so VM is not running yet,
|
|
|
|
# because if we boot immediately PXE will time out waiting for
|
|
|
|
# DHCP before the support server is ready. So we wait here for
|
|
|
|
# support server to be ready, then go ahead and start the VM
|
|
|
|
mutex_lock "support_ready";
|
|
|
|
mutex_unlock "support_ready";
|
|
|
|
resume_vm;
|
|
|
|
}
|
|
|
|
|
add a cockpit realmd FreeIPA join test
Summary:
This requires a few other changes:
* turn clone_host_resolv into clone_host_file, letting you clone
any given host file (cloning /etc/hosts seems to make both
server deployment and client enrolment faster/more reliable)
* allow loading of multiple POSTINSTALL tests (so we can share
the freeipa_client_postinstall test). Note this is compatible,
existing uses will work fine
* move initial password change for the IPA test users into the
server deployment test (so the client tests don't conflict over
doing that)
* add GRUB_POSTINSTALL, for specifying boot parameters for boot of
the installed system, and make it work by tweaking _console_wait
_login (doesn't work for _graphical_wait_login yet, as I didn't
need that)
* make the static networking config for tap tests into a library
function so the tests can share it
* handle ABRT problem dirs showing up in /var/spool/abrt as well
as /var/tmp/abrt (because the enrol attempt hits #1330766 and
the crash report shows up in /var/spool/abrt, don't ask me why
the difference, I just work here)
* specify the DNS servers from the worker host's resolv.conf as
the forwarders for the FreeIPA server when deploying it; if we
don't do this, rolekit defaults to using the root servers as
forwarders(!) and thus we get the public, not phx2-appropriate,
results for e.g. mirrors.fedoraproject.org, some of which the
workers can't reach, so PackageKit package install always fails
(boy, was it fun figuring THAT mess out)
Even after all that, the test still doesn't actually pass, but
I'm reasonably confident this is because it's hitting actual bugs,
not because it's broken. It runs into #1330766 nearly every time
(I think I saw *one* time the enrolment actually succeeded), and
seems to run into a subsequent bug I hadn't seen before when
trying to work around that by trying the join again (see
https://bugzilla.redhat.com/show_bug.cgi?id=1330766#c37 ).
Test Plan:
Run the test, see what happens. If you're really lucky,
it'll actually pass. But you'll probably run into #1330766#c37,
I'm mostly posting for comment. You'll need a tap-capable openQA
instance to test this.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D880
2016-06-07 20:00:39 +00:00
|
|
|
# construct the kernel params. the trick here is to wind up with
|
|
|
|
# spaced params if GRUB or GRUBADD is set, and just spaces if not,
|
2016-05-04 18:53:11 +00:00
|
|
|
# then check if we got all spaces. We wind up with a harmless
|
|
|
|
# extra space if GRUBADD is set but GRUB is not.
|
add a cockpit realmd FreeIPA join test
Summary:
This requires a few other changes:
* turn clone_host_resolv into clone_host_file, letting you clone
any given host file (cloning /etc/hosts seems to make both
server deployment and client enrolment faster/more reliable)
* allow loading of multiple POSTINSTALL tests (so we can share
the freeipa_client_postinstall test). Note this is compatible,
existing uses will work fine
* move initial password change for the IPA test users into the
server deployment test (so the client tests don't conflict over
doing that)
* add GRUB_POSTINSTALL, for specifying boot parameters for boot of
the installed system, and make it work by tweaking _console_wait
_login (doesn't work for _graphical_wait_login yet, as I didn't
need that)
* make the static networking config for tap tests into a library
function so the tests can share it
* handle ABRT problem dirs showing up in /var/spool/abrt as well
as /var/tmp/abrt (because the enrol attempt hits #1330766 and
the crash report shows up in /var/spool/abrt, don't ask me why
the difference, I just work here)
* specify the DNS servers from the worker host's resolv.conf as
the forwarders for the FreeIPA server when deploying it; if we
don't do this, rolekit defaults to using the root servers as
forwarders(!) and thus we get the public, not phx2-appropriate,
results for e.g. mirrors.fedoraproject.org, some of which the
workers can't reach, so PackageKit package install always fails
(boy, was it fun figuring THAT mess out)
Even after all that, the test still doesn't actually pass, but
I'm reasonably confident this is because it's hitting actual bugs,
not because it's broken. It runs into #1330766 nearly every time
(I think I saw *one* time the enrolment actually succeeded), and
seems to run into a subsequent bug I hadn't seen before when
trying to work around that by trying the join again (see
https://bugzilla.redhat.com/show_bug.cgi?id=1330766#c37 ).
Test Plan:
Run the test, see what happens. If you're really lucky,
it'll actually pass. But you'll probably run into #1330766#c37,
I'm mostly posting for comment. You'll need a tap-capable openQA
instance to test this.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D880
2016-06-07 20:00:39 +00:00
|
|
|
my $params = "";
|
|
|
|
$params .= get_var("GRUB", "") . " ";
|
|
|
|
$params .= get_var("GRUBADD", "") . " ";
|
2016-05-04 18:53:11 +00:00
|
|
|
# Construct inst.repo arg for REPOSITORY_VARIATION
|
|
|
|
my $repourl = get_var("REPOSITORY_VARIATION");
|
|
|
|
if ($repourl) {
|
2017-01-18 07:15:44 +00:00
|
|
|
$params .= "inst.repo=" . get_full_repo($repourl) . " ";
|
2015-02-04 13:45:37 +00:00
|
|
|
}
|
2019-01-25 13:41:32 +00:00
|
|
|
# Construct inst.addrepo arg for ADD_REPOSITORY_VARIATION
|
|
|
|
my $repourl = get_var("ADD_REPOSITORY_VARIATION");
|
|
|
|
if ($repourl) {
|
|
|
|
$params .= "inst.addrepo=addrepo," . get_full_repo($repourl) . " ";
|
|
|
|
}
|
2018-06-25 00:09:19 +00:00
|
|
|
if (get_var("ANACONDA_TEXT")) {
|
|
|
|
$params .= "inst.text ";
|
2019-11-06 12:55:27 +00:00
|
|
|
# we need this on aarch64 till #1594402 is resolved,
|
|
|
|
# and we also can utilize this if we want to run this
|
|
|
|
# over the serial console.
|
2019-03-29 22:18:17 +00:00
|
|
|
$params .= "console=tty0 " if (get_var("ARCH") eq "aarch64");
|
2019-11-06 12:55:27 +00:00
|
|
|
# when the text installation should run over the serial console,
|
|
|
|
# we have to add some more parametres to grub. Although, the written
|
|
|
|
# test case recommends using ttyS0, OpenQA only uses that console for
|
|
|
|
# displaying information but does not accept key strokes. Therefore,
|
|
|
|
# let us use a real virtio console here.
|
|
|
|
if (get_var("SERIAL_CONSOLE")) {
|
2019-11-20 16:39:28 +00:00
|
|
|
# this is icky. on ppc64 (OFW), virtio-console is hvc1 and
|
|
|
|
# virtio-console1 is hvc2, because the 'standard' serial
|
2019-11-06 12:55:27 +00:00
|
|
|
# terminal is hvc0 (the firmware does this or something).
|
|
|
|
# On other arches, the 'standard' serial terminal is ttyS0,
|
2019-11-20 16:39:28 +00:00
|
|
|
# so virtio-console becomes hvc0 and virtio-console1 is
|
2019-11-06 12:55:27 +00:00
|
|
|
# hvc1. We want anaconda to wind up on the console that is
|
2019-11-20 16:39:28 +00:00
|
|
|
# virtio-console1 in both cases
|
2019-11-06 12:55:27 +00:00
|
|
|
if (get_var("OFW")) {
|
|
|
|
$params .= "console=hvc2 ";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$params .= "console=hvc1 ";
|
|
|
|
}
|
|
|
|
}
|
2018-06-25 00:09:19 +00:00
|
|
|
}
|
2017-01-16 17:30:14 +00:00
|
|
|
# inst.debug enables memory use tracking
|
|
|
|
$params .= "debug" if get_var("MEMCHECK");
|
add a cockpit realmd FreeIPA join test
Summary:
This requires a few other changes:
* turn clone_host_resolv into clone_host_file, letting you clone
any given host file (cloning /etc/hosts seems to make both
server deployment and client enrolment faster/more reliable)
* allow loading of multiple POSTINSTALL tests (so we can share
the freeipa_client_postinstall test). Note this is compatible,
existing uses will work fine
* move initial password change for the IPA test users into the
server deployment test (so the client tests don't conflict over
doing that)
* add GRUB_POSTINSTALL, for specifying boot parameters for boot of
the installed system, and make it work by tweaking _console_wait
_login (doesn't work for _graphical_wait_login yet, as I didn't
need that)
* make the static networking config for tap tests into a library
function so the tests can share it
* handle ABRT problem dirs showing up in /var/spool/abrt as well
as /var/tmp/abrt (because the enrol attempt hits #1330766 and
the crash report shows up in /var/spool/abrt, don't ask me why
the difference, I just work here)
* specify the DNS servers from the worker host's resolv.conf as
the forwarders for the FreeIPA server when deploying it; if we
don't do this, rolekit defaults to using the root servers as
forwarders(!) and thus we get the public, not phx2-appropriate,
results for e.g. mirrors.fedoraproject.org, some of which the
workers can't reach, so PackageKit package install always fails
(boy, was it fun figuring THAT mess out)
Even after all that, the test still doesn't actually pass, but
I'm reasonably confident this is because it's hitting actual bugs,
not because it's broken. It runs into #1330766 nearly every time
(I think I saw *one* time the enrolment actually succeeded), and
seems to run into a subsequent bug I hadn't seen before when
trying to work around that by trying the join again (see
https://bugzilla.redhat.com/show_bug.cgi?id=1330766#c37 ).
Test Plan:
Run the test, see what happens. If you're really lucky,
it'll actually pass. But you'll probably run into #1330766#c37,
I'm mostly posting for comment. You'll need a tap-capable openQA
instance to test this.
Reviewers: jskladan, garretraziel
Reviewed By: garretraziel
Subscribers: tflink
Differential Revision: https://phab.qadevel.cloud.fedoraproject.org/D880
2016-06-07 20:00:39 +00:00
|
|
|
# ternary: set $params to "" if it contains only spaces
|
|
|
|
$params = $params =~ /^\s+$/ ? "" : $params;
|
2015-02-04 13:45:37 +00:00
|
|
|
|
2016-05-04 18:53:11 +00:00
|
|
|
# set mutex wait if necessary
|
|
|
|
my $mutex = get_var("INSTALL_UNLOCK");
|
2015-01-27 12:35:27 +00:00
|
|
|
|
2019-08-16 00:51:57 +00:00
|
|
|
# we need a longer timeout for the PXE boot test
|
|
|
|
my $timeout = 30;
|
|
|
|
$timeout = 120 if (get_var("PXEBOOT"));
|
|
|
|
|
2019-11-05 20:13:33 +00:00
|
|
|
# call do_bootloader with postinstall=0, the params, and the mutex,
|
|
|
|
# unless we're a VNC install client (no bootloader there)
|
|
|
|
unless (get_var("VNC_CLIENT")) {
|
|
|
|
do_bootloader(postinstall=>0, params=>$params, mutex=>$mutex, timeout=>$timeout);
|
|
|
|
}
|
2015-02-04 13:05:20 +00:00
|
|
|
|
2019-05-16 13:01:52 +00:00
|
|
|
# Read variables for identification tests (see further).
|
|
|
|
my $identification = get_var('IDENTIFICATION');
|
2016-05-04 18:53:11 +00:00
|
|
|
# proceed to installer
|
2019-11-05 20:13:33 +00:00
|
|
|
if (get_var("KICKSTART") || get_var("VNC_SERVER")) {
|
2016-09-19 23:50:42 +00:00
|
|
|
# wait for the bootloader *here* - in a test that inherits from
|
|
|
|
# anacondatest - so that if something goes wrong during install,
|
2019-10-07 20:24:52 +00:00
|
|
|
# we get anaconda logs. sleep a bit first so we don't get a
|
|
|
|
# match for the installer bootloader if it hangs around for a
|
|
|
|
# while after do_bootloader finishes (in PXE case it does)
|
|
|
|
sleep 20;
|
2018-12-17 22:10:58 +00:00
|
|
|
assert_screen "bootloader", 1800;
|
2016-09-19 23:50:42 +00:00
|
|
|
}
|
|
|
|
else {
|
2016-09-07 08:34:54 +00:00
|
|
|
if (get_var("ANACONDA_TEXT")) {
|
|
|
|
# select that we don't want to start VNC; we want to run in text mode
|
2019-11-06 12:55:27 +00:00
|
|
|
if (get_var("SERIAL_CONSOLE")) {
|
2019-11-20 16:39:28 +00:00
|
|
|
# we direct the installer to virtio-console1, and use
|
|
|
|
# virtio-console as a root console
|
|
|
|
select_console('virtio-console1');
|
2019-11-06 12:55:27 +00:00
|
|
|
unless (wait_serial "Use text mode", timeout=>120) { die "Anaconda has not started."; }
|
|
|
|
type_string "2\n";
|
|
|
|
unless (wait_serial "Installation") { die "Text version of Anaconda has not started."; }
|
|
|
|
}
|
|
|
|
else {
|
2021-11-11 00:47:10 +00:00
|
|
|
if (get_var("DISTRI") eq "rocky") {
|
|
|
|
# Rocky doesn't have network enabled at boot so we are not prompted
|
|
|
|
# for VNC...
|
|
|
|
# wait for text version of Anaconda main hub
|
|
|
|
assert_screen "anaconda_main_hub_text", 300;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
# Fedora has a use text mode menu here
|
|
|
|
assert_screen "anaconda_use_text_mode", 300;
|
|
|
|
type_string "2\n";
|
|
|
|
# wait for text version of Anaconda main hub
|
|
|
|
assert_screen "anaconda_main_hub_text", 300;
|
|
|
|
}
|
2019-11-06 12:55:27 +00:00
|
|
|
}
|
2019-05-16 13:01:52 +00:00
|
|
|
}
|
|
|
|
else {
|
2016-09-07 08:34:54 +00:00
|
|
|
# on lives, we have to explicitly launch anaconda
|
|
|
|
if (get_var('LIVE')) {
|
2021-03-04 23:24:54 +00:00
|
|
|
assert_screen ["live_start_anaconda_icon", "apps_menu_button_active"], 300;
|
|
|
|
send_key "alt-f1" if match_has_tag "apps_menu_button_active";
|
2021-06-22 00:10:35 +00:00
|
|
|
# for KDE we need to double-click after kde-settings-34.6-1,
|
2021-06-23 17:50:56 +00:00
|
|
|
# which is stable now.
|
|
|
|
# FIXME: when F33 goes EOL, make the condition just "if kde"
|
2021-06-22 00:10:35 +00:00
|
|
|
my $relnum = get_release_number;
|
|
|
|
my $dclick = 0;
|
2021-06-23 17:50:56 +00:00
|
|
|
$dclick = 1 if (get_var("DESKTOP") eq "kde" && $relnum > 33);
|
2021-06-22 00:10:35 +00:00
|
|
|
assert_and_click("live_start_anaconda_icon", dclick=>$dclick);
|
2019-12-06 17:22:02 +00:00
|
|
|
unless (check_screen "anaconda_select_install_lang", 180) {
|
|
|
|
# click it again - on KDE since 2019-10 or so it seems
|
|
|
|
# like the first attempt sometimes just doesn't work
|
2021-06-22 00:10:35 +00:00
|
|
|
assert_and_click("live_start_anaconda_icon", dclick=>$dclick, timeout=>300);
|
2019-12-06 17:22:02 +00:00
|
|
|
}
|
2016-09-07 08:34:54 +00:00
|
|
|
}
|
|
|
|
my $language = get_var('LANGUAGE') || 'english';
|
2018-04-25 22:01:43 +00:00
|
|
|
# wait for anaconda to appear; we click to work around
|
|
|
|
# RHBZ #1566066 if it happens
|
2020-01-10 22:22:20 +00:00
|
|
|
assert_and_click("anaconda_select_install_lang", timeout=>300);
|
2021-05-03 15:37:46 +00:00
|
|
|
|
2016-09-07 08:34:54 +00:00
|
|
|
# Select install language
|
2016-09-12 17:24:30 +00:00
|
|
|
wait_screen_change { assert_and_click "anaconda_select_install_lang_input"; };
|
|
|
|
type_safely $language;
|
2016-09-07 08:34:54 +00:00
|
|
|
# Needle filtering in main.pm ensures we will only look for the
|
|
|
|
# appropriate language, here
|
|
|
|
assert_and_click "anaconda_select_install_lang_filtered";
|
2019-03-05 01:32:25 +00:00
|
|
|
assert_screen "anaconda_select_install_lang_selected", 10;
|
2021-05-03 15:37:46 +00:00
|
|
|
# Check for Help on the Language selection pane, if HELPCHECK is
|
|
|
|
# required
|
|
|
|
if (get_var('HELPCHECK')) {
|
|
|
|
check_help_on_pane("language_selection");
|
|
|
|
}
|
|
|
|
|
2016-09-07 08:34:54 +00:00
|
|
|
assert_and_click "anaconda_select_install_lang_continue";
|
2015-01-30 09:35:13 +00:00
|
|
|
|
2019-01-14 23:22:01 +00:00
|
|
|
# wait 180 secs for hub or Rawhide warning dialog to appear
|
|
|
|
# (per https://bugzilla.redhat.com/show_bug.cgi?id=1666112
|
|
|
|
# the nag screen can take a LONG time to appear sometimes).
|
2018-05-23 23:35:08 +00:00
|
|
|
# If the hub appears, return - we're done now. If Rawhide
|
|
|
|
# warning dialog appears, accept it.
|
2019-01-14 23:22:01 +00:00
|
|
|
if (check_screen ["anaconda_rawhide_accept_fate", "anaconda_main_hub"], 180) {
|
2018-05-23 23:35:08 +00:00
|
|
|
if (match_has_tag("anaconda_rawhide_accept_fate")) {
|
|
|
|
assert_and_click "anaconda_rawhide_accept_fate";
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
# this is when the hub appeared already, we're done
|
|
|
|
return;
|
|
|
|
}
|
2016-09-07 08:34:54 +00:00
|
|
|
}
|
2019-05-16 13:01:52 +00:00
|
|
|
|
|
|
|
# If we want to test self identification, in the test suite
|
|
|
|
# we set "identification" to "true".
|
|
|
|
# Here, we will watch for the graphical elements in Anaconda main hub.
|
|
|
|
my $branched = get_var('VERSION');
|
|
|
|
if ($identification eq 'true' or $branched ne "Rawhide") {
|
|
|
|
check_left_bar(); # See utils.pm
|
|
|
|
check_prerelease();
|
|
|
|
check_version();
|
|
|
|
}
|
2018-05-23 23:35:08 +00:00
|
|
|
# This is where we get to if we accepted fate above, *or*
|
|
|
|
# didn't match anything: if the Rawhide warning didn't
|
|
|
|
# show by now it never will, so we'll just wait for the
|
|
|
|
# hub to show up.
|
2016-09-07 08:34:54 +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 {
|
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:
|