diff --git a/lib/utils.pm b/lib/utils.pm index 3656b8c4..7ed709b0 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -1464,7 +1464,17 @@ sub download_testdata { # a standalone script but we should be able to invoke this from anywhere if needed. # Currently, this only works for Gnome desktop sub desktop_login { - my ($login,$password) = @_; + my ($login, $password) = @_; + # Get the version, so that we can handle G-I-S or Gnome Tour. + my $version = get_var("VERSION"); + # For Upgrade tests we will need to handle older releases, so we + # fix the version number accordingly + if (get_var("GUI_UPGRADE") == 1) { + $release = $version-1; + } + elsif (get_var("GUI_UPGRADE") == 2) { + $release = $version-2; + } # For Gnome desktop if (get_var("DESKTOP") eq 'gnome') { send_key_until_needlematch("graphical_login_input", "ret", 3, 5); @@ -1477,7 +1487,7 @@ sub desktop_login { send_key "ret"; # Wait until we log in and handle GIS or Tour wait_still_screen 5; - if ($relnum < 34) { + if ($release < 34) { # before GNOME 40 (F34), we get a per-user version of # gnome-initial-setup here... gnome_initial_setup() unless (get_var("_setup_done"));