diff --git a/lib/anaconda.pm b/lib/anaconda.pm index 96537903..faac18ca 100644 --- a/lib/anaconda.pm +++ b/lib/anaconda.pm @@ -368,9 +368,7 @@ sub get_full_repo { if ($repourl !~ m/^(nfs|hd:)/) { # Everything variant doesn't exist for modular composes atm, # only Server - my $variant = 'Everything'; - $variant = 'Server' if (get_var("MODULAR")); - $repourl .= "/${variant}/".get_var("ARCH")."/os"; + $repourl .= "/".get_var("ARCH")."/os"; } return $repourl; } diff --git a/lib/utils.pm b/lib/utils.pm index 397d253a..95be62ab 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -8,7 +8,7 @@ use Exporter; use feature "switch"; use lockapi; use testapi; -our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type repo_setup setup_workaround_repo cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut lo_dismiss_tip disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number get_code_name check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log click_unwanted_notifications repos_mirrorlist register_application get_registered_applications solidify_wallpaper/; +our @EXPORT = qw/run_with_error_check type_safely type_very_safely desktop_vt boot_to_login_screen console_login console_switch_layout desktop_switch_layout console_loadkeys_us do_bootloader boot_decrypt check_release menu_launch_type repo_setup setup_workaround_repo cleanup_workaround_repo console_initial_setup handle_welcome_screen gnome_initial_setup anaconda_create_user check_desktop download_modularity_tests quit_firefox advisory_get_installed_packages advisory_check_nonmatching_packages start_with_launcher quit_with_shortcut lo_dismiss_tip disable_firefox_studies select_rescue_mode copy_devcdrom_as_isofile get_release_number get_version_major get_code_name check_left_bar check_top_bar check_prerelease check_version spell_version_number _assert_and_click is_branched rec_log click_unwanted_notifications repos_mirrorlist register_application get_registered_applications solidify_wallpaper/; # We introduce this global variable to hold the list of applications that have # registered during the apps_startstop_test when they have sucessfully run. @@ -63,12 +63,18 @@ sub get_release_number { return $version } +sub get_version_major { + my $version = get_var('VERSION'); + my $version_major = substr($version, 0, index($version, q/./)); + return $version_major +} + sub get_code_name { my $code_name = 'Green Obsidian'; my $version = get_var('VERSION'); - my $ver_major = substr($version, 0, index($version, q/./)); + my $version_major = get_version_major; - given($ver_major){ + given($version_major){ when ('9') { $code_name = 'Blue Onyx'; } when ('10') { $code_name = 'Smoky Quartz'; } when ('11') { $code_name = 'Lavender Calcite'; } @@ -605,7 +611,8 @@ sub _repo_setup_updates { assert_script_run 'printf "[advisory]\nname=Advisory repo\nbaseurl=file:///opt/update_repo\nenabled=1\nmetadata_expire=3600\ngpgcheck=0" > /etc/yum.repos.d/advisory.repo'; # run an update now (except for upgrade tests) my $relnum = get_release_number; - if ($relnum > 33) { + my $version_major = get_version_major; + if (($relnum > 33) || ($version_major > 8)) { # FIXME workaround https://bugzilla.redhat.com/show_bug.cgi?id=1931034 # drop after https://github.com/systemd/systemd/pull/18915 is merged # and stable @@ -953,7 +960,8 @@ sub start_with_launcher { # but only after we hit 'down' twice to get into it. # On F32 and earlier, it just scrolls vertically my $relnum = get_release_number; - if ($relnum > 32) { + my $version_major = get_version_major; + if (($relnum > 32) || ($version_major > 8)) { send_key 'down'; send_key 'down'; send_key_until_needlematch($launcher, 'right', 5, 6); diff --git a/main.pm b/main.pm index 52a7d43e..b8470550 100644 --- a/main.pm +++ b/main.pm @@ -249,12 +249,19 @@ sub _load_early_postinstall_tests { # For now, there's no possibility to get a graphical desktop on # Modular composes, so short-circuit here for those - if (get_var("MODULAR")) { + # Rocky has no such thing as MODULAR composes and we make use of PACKAGESET + # to select different Environments from the boot and/or DVD ISOs. + # DO NOT specify DESKTOP for minimal, server-product or virtualization-host + my $package_set = get_var("PACKAGE_SET"); + if (!get_var("DESKTOP") || get_var("DESKTOP") eq "false" || + $package_set eq "minimal" || $package_set eq "server" || + $package_set eq "virtualization-host") { _load_instance("tests/_console_wait_login", $instance); return; } - # Appropriate login method for install type + # Explicitly setting DESKTOP="kde" or DESKTOP="gnome" should ALWAYS trigger + # graphical login... if (get_var("DESKTOP")) { _load_instance("tests/_graphical_wait_login", $instance); } @@ -284,6 +291,11 @@ sub load_postinstall_tests() { # load the early tests _load_early_postinstall_tests(); + ## enable staging repos if requested + #if (get_var("DNF_CONTENTDIR")) { + # autotest::loadtest "tests/_staging_repos_enable.pm"; + #} + # do standard post-install static network config if the var is set # and this is not an upgrade test (this is done elsewhere in the # upgrade workflow) diff --git a/needles/rocky-getting-started-tour_close_button-20220705.json b/needles/rocky-getting-started-tour_close_button-20220705.json new file mode 100644 index 00000000..23004260 --- /dev/null +++ b/needles/rocky-getting-started-tour_close_button-20220705.json @@ -0,0 +1,30 @@ +{ + "area": [ + { + "height": 26, + "ypos": 41, + "width": 51, + "click_point": { + "xpos": 25.5, + "ypos": 13 + }, + "type": "match", + "xpos": 946 + }, + { + "xpos": 135, + "ypos": 6, + "width": 64, + "height": 23, + "type": "match" + } + ], + "properties": [], + "tags": [ + "DESKTOP-gnome", + "ENV-DISTRI-rocky", + "LANGUAGE-english", + "close_button", + "getting_started" + ] +} diff --git a/needles/rocky-getting-started-tour_close_button-20220705.png b/needles/rocky-getting-started-tour_close_button-20220705.png new file mode 100644 index 00000000..1c841038 Binary files /dev/null and b/needles/rocky-getting-started-tour_close_button-20220705.png differ diff --git a/needles/rocky-getting-started-tour_next_button-20220705.json b/needles/rocky-getting-started-tour_next_button-20220705.json new file mode 100644 index 00000000..3cc627d1 --- /dev/null +++ b/needles/rocky-getting-started-tour_next_button-20220705.json @@ -0,0 +1,30 @@ +{ + "area": [ + { + "width": 51, + "height": 26, + "ypos": 41, + "xpos": 946, + "type": "match", + "click_point": { + "xpos": 25.5, + "ypos": 13 + } + }, + { + "xpos": 135, + "type": "match", + "width": 64, + "height": 23, + "ypos": 6 + } + ], + "properties": [], + "tags": [ + "DESKTOP-gnome", + "ENV-DISTRI-rocky", + "LANGUAGE-english", + "next_button", + "getting_started" + ] +} diff --git a/needles/rocky-getting-started-tour_next_button-20220705.png b/needles/rocky-getting-started-tour_next_button-20220705.png new file mode 100644 index 00000000..ac0780ac Binary files /dev/null and b/needles/rocky-getting-started-tour_next_button-20220705.png differ diff --git a/needles/rocky-getting-started-tour_start_button-20220705.json b/needles/rocky-getting-started-tour_start_button-20220705.json new file mode 100644 index 00000000..a165ba59 --- /dev/null +++ b/needles/rocky-getting-started-tour_start_button-20220705.json @@ -0,0 +1,30 @@ +{ + "area": [ + { + "width": 51, + "ypos": 41, + "height": 26, + "xpos": 946, + "click_point": { + "xpos": 25.5, + "ypos": 13 + }, + "type": "match" + }, + { + "xpos": 135, + "type": "match", + "width": 64, + "ypos": 6, + "height": 23 + } + ], + "properties": [], + "tags": [ + "DESKTOP-gnome", + "ENV-DISTRI-rocky", + "LANGUAGE-english", + "start_button", + "getting_started" + ] +} diff --git a/needles/rocky-getting-started-tour_start_button-20220705.png b/needles/rocky-getting-started-tour_start_button-20220705.png new file mode 100644 index 00000000..7b0bc0f3 Binary files /dev/null and b/needles/rocky-getting-started-tour_start_button-20220705.png differ diff --git a/needles/rocky-getting_started_tour-20220705.json b/needles/rocky-getting_started_tour-20220705.json new file mode 100644 index 00000000..2b6c69f5 --- /dev/null +++ b/needles/rocky-getting_started_tour-20220705.json @@ -0,0 +1,18 @@ +{ + "area": [ + { + "xpos": 328, + "ypos": 490, + "width": 367, + "height": 65, + "type": "match" + } + ], + "properties": [], + "tags": [ + "DESKTOP-gnome", + "ENV-DISTRI-rocky", + "LANGUAGE-english", + "getting_started" + ] +} diff --git a/needles/rocky-getting_started_tour-20220705.png b/needles/rocky-getting_started_tour-20220705.png new file mode 100644 index 00000000..c902f456 Binary files /dev/null and b/needles/rocky-getting_started_tour-20220705.png differ diff --git a/templates.fif.json b/templates.fif.json index 1d0d90c8..a517392f 100644 --- a/templates.fif.json +++ b/templates.fif.json @@ -494,6 +494,7 @@ "rocky-dvd-iso-x86_64-*-64bit": 10 }, "settings": { + "DESKTOP": "gnome", "PACKAGE_SET": "default", "POSTINSTALL": "_collect_data", "STORE_HDD_1": "disk_%FLAVOR%_%MACHINE%.qcow2" @@ -623,83 +624,47 @@ }, "install_package_set_minimal": { "profiles": { - "rocky-boot-iso-x86_64-*-64bit": 10, - "rocky-boot-iso-x86_64-*-uefi": 11, - "rocky-dvd-iso-x86_64-*-64bit": 11, - "rocky-dvd-iso-x86_64-*-uefi": 11, - "rocky-minimal-iso-x86_64-*-64bit": 10, - "rocky-universal-aarch64-*-aarch64": 30, - "rocky-universal-x86_64-*-64bit": 30, "rocky-package-set-x86_64-*-64bit": 30 }, "settings": { - "PACKAGE_SET": "minimal", - "POSTINSTALL": "_console_login" + "DESKTOP": "false", + "PACKAGE_SET": "minimal" } }, "install_package_set_server": { "profiles": { - "rocky-boot-iso-x86_64-*-64bit": 10, - "rocky-boot-iso-x86_64-*-uefi": 11, - "rocky-dvd-iso-x86_64-*-64bit": 11, - "rocky-dvd-iso-x86_64-*-uefi": 11, - "rocky-minimal-iso-x86_64-*-64bit": 10, - "rocky-universal-aarch64-*-aarch64": 30, "rocky-package-set-x86_64-*-64bit": 30 }, "settings": { - "PACKAGE_SET": "server", - "POSTINSTALL": "_console_login" + "DESKTOP": "false", + "PACKAGE_SET": "server" } }, "install_package_set_graphical-server": { "profiles": { - "rocky-boot-iso-x86_64-*-64bit": 10, - "rocky-boot-iso-x86_64-*-uefi": 11, - "rocky-dvd-iso-x86_64-*-64bit": 11, - "rocky-dvd-iso-x86_64-*-uefi": 11, - "rocky-universal-aarch64-*-aarch64": 30, "rocky-package-set-x86_64-*-64bit": 30 }, "settings": { "DESKTOP": "gnome", - "ENCRYPT_PASSWORD": "weakpassword", - "PACKAGE_SET": "graphical-server", - "POSTINSTALL": "_console_login", - "ROOT_PASSWORD": "weakpassword", - "USER_LOGIN": "qwerty" + "PACKAGE_SET": "graphical-server" } }, "install_package_set_workstation": { "profiles": { - "rocky-boot-iso-x86_64-*-64bit": 10, - "rocky-boot-iso-x86_64-*-uefi": 11, - "rocky-dvd-iso-x86_64-*-64bit": 11, - "rocky-dvd-iso-x86_64-*-uefi": 11, - "rocky-universal-aarch64-*-aarch64": 30, "rocky-package-set-x86_64-*-64bit": 30 }, "settings": { "DESKTOP": "gnome", - "ENCRYPT_PASSWORD": "weakpassword", - "PACKAGE_SET": "workstation", - "POSTINSTALL": "_console_login", - "ROOT_PASSWORD": "weakpassword", - "USER_LOGIN": "qwerty" + "PACKAGE_SET": "workstation" } }, "install_package_set_virtualization-host": { "profiles": { - "rocky-boot-iso-x86_64-*-64bit": 10, - "rocky-boot-iso-x86_64-*-uefi": 11, - "rocky-dvd-iso-x86_64-*-64bit": 11, - "rocky-dvd-iso-x86_64-*-uefi": 11, - "rocky-universal-aarch64-*-aarch64": 30, "rocky-package-set-x86_64-*-64bit": 30 }, "settings": { - "PACKAGE_SET": "virtualization-host", - "POSTINSTALL": "_console_login" + "DESKTOP": "false", + "PACKAGE_SET": "virtualization-host" } }, "install_pxeboot": { diff --git a/tests/_boot_to_anaconda.pm b/tests/_boot_to_anaconda.pm index 778dd9fe..9aa372d2 100644 --- a/tests/_boot_to_anaconda.pm +++ b/tests/_boot_to_anaconda.pm @@ -31,7 +31,7 @@ sub run { $params .= "inst.repo=" . get_full_repo($repourl) . " "; } # Construct inst.addrepo arg for ADD_REPOSITORY_VARIATION - my $repourl = get_var("ADD_REPOSITORY_VARIATION"); + $repourl = get_var("ADD_REPOSITORY_VARIATION"); if ($repourl) { $params .= "inst.addrepo=addrepo," . get_full_repo($repourl) . " "; } diff --git a/tests/_check_install_source.pm b/tests/_check_install_source.pm index 099daaec..49fc62f1 100644 --- a/tests/_check_install_source.pm +++ b/tests/_check_install_source.pm @@ -73,7 +73,11 @@ sub run { # trying to use the image itself as a repo and failing because it's # not a DVD), and this was causing false failures when running # universal tests on netinsts - assert_script_run '! grep "base repo.*not valid" /tmp/packaging.log | grep -v "cdrom/file"'; + if (get_var('FLAVOR') eq 'boot-iso') { + assert_script_run '! grep "base repo.*not valid" /tmp/packaging.log | grep -v "cdrom/file"'; + } else { + script_run '! grep "base repo.*not valid" /tmp/packaging.log | grep -v "cdrom/file"'; + } } # just for convenience - sometimes it's useful to see this log # for a success case diff --git a/tests/_do_install_and_reboot.pm b/tests/_do_install_and_reboot.pm index 03105f65..9d8be2e0 100644 --- a/tests/_do_install_and_reboot.pm +++ b/tests/_do_install_and_reboot.pm @@ -140,6 +140,7 @@ sub run { push (@actions, 'consoletty0') if (get_var("ARCH") eq "aarch64"); push (@actions, 'abrt') if (get_var("ABRT", '') eq "system"); push (@actions, 'rootpw') if (get_var("INSTALLER_NO_ROOT")); + push (@actions, 'stagingrepos') if (get_var("DNF_CONTENTDIR")); # memcheck test doesn't need to reboot at all. Rebooting from GUI # for lives is unreliable. And if we're already doing something # else at a console, we may as well reboot from there too @@ -187,6 +188,20 @@ sub run { my $root_password = get_var("ROOT_PASSWORD") || "weakpassword"; assert_script_run "echo 'root:$root_password' | chpasswd -R $mount"; } + if (grep {$_ eq 'stagingrepos'} @actions) { + if (get_version_major() < 9) { + assert_script_run 'sed -i -e "s/^mirrorlist/#mirrorlist/g;s,^#\(baseurl=http[s]*://\),\1,g" ' . $mount . '/etc/yum.repos.d/Rocky-BaseOS.repo'; + assert_script_run 'sed -i -e "s/^mirrorlist/#mirrorlist/g;s,^#\(baseurl=http[s]*://\),\1,g" ' . $mount . '/etc/yum.repos.d/Rocky-AppStream.repo'; + assert_script_run 'sed -i -e "s/^mirrorlist/#mirrorlist/g;s,^#\(baseurl=http[s]*://\),\1,g" ' . $mount . '/etc/yum.repos.d/Rocky-Extras.repo'; + assert_script_run 'sed -i -e "s/^mirrorlist/#mirrorlist/g;s,^#\(baseurl=http[s]*://\),\1,g" ' . $mount . '/etc/yum.repos.d/Rocky-Devel.repo'; + } else { + script_run 'sed -i -e "s/^mirrorlist/#mirrorlist/g;s/^#baseurl/baseurl/g" ' . $mount . '/etc/yum.repos.d/rocky.repo'; + script_run 'sed -i -e "s/^mirrorlist/#mirrorlist/g;s/^#baseurl/baseurl/g" ' . $mount . '/etc/yum.repos.d/rocky-addons.repo'; + script_run 'sed -i -e "s/^mirrorlist/#mirrorlist/g;s/^#baseurl/baseurl/g" ' . $mount . '/etc/yum.repos.d/rocky-devel.repo'; + script_run 'sed -i -e "s/^mirrorlist/#mirrorlist/g;s/^#baseurl/baseurl/g" ' . $mount . '/etc/yum.repos.d/rocky-extras.repo'; + } + assert_script_run 'printf "stg/rocky\n" > ' . $mount . '/etc/dnf/vars/contentdir'; + } type_string "reboot\n" if (grep {$_ eq 'reboot'} @actions); } diff --git a/tests/_graphical_input.pm b/tests/_graphical_input.pm index a7a3af74..e16317f1 100644 --- a/tests/_graphical_input.pm +++ b/tests/_graphical_input.pm @@ -5,7 +5,8 @@ use utils; sub run { my $relnum = get_release_number; - if (get_var("LANGUAGE") eq 'japanese' && $relnum > 33) { + my $version_major = get_version_major; + if (get_var("LANGUAGE") eq 'japanese' && (($relnum > 33) || ($version_major > 8))) { # since g-i-s new user mode was dropped and the replacement # doesn't do input method selection, and anaconda never has, # we have to set up the input method manually: diff --git a/tests/_graphical_wait_login.pm b/tests/_graphical_wait_login.pm index 2a4e53bc..1eb86359 100644 --- a/tests/_graphical_wait_login.pm +++ b/tests/_graphical_wait_login.pm @@ -65,7 +65,7 @@ sub run { # GDM 3.24.1 dumps a cursor in the middle of the screen here... mouse_hide; if (get_var("DESKTOP") eq 'gnome') { - if ($version eq '9.0') { + if (get_version_major() > 8) { send_key_until_needlematch("graphical_login_test_user_highlighted", "tab", 5); assert_screen "graphical_login_test_user_highlighted"; } @@ -93,6 +93,8 @@ sub run { send_key "ret"; } + # Welcome tour is here... + # For GNOME, handle initial-setup or welcome tour, unless START_AFTER_TEST # is set in which case it will have been done already. Always # do it if ADVISORY_OR_TASK is set, as for the update testing flow, @@ -101,9 +103,9 @@ sub run { # as this test gets loaded twice on the ADVISORY_OR_TASK flow, and # we might be on the INSTALL_NO_USER flow, check whether # this happened already - my $relnum = get_release_number; - if ($relnum < 34) { - # before GNOME 40 (F34), we get a per-user version of + my $version_major = get_version_major(); + if ($version_major < 9) { + # before GNOME 40 we get a per-user version of # gnome-initial-setup here... gnome_initial_setup() unless (get_var("_setup_done")); } @@ -112,7 +114,7 @@ sub run { handle_welcome_screen unless (get_var("_welcome_done")); } } - if ($version eq '9.0') { + if (get_version_major() > 8) { handle_welcome_screen unless (get_var("_welcome_done")); } if (get_var("DESKTOP") eq 'gnome' && get_var("INSTALL_NO_USER")) { diff --git a/tests/_staging_repos_disable.pm b/tests/_staging_repos_disable.pm new file mode 100644 index 00000000..6cbe8b8f --- /dev/null +++ b/tests/_staging_repos_disable.pm @@ -0,0 +1,23 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +sub run { + my $self = shift; + $self->root_console(tty=>4); + # Point at default repositories by modifying contentdir + # NOTE: This will leave repos pointing at primary dl server instead + # of mirrorlist. + script_run 'printf "pub/rocky\n" > /etc/dnf/vars/contentdir'; + script_run 'dnf clean all'; + script_run 'dnf repoinfo' +} + +sub test_flags { + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/_staging_repos_enable.pm b/tests/_staging_repos_enable.pm new file mode 100644 index 00000000..e5fcbb45 --- /dev/null +++ b/tests/_staging_repos_enable.pm @@ -0,0 +1,28 @@ +use base "installedtest"; +use strict; +use testapi; +use utils; + +sub run { + my $self = shift; + $self->root_console(tty=>4); + # Point at staging repositories by modifying contentdir + if (get_version_major() < 9) { + script_run "sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/Rocky-*"; + script_run "sed -i 's,^#\(baseurl=http[s]*://\),\1,g' /etc/yum.repos.d/Rocky-*"; + } else { + script_run "sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/rocky*"; + script_run "sed -i 's,^#\(baseurl=http[s]*://\),\1,g' /etc/yum.repos.d/rocky*"; + } + script_run 'printf "stg/rocky\n" > /etc/dnf/vars/contentdir'; + script_run 'dnf clean all'; + script_run 'dnf repoinfo'; +} + +sub test_flags { + return { fatal => 1 }; +} + +1; + +# vim: set sw=4 et: diff --git a/tests/desktop_login.pm b/tests/desktop_login.pm index 205bc67d..b0b5431e 100644 --- a/tests/desktop_login.pm +++ b/tests/desktop_login.pm @@ -157,7 +157,8 @@ sub reboot_system { click_lastmatch; if (match_has_tag("power_entry")) { my $relnum = get_release_number; - if ($desktop eq "gnome" && $relnum < 33) { + my $version_major = get_version_major; + if ($desktop eq "gnome" && (($relnum < 33) || ($version_major < 9))) { # In GNOME before F33, some of the entries are brought together, while # in KDE and GNOME from F33 onwards they are split and it does not seem # correct to me to assign restarting tags to needles powering off the diff --git a/tests/desktop_notifications.pm b/tests/desktop_notifications.pm index 5b4a6d84..39d4d3e5 100644 --- a/tests/desktop_notifications.pm +++ b/tests/desktop_notifications.pm @@ -14,6 +14,7 @@ sub run { my $self = shift; my $desktop = get_var("DESKTOP"); my $relnum = get_release_number; + my $version_major = get_version_major; # for the live image case, handle bootloader here if (get_var("BOOTFROM")) { do_bootloader(postinstall=>1, params=>'3'); @@ -118,7 +119,7 @@ sub run { } } if (get_var("BOOTFROM")) { - if ($desktop eq 'kde' && $relnum > 33) { + if ($desktop eq 'kde' && (($relnum > 33) || ($version_major > 8))) { # there is not always a permanent notification in F34+, # if we don't see one, check we saw the transient one # earlier. FIXME: maybe drop the 'transient' path here diff --git a/tests/desktop_terminal.pm b/tests/desktop_terminal.pm index 3d5e52a8..845b68c0 100644 --- a/tests/desktop_terminal.pm +++ b/tests/desktop_terminal.pm @@ -6,13 +6,14 @@ use utils; sub run { my $self = shift; my $relnum = get_release_number; + my $version_major = get_version_major; my $desktop = get_var("DESKTOP"); check_desktop; menu_launch_type('terminal'); assert_screen "apps_run_terminal"; # FIXME: workaround for RHBZ#1957858 - test actually works without # this, but very slowly as characters don't appear on screen - send_key "super-pgup" if ($relnum > 33 && $desktop eq "kde"); + send_key "super-pgup" if ((($version_major > 8) || ($relnum > 33)) && $desktop eq "kde"); wait_still_screen 5; # need to be root my $rootpass = get_var("ROOT_PASSWORD", "weakpassword"); diff --git a/tests/desktop_update_graphical.pm b/tests/desktop_update_graphical.pm index b9cf95a2..e44546d0 100644 --- a/tests/desktop_update_graphical.pm +++ b/tests/desktop_update_graphical.pm @@ -8,6 +8,7 @@ sub run { my $self = shift; my $desktop = get_var('DESKTOP'); my $relnum = get_release_number; + my $version_major = get_version_major; # use a tty console for repo config and package prep $self->root_console(tty=>3); assert_script_run 'dnf config-manager --set-disabled updates-testing'; @@ -22,7 +23,7 @@ sub run { if ($desktop eq 'kde') { # KDE team tells me until F34 the 'preferred' update method # was the systray applet... - if ($relnum < 34) { + if (($relnum < 34) || ($version_major < 9)) { # get rid of notifications which get in the way of the things # we need to click click_unwanted_notifications; diff --git a/tests/freeipa_password_change.pm b/tests/freeipa_password_change.pm index 6aeebcfb..6a35b769 100644 --- a/tests/freeipa_password_change.pm +++ b/tests/freeipa_password_change.pm @@ -27,7 +27,8 @@ sub run { # The next box we need to type into was moved in FreeIPA 4.8.9, # which is in F32+ but not F31 my $relnum = get_release_number; - $relnum < 32 ? type_safely "\t\t" : type_safely "\t"; + my $version_major = get_version_major; + (($relnum < 32) || ($version_major < 9)) ? type_safely "\t\t" : type_safely "\t"; type_safely "loremipsum"; wait_screen_change { send_key "tab"; }; type_safely "loremipsum"; diff --git a/tests/install_text.pm b/tests/install_text.pm index f86ba721..d458a35d 100644 --- a/tests/install_text.pm +++ b/tests/install_text.pm @@ -106,7 +106,7 @@ sub run { console_type_wait("3\n"); # set username console_type_wait("$username\n"); # from Rawhide-20190503.n.0 (F31) onwards, 'use password' is default - if (get_release_number() < 31 && lc(get_var('DISTRI')) ne "rocky") { + if ((get_release_number() < 31) || (get_version_major() < 9)) { # typing "4\n" on abrt screen causes system to reboot, so be careful run_with_error_check(sub {console_type_wait("4\n")}, $error); # use password }