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-03-29 22:18:17 +00:00
|
|
|
# we need this on aarch64 till #1594402 is resolved
|
|
|
|
$params .= "console=tty0 " if (get_var("ARCH") eq "aarch64");
|
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
|
|
|
|
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-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')) {
|
2019-05-28 16:41:33 +00:00
|
|
|
_assert_and_click("live_start_anaconda_icon", timeout=>300);
|
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
|
2019-05-28 16:41:33 +00:00
|
|
|
_assert_and_click("anaconda_select_install_lang", timeout=>300);
|
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;
|
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:
|