From b23af8307b2f00e0f0ec73a410387e0140a63a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20R=C5=AF=C5=BEi=C4=8Dka?= Date: Wed, 1 Dec 2021 13:19:32 +0100 Subject: [PATCH] Update the test to enable gsettings. --- tests/upgrade_boot.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/upgrade_boot.pm b/tests/upgrade_boot.pm index 597dc5ae..c76f2109 100644 --- a/tests/upgrade_boot.pm +++ b/tests/upgrade_boot.pm @@ -23,6 +23,19 @@ sub run { # adjust repo files to use mirrorlist not metalink (to avoid # metalink checksum timing issue causing infra repo to be rejected) repos_mirrorlist; + # If this should be a GUI upgrade test, we need to set up Gnome to accept prerelease. + # Let's do it here and we will save one system restart later. + if (get_var("GUI_UPGRADE")) { + # Get the login, or select test. + my $login = get_var("USER_LOGIN") // "test"; + # Switch to the test user + type_string("su $login\n";) + # Use gsettings to enable showing the prerelease + script_run("gsettings set org.gnome.software show-upgrade-prerelease true"); + # Return to the root console. + type_string("exit\n"); + + } }