From 20620236b380a35b00557c1eb6098408bce9e11b Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 2 Mar 2023 13:51:08 -0800 Subject: [PATCH] Clean up minimal browser environment setup Move the xauth disablement and the disabling of studies into _setup_browser, instead of repeating it in a couple of other places (but *not* doing it in the zezere test, where we should be doing it). Drop some explicit package installs that should no longer be needed as Firefox and/or X.org now depend on those things. Install the current default fonts (Noto), not the old ones (DejaVu). Signed-off-by: Adam Williamson --- lib/cockpit.pm | 3 --- lib/freeipa.pm | 3 --- tests/_setup_browser.pm | 15 +++++++-------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/lib/cockpit.pm b/lib/cockpit.pm index e6fdf729..e147876e 100644 --- a/lib/cockpit.pm +++ b/lib/cockpit.pm @@ -20,9 +20,6 @@ sub start_cockpit { $args{login} //= 0; $args{admin} //= 1; my $login = shift || 0; - # https://bugzilla.redhat.com/show_bug.cgi?id=1439429 - assert_script_run "sed -i -e 's,enable_xauth=1,enable_xauth=0,g' /usr/bin/startx"; - disable_firefox_studies; # run firefox directly in X as root. never do this, kids! type_string "startx /usr/bin/firefox -width 1024 -height 768 http://localhost:9090\n"; assert_screen "cockpit_login", 60; diff --git a/lib/freeipa.pm b/lib/freeipa.pm index ed64b032..21ff8a4d 100644 --- a/lib/freeipa.pm +++ b/lib/freeipa.pm @@ -39,9 +39,6 @@ sub start_webui { my $user_screen = "freeipa_webui_user"; $user_screen = "freeipa_webui_users" if ($user eq 'admin'); - # https://bugzilla.redhat.com/show_bug.cgi?id=1439429 - assert_script_run "sed -i -e 's,enable_xauth=1,enable_xauth=0,g' /usr/bin/startx"; - disable_firefox_studies; type_string "startx /usr/bin/firefox -width 1024 -height 768 https://ipa001.test.openqa.fedoraproject.org\n"; assert_screen ["freeipa_webui_login", $user_screen], 60; wait_still_screen(stilltime => 5, similarity_level => 45); diff --git a/tests/_setup_browser.pm b/tests/_setup_browser.pm index 116554aa..d476b3ad 100644 --- a/tests/_setup_browser.pm +++ b/tests/_setup_browser.pm @@ -7,15 +7,14 @@ sub run { my $self = shift; # set up appropriate repositories repo_setup(); - # install a desktop and firefox so we can actually try it + # install X environment assert_script_run "dnf -y groupinstall 'base-x'", 300; - # FIXME: this should probably be in base-x...X seems to fail without - assert_script_run "dnf -y install libglvnd-egl", 180; - # try to avoid random weird font selection happening - assert_script_run "dnf -y install dejavu-sans-fonts dejavu-sans-mono-fonts dejavu-serif-fonts", 180; - # since firefox-85.0-2, firefox doesn't seem to run without this - assert_script_run "dnf -y install dbus-glib", 180; - assert_script_run "dnf -y install firefox", 180; + # install firefox, plus our basic default fonts to try and avoid + # random weird font selection happening + assert_script_run "dnf -y install firefox google-noto-sans-vf-fonts google-noto-sans-mono-vf-fonts google-noto-serif-vf-fonts", 180; + # https://bugzilla.redhat.com/show_bug.cgi?id=1439429 + assert_script_run "sed -i -e 's,enable_xauth=1,enable_xauth=0,g' /usr/bin/startx"; + disable_firefox_studies; } sub test_flags {