- Revision
- 274474
- Author
- lmo...@igalia.com
- Date
- 2021-03-16 06:52:20 -0700 (Tue, 16 Mar 2021)
Log Message
[GTK] Add GTK4 tests expectations
https://bugs.webkit.org/show_bug.cgi?id=222907
Reviewed by Carlos Garcia Campos.
Tools:
Check whether we are using a GTK4 build to automatically enable the
platform/gtk4 expectations. This is done checking the
presence of either libwebkit2gtk-4.0.so or libwebkit2gtk-5.0.so, so it
works on binary-only deployments like the testing bots.
* Scripts/webkitpy/port/gtk.py:
(GtkPort._search_paths):
(GtkPort._is_gtk4_build):
* Scripts/webkitpy/port/gtk_unittest.py:
(GtkPortTest.test_gtk4_expectations_binary_only):
(GtkPortTest.test_gtk3_expectations_binary_only):
(GtkPortTest.test_gtk_expectations_both_binaries):
LayoutTests:
* platform/gtk4/TestExpectations: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (274473 => 274474)
--- trunk/LayoutTests/ChangeLog 2021-03-16 13:42:56 UTC (rev 274473)
+++ trunk/LayoutTests/ChangeLog 2021-03-16 13:52:20 UTC (rev 274474)
@@ -1,3 +1,12 @@
+2021-03-16 Lauro Moura <lmo...@igalia.com>
+
+ [GTK] Add GTK4 tests expectations
+ https://bugs.webkit.org/show_bug.cgi?id=222907
+
+ Reviewed by Carlos Garcia Campos.
+
+ * platform/gtk4/TestExpectations: Added.
+
2021-03-16 Frederic Wang <fw...@igalia.com>
Crash in makeBoundaryPoint via ReplaceSelectionCommand::insertedContentRange
Added: trunk/LayoutTests/platform/gtk4/TestExpectations (0 => 274474)
--- trunk/LayoutTests/platform/gtk4/TestExpectations (rev 0)
+++ trunk/LayoutTests/platform/gtk4/TestExpectations 2021-03-16 13:52:20 UTC (rev 274474)
@@ -0,0 +1,36 @@
+# These are the layout test expectations for the GTK port of WebKit when running with GTK4
+#
+# See http://trac.webkit.org/wiki/TestExpectations for more information on this file.
+#
+# Never add any test to this file without opening a bug on bugzilla.webkit.org or a comment
+
+#////////////////////////////////////////////////////////////////////////////////////////
+# TESTS PASSING
+#
+# These tests are passing on GTK4 but they do not in other ports or GTK3
+# Note: Passing tests should be on the top of the file to ensure that
+# expected failures below are not overriden by a folder that is
+# set to Pass to unskip it from the main expectations file and
+# declared after the expected failure.
+# The layout test runner evaluates the rules from top to bottom and
+# it picks as the valid rule the last one matching.
+#////////////////////////////////////////////////////////////////////////////////////////
+
+#////////////////////////////////////////////////////////////////////////////////////////
+# End of PASSING tests. See below where to put expected failures.
+#////////////////////////////////////////////////////////////////////////////////////////
+
+
+#//////////////////////////////////////////////////////////////////////////////////////////
+# Triaged Expectations
+# * KEEP THE SECTIONS SORTED ALPHABETICALLY.
+# * ALWAYS WITH BUG ENTRIES for things like Timeout, Failure and Crash.
+#
+# For more info, check the glib/TestExpectations file
+# If unsure of where to put the expectations, add the test to the end of the file and
+# ask for triaging.
+#//////////////////////////////////////////////////////////////////////////////////////////
+
+#//////////////////////////////////////////////////////////////////////////////////////////
+# End of Triaged Expectations
+#//////////////////////////////////////////////////////////////////////////////////////////
Modified: trunk/Tools/ChangeLog (274473 => 274474)
--- trunk/Tools/ChangeLog 2021-03-16 13:42:56 UTC (rev 274473)
+++ trunk/Tools/ChangeLog 2021-03-16 13:52:20 UTC (rev 274474)
@@ -1,3 +1,23 @@
+2021-03-16 Lauro Moura <lmo...@igalia.com>
+
+ [GTK] Add GTK4 tests expectations
+ https://bugs.webkit.org/show_bug.cgi?id=222907
+
+ Reviewed by Carlos Garcia Campos.
+
+ Check whether we are using a GTK4 build to automatically enable the
+ platform/gtk4 expectations. This is done checking the
+ presence of either libwebkit2gtk-4.0.so or libwebkit2gtk-5.0.so, so it
+ works on binary-only deployments like the testing bots.
+
+ * Scripts/webkitpy/port/gtk.py:
+ (GtkPort._search_paths):
+ (GtkPort._is_gtk4_build):
+ * Scripts/webkitpy/port/gtk_unittest.py:
+ (GtkPortTest.test_gtk4_expectations_binary_only):
+ (GtkPortTest.test_gtk3_expectations_binary_only):
+ (GtkPortTest.test_gtk_expectations_both_binaries):
+
2021-03-16 Youenn Fablet <you...@apple.com>
Add a new delegate for geolocation permission
Modified: trunk/Tools/Scripts/webkitpy/port/gtk.py (274473 => 274474)
--- trunk/Tools/Scripts/webkitpy/port/gtk.py 2021-03-16 13:42:56 UTC (rev 274473)
+++ trunk/Tools/Scripts/webkitpy/port/gtk.py 2021-03-16 13:52:20 UTC (rev 274474)
@@ -33,6 +33,7 @@
import logging
import shlex
+import webkitpy
from webkitpy.common.system import path
from webkitpy.common.memoized import memoized
from webkitpy.layout_tests.models.test_configuration import TestConfiguration
@@ -210,8 +211,13 @@
def _search_paths(self):
search_paths = []
+
+ if self._is_gtk4_build():
+ search_paths.append(self.port_name + "4")
+
if self._driver_class() in [WaylandDriver, WestonDriver]:
search_paths.append(self.port_name + "-wayland")
+
search_paths.append(self.port_name)
search_paths.append('glib')
search_paths.append('wk2')
@@ -277,3 +283,19 @@
if self._should_use_jhbuild():
command = self._jhbuild_wrapper + command
return self._executive.run_command(command + args, cwd=self.webkit_base(), stdout=None, return_stderr=False, decode_output=False)
+
+ @memoized
+ def _is_gtk4_build(self):
+ try:
+ libdir = self._build_path('lib')
+ candidates = self._filesystem.glob(os.path.join(libdir, 'libwebkit2gtk-*.so'))
+ if not candidates:
+ return False
+ if len(candidates) > 1:
+ _log.warning("Multiple WebKit2GTK libraries found. Skipping GTK4 detection.")
+ return False
+ return os.path.basename(candidates[0]) == 'libwebkit2gtk-5.0.so'
+
+ except (webkitpy.common.system.executive.ScriptError, IOError, OSError):
+ return False
+ return False
Modified: trunk/Tools/Scripts/webkitpy/port/gtk_unittest.py (274473 => 274474)
--- trunk/Tools/Scripts/webkitpy/port/gtk_unittest.py 2021-03-16 13:42:56 UTC (rev 274473)
+++ trunk/Tools/Scripts/webkitpy/port/gtk_unittest.py 2021-03-16 13:52:20 UTC (rev 274474)
@@ -101,3 +101,44 @@
self.assertEqual(configuration['platform'], 'GTK')
self.assertEqual(configuration['style'], 'release')
self.assertEqual(configuration['version_name'], 'Xvfb')
+
+ def test_gtk4_expectations_binary_only(self):
+ port = self.make_port()
+ port._filesystem = MockFileSystem({
+ "/mock-build/lib/libwebkit2gtk-5.0.so": ""
+ })
+ with OutputCapture() as _:
+ self.assertEquals(port.expectations_files(),
+ ['/mock-checkout/LayoutTests/TestExpectations',
+ '/mock-checkout/LayoutTests/platform/wk2/TestExpectations',
+ '/mock-checkout/LayoutTests/platform/glib/TestExpectations',
+ '/mock-checkout/LayoutTests/platform/gtk/TestExpectations',
+ '/mock-checkout/LayoutTests/platform/gtk4/TestExpectations'])
+
+ def test_gtk3_expectations_binary_only(self):
+ port = self.make_port()
+ port._filesystem = MockFileSystem({
+ "/mock-build/lib/libwebkit2gtk-4.0.so": ""
+ })
+
+ with OutputCapture() as _:
+ self.assertEquals(port.expectations_files(),
+ ['/mock-checkout/LayoutTests/TestExpectations',
+ '/mock-checkout/LayoutTests/platform/wk2/TestExpectations',
+ '/mock-checkout/LayoutTests/platform/glib/TestExpectations',
+ '/mock-checkout/LayoutTests/platform/gtk/TestExpectations'])
+
+ def test_gtk_expectations_both_binaries(self):
+ port = self.make_port()
+ port._filesystem = MockFileSystem({
+ "/mock-build/lib/libwebkit2gtk-4.0.so": "",
+ "/mock-build/lib/libwebkit2gtk-5.0.so": ""
+ })
+
+ with OutputCapture() as captured:
+ self.assertEquals(port.expectations_files(),
+ ['/mock-checkout/LayoutTests/TestExpectations',
+ '/mock-checkout/LayoutTests/platform/wk2/TestExpectations',
+ '/mock-checkout/LayoutTests/platform/glib/TestExpectations',
+ '/mock-checkout/LayoutTests/platform/gtk/TestExpectations'])
+ self.assertEquals(captured.root.log.getvalue(), 'Multiple WebKit2GTK libraries found. Skipping GTK4 detection.\n')