From 3ebd1371cbcfc03ca525146c680f076066ceb361 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 25 Aug 2023 08:52:19 +0200 Subject: gtk3 a11y: Force running a11y tests with X11 GDK backend On Debian testing, tunning the gtk3 a11y tests with make CppunitTest_vcl_gtk3_a11y in a Wayland session resulted in a visible Writer window popping up (while that should not be the case and isn't when run in an X11 session instead, as the application is meant to run in a virtual X server environment via xvfb-run) and a test failed like this: .../vcl/qa/cppunit/a11y/atspi2/atspi2.cxx:432:Test1::TestBody equality assertion failed - Expected: ATSPI_ROLE_PANEL - Actual : ATSPI_ROLE_FILLER warn:sw.core:15950:15950:sw/source/core/attr/calbck.cxx:196: a 16SwTextFormatColl client added as listener to a 16SwTextFormatColl during client iteration. warn:sw.core:15950:15950:sw/source/core/attr/calbck.cxx:196: a 16SwLineNumberInfo client added as listener to a 12SwCharFormat during client iteration. Test1::TestBody finished in: 56011ms atspi2.cxx:432:Assertion Test name: Test1::TestBody equality assertion failed - Expected: ATSPI_ROLE_PANEL - Actual : ATSPI_ROLE_FILLER Failures !!! Run: 1 Failure total: 1 Failures: 1 Errors: 0 Force use of the X11 GDK backend by setting env var `GDK_BACKEND=x11`, which makes that scenario work as expected. Change-Id: I7de03593998ffa3bc18d487cb92e00ae75427598 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156086 Tested-by: Jenkins Reviewed-by: Michael Weghorn --- vcl/CppunitTest_vcl_gtk3_a11y.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vcl/CppunitTest_vcl_gtk3_a11y.mk') diff --git a/vcl/CppunitTest_vcl_gtk3_a11y.mk b/vcl/CppunitTest_vcl_gtk3_a11y.mk index 0981a21857d2..19adbabd4d14 100644 --- a/vcl/CppunitTest_vcl_gtk3_a11y.mk +++ b/vcl/CppunitTest_vcl_gtk3_a11y.mk @@ -9,6 +9,8 @@ # hack plugging into the CppunitTest machinery yet using a xvfb-wrapper GTK3 run $(call gb_CppunitTest_get_target,vcl_gtk3_a11y) : gb_TEST_ENV_VARS += SAL_USE_VCLPLUGIN=gtk3 +# force running with the X11 Gdk backend also when running on Wayland +$(call gb_CppunitTest_get_target,vcl_gtk3_a11y) : gb_TEST_ENV_VARS += GDK_BACKEND=x11 ifeq (,$(VCL_GTK3_TESTS_NO_XVFB)) $(call gb_CppunitTest_get_target,vcl_gtk3_a11y) : \ ICECREAM_RUN += $(XVFB_RUN) $(DBUS_LAUNCH) --exit-with-session -- cgit