Title: [202619] trunk
Revision
202619
Author
[email protected]
Date
2016-06-29 03:31:40 -0700 (Wed, 29 Jun 2016)

Log Message

[GTK][Wayland] Implement support for running the layout tests under a (virtualized) Wayland environment.
https://bugs.webkit.org/show_bug.cgi?id=156716

Reviewed by Carlos Garcia Campos and Michael Catanzaro.

Tools:

* Scripts/webkitpy/layout_tests/run_webkit_tests.py: Allow to run the layout tests on Wayland by passing --wayland
(parse_args):
* Scripts/webkitpy/port/gtk.py:
(GtkPort.__init__):
(GtkPort._driver_class):
(GtkPort.setup_environ_for_server): Set the softgl renderer (now with EGL support) for the wayland tests.
(GtkPort._search_paths): When running inside the wayland environment, use ${port}-wayland as an additional
platform directory for storing the wayland specific layout test results and expectations for ${port}.
For example, the file LayoutTests/platform/gtk-wayland/TestExpectations will be used as the most specific
test expectations file on the GTK port when running the tests with the --wayland command line switch.
Baseline search path: gtk-wayland -> gtk -> wk2 -> generic.
* Scripts/webkitpy/port/westondriver.py: Run the weston display server inside Xvfb.
(WestonDriver.check_driver):
(WestonDriver.__init__):
(WestonDriver._start):
* Scripts/webkitpy/port/westondriver_unittest.py: Fix unittests for the new Weston inside Xvfb driver.
(WestonXvfbDriverDisplayTest):
(WestonXvfbDriverDisplayTest.__init__):
(WestonXvfbDriverDisplayTest._xvfb_run):
(WestonDriverTest.make_driver):
(WestonDriverTest.test_start):
* gtk/install-dependencies: Add the new dependencies that are required for either building weston,
or to satisfy the pkg-config check of the new added modules in JHBuild.
* gtk/jhbuild.modules: For building weston new enough on Debian Jessie we also need to build wayland
and libinput. Declare a pkg-config entry on all this modules to avoid building them if the ones
provided by the system are already new enough.
Switch the Mesa software rasterizer from a Xlib based GLX renderer to a DRI based EGL/GLX one.
It was the only way to get the software EGL rasterizer working without depending on user drivers.
Due to this the Mesa build now depends on a modern enough libdrm, so we also use JHBuild pkg-config
feature to avoid building libdrm when the one provided by the system is new enough.
* gtk/jhbuildrc:
* gtk/patches/xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch: Added.
Xorg had no support for searching the DRI drivers on a custom path at runtime.
This patch implements support for that reusing the same variable that we use with Mesa to set the
custom path for the DRI drivers path.

LayoutTests:

* platform/gtk-wayland/TestExpectations: Added. Add initial Wayland specific test expectations.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (202618 => 202619)


--- trunk/LayoutTests/ChangeLog	2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/LayoutTests/ChangeLog	2016-06-29 10:31:40 UTC (rev 202619)
@@ -1,3 +1,12 @@
+2016-06-29  Carlos Alberto Lopez Perez  <[email protected]>
+
+        [GTK][Wayland] Implement support for running the layout tests under a (virtualized) Wayland environment.
+        https://bugs.webkit.org/show_bug.cgi?id=156716
+
+        Reviewed by Carlos Garcia Campos and Michael Catanzaro.
+
+        * platform/gtk-wayland/TestExpectations: Added. Add initial Wayland specific test expectations.
+
 2016-06-29  David Kilzer  <[email protected]>
 
         Throw exceptions for invalid number of channels for ConvolverNode

Added: trunk/LayoutTests/platform/gtk-wayland/TestExpectations (0 => 202619)


--- trunk/LayoutTests/platform/gtk-wayland/TestExpectations	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk-wayland/TestExpectations	2016-06-29 10:31:40 UTC (rev 202619)
@@ -0,0 +1,81 @@
+#////////////////////////////////////////////////////////////////////////////////////////
+# This file contains the specific expectations that only fail or only pass on Wayland.
+#
+# This file overrides the generic GTK+ one when running the layout tests with --wayland
+# Default baseline search path with --wayland: gtk-wayland -> gtk -> wk2 -> generic.
+#////////////////////////////////////////////////////////////////////////////////////////
+
+#////////////////////////////////////////////////////////////////////////////////////////
+# Expected failures
+#////////////////////////////////////////////////////////////////////////////////////////
+
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping-preserve-3d.html [ Failure ]
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping-overlapping.html [ Failure ]
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping-origins.html [ Failure ]
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping.html [ Failure ]
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping-deep.html [ Failure ]
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping-coplanar.html [ Failure ]
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping-3.html [ Failure ]
+webkit.org/b/156717 transforms/3d/point-mapping/3d-point-mapping-2.html [ Failure ]
+webkit.org/b/156717 transforms/3d/hit-testing/rotated-hit-test.html [ Failure ]
+webkit.org/b/156717 transforms/3d/hit-testing/rotated-hit-test2.html [ Failure ]
+webkit.org/b/156717 transforms/3d/hit-testing/perspective-clipped.html [ Failure ]
+webkit.org/b/156717 transforms/3d/hit-testing/overlapping-layers-hit-test.html [ Failure ]
+webkit.org/b/156717 transforms/3d/hit-testing/backface-no-transform-hit-test.html [ Failure ]
+webkit.org/b/156717 transforms/3d/hit-testing/backface-hit-test.html [ Failure ]
+webkit.org/b/156717 imported/blink/css3/blending/mix-blend-mode-multiply.html [ ImageOnlyFailure ]
+webkit.org/b/156717 imported/blink/css3/blending/mix-blend-mode-has-ancestor-clipping-layer.html [ ImageOnlyFailure ]
+webkit.org/b/156717 fast/repaint/animation-after-layer-scroll.html [ Failure ]
+webkit.org/b/156717 fast/regions/overflow/overflow-3dtransformed-region.html [ Failure ]
+webkit.org/b/156717 editing/pasteboard/paste-global-selection.html [ Failure ]
+webkit.org/b/156717 editing/pasteboard/gtk/middle-click-onpaste.html [ Failure ]
+
+
+#////////////////////////////////////////////////////////////////////////////////////////
+# End of Expected failures
+#////////////////////////////////////////////////////////////////////////////////////////
+
+#////////////////////////////////////////////////////////////////////////////////////////
+# Crashing tests
+#////////////////////////////////////////////////////////////////////////////////////////
+
+webkit.org/b/156717 media/crash-closing-page-with-media-as-plugin-fallback.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-without-flag-from-subframe.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-window-open-with-flag-from-subframe.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-without-flag-from-subframe.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag.html [ Crash ]
+webkit.org/b/156717 loader/navigation-policy/should-open-external-urls/user-gesture-target-blank-with-flag-from-subframe.html [ Crash ]
+webkit.org/b/156717 http/tests/security/referrer-policy-redirect-link.html [ Crash ]
+webkit.org/b/156717 http/tests/security/isolatedWorld/userGestureEvents.html [ Crash ]
+webkit.org/b/156717 http/tests/navigation/no-referrer-target-blank.html [ Crash ]
+webkit.org/b/156717 http/tests/navigation/no-referrer-reset.html [ Crash ]
+webkit.org/b/156717 fast/history/window-open.html [ Crash ]
+webkit.org/b/156717 fast/history/history_reload.html [ Crash ]
+webkit.org/b/156717 fast/forms/select-type-ahead-non-latin.html [ Crash ]
+webkit.org/b/156717 fast/forms/listbox-typeahead-greek.html [ Crash ]
+webkit.org/b/156717 fast/forms/listbox-typeahead-cyrillic.html [ Crash ]
+webkit.org/b/156717 fast/events/popup-blocking-timers1.html [ Crash ]
+webkit.org/b/156717 fast/events/popup-blocked-from-fake-user-gesture.html [ Crash ]
+webkit.org/b/156717 fast/events/popup-allowed-from-gesture-initiated-event.html [ Crash ]
+webkit.org/b/156717 fast/events/open-window-from-another-frame.html [ Crash ]
+webkit.org/b/156717 fast/events/keydown-numpad-keys.html [ Crash ]
+webkit.org/b/156717 editing/spelling/spelling-changed-text.html [ Crash ]
+
+
+#////////////////////////////////////////////////////////////////////////////////////////
+# End of Crashing tests
+#////////////////////////////////////////////////////////////////////////////////////////
+
+#////////////////////////////////////////////////////////////////////////////////////////
+# Tests timing out
+#////////////////////////////////////////////////////////////////////////////////////////
+
+webkit.org/b/156717 fast/images/animated-gif-iframe-webkit-transform.html [ Timeout ]
+webkit.org/b/156717 plugins/mouse-events.html [ Timeout ]
+
+#////////////////////////////////////////////////////////////////////////////////////////
+# End of Tests timing out
+#////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/Tools/ChangeLog (202618 => 202619)


--- trunk/Tools/ChangeLog	2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/ChangeLog	2016-06-29 10:31:40 UTC (rev 202619)
@@ -1,3 +1,46 @@
+2016-06-29  Carlos Alberto Lopez Perez  <[email protected]>
+
+        [GTK][Wayland] Implement support for running the layout tests under a (virtualized) Wayland environment.
+        https://bugs.webkit.org/show_bug.cgi?id=156716
+
+        Reviewed by Carlos Garcia Campos and Michael Catanzaro.
+
+        * Scripts/webkitpy/layout_tests/run_webkit_tests.py: Allow to run the layout tests on Wayland by passing --wayland
+        (parse_args):
+        * Scripts/webkitpy/port/gtk.py:
+        (GtkPort.__init__):
+        (GtkPort._driver_class):
+        (GtkPort.setup_environ_for_server): Set the softgl renderer (now with EGL support) for the wayland tests.
+        (GtkPort._search_paths): When running inside the wayland environment, use ${port}-wayland as an additional
+        platform directory for storing the wayland specific layout test results and expectations for ${port}.
+        For example, the file LayoutTests/platform/gtk-wayland/TestExpectations will be used as the most specific
+        test expectations file on the GTK port when running the tests with the --wayland command line switch.
+        Baseline search path: gtk-wayland -> gtk -> wk2 -> generic.
+        * Scripts/webkitpy/port/westondriver.py: Run the weston display server inside Xvfb.
+        (WestonDriver.check_driver):
+        (WestonDriver.__init__):
+        (WestonDriver._start):
+        * Scripts/webkitpy/port/westondriver_unittest.py: Fix unittests for the new Weston inside Xvfb driver.
+        (WestonXvfbDriverDisplayTest):
+        (WestonXvfbDriverDisplayTest.__init__):
+        (WestonXvfbDriverDisplayTest._xvfb_run):
+        (WestonDriverTest.make_driver):
+        (WestonDriverTest.test_start):
+        * gtk/install-dependencies: Add the new dependencies that are required for either building weston,
+        or to satisfy the pkg-config check of the new added modules in JHBuild.
+        * gtk/jhbuild.modules: For building weston new enough on Debian Jessie we also need to build wayland
+        and libinput. Declare a pkg-config entry on all this modules to avoid building them if the ones
+        provided by the system are already new enough.
+        Switch the Mesa software rasterizer from a Xlib based GLX renderer to a DRI based EGL/GLX one.
+        It was the only way to get the software EGL rasterizer working without depending on user drivers.
+        Due to this the Mesa build now depends on a modern enough libdrm, so we also use JHBuild pkg-config
+        feature to avoid building libdrm when the one provided by the system is new enough.
+        * gtk/jhbuildrc:
+        * gtk/patches/xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch: Added.
+        Xorg had no support for searching the DRI drivers on a custom path at runtime.
+        This patch implements support for that reusing the same variable that we use with Mesa to set the
+        custom path for the DRI drivers path.
+
 2016-06-29  Alejandro G. Castro  <[email protected]>
 
         [WebRTC][OWR] Bump gst-plugins-openwebrtc jhbuild version to get scream fixes

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py (202618 => 202619)


--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py	2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py	2016-06-29 10:31:40 UTC (rev 202619)
@@ -282,6 +282,8 @@
         optparse.make_option("--profiler", action=""
             help="Output per-test profile information, using the specified profiler."),
         optparse.make_option("--no-timeout", action="" default=False, help="Disable test timeouts"),
+        optparse.make_option("--wayland",  action="" default=False,
+            help="Run the layout tests inside a (virtualized) weston compositor (GTK only)."),
     ]))
 
     option_group_definitions.append(("iOS Simulator Options", [

Modified: trunk/Tools/Scripts/webkitpy/port/gtk.py (202618 => 202619)


--- trunk/Tools/Scripts/webkitpy/port/gtk.py	2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/Scripts/webkitpy/port/gtk.py	2016-06-29 10:31:40 UTC (rev 202619)
@@ -52,6 +52,7 @@
     def __init__(self, *args, **kwargs):
         super(GtkPort, self).__init__(*args, **kwargs)
         self._pulseaudio_sanitizer = PulseAudioSanitizer()
+        self._wayland = self.get_option("wayland")
 
         if self.get_option("leaks"):
             self._leakdetector = LeakDetectorValgrind(self._executive, self._filesystem, self.results_directory())
@@ -76,7 +77,7 @@
 
     @memoized
     def _driver_class(self):
-        if os.environ.get("WAYLAND_DISPLAY"):
+        if self._wayland:
             return WestonDriver
         if os.environ.get("USE_NATIVE_XDISPLAY"):
             return XorgDriver
@@ -118,11 +119,15 @@
         environment['TEST_RUNNER_TEST_PLUGIN_PATH'] = self._build_path('lib', 'plugins')
         environment['OWR_USE_TEST_SOURCES'] = '1'
         self._copy_value_from_environ_if_set(environment, 'WEBKIT_OUTPUTDIR')
-        if self._driver_class() == XvfbDriver and self._should_use_jhbuild():
+        # Configure the software libgl renderer if jhbuild ready and we test inside a virtualized window system
+        if self._driver_class() in [XvfbDriver, WestonDriver] and self._should_use_jhbuild():
             llvmpipe_libgl_path = self.host.executive.run_command(self._jhbuild_wrapper + ['printenv', 'LLVMPIPE_LIBGL_PATH'],
                                                                   error_handler=self.host.executive.ignore_error).strip()
-            if os.path.exists(os.path.join(llvmpipe_libgl_path, "libGL.so")):
+            dri_libgl_path = os.path.join(llvmpipe_libgl_path, "dri")
+            if os.path.exists(os.path.join(llvmpipe_libgl_path, "libGL.so")) and os.path.exists(os.path.join(dri_libgl_path, "swrast_dri.so")):
                     # Force the Gallium llvmpipe software rasterizer
+                    environment['LIBGL_ALWAYS_SOFTWARE'] = "1"
+                    environment['LIBGL_DRIVERS_PATH'] = dri_libgl_path
                     environment['LD_LIBRARY_PATH'] = llvmpipe_libgl_path
                     if os.environ.get('LD_LIBRARY_PATH'):
                             environment['LD_LIBRARY_PATH'] += ':%s' % os.environ.get('LD_LIBRARY_PATH')
@@ -180,6 +185,8 @@
 
     def _search_paths(self):
         search_paths = []
+        if self._wayland:
+            search_paths.append(self.port_name + "-wayland")
         search_paths.append(self.port_name)
         search_paths.append('wk2')
         search_paths.extend(self.get_option("additional_platform_directory", []))

Modified: trunk/Tools/Scripts/webkitpy/port/westondriver.py (202618 => 202619)


--- trunk/Tools/Scripts/webkitpy/port/westondriver.py	2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/Scripts/webkitpy/port/westondriver.py	2016-06-29 10:31:40 UTC (rev 202619)
@@ -33,6 +33,7 @@
 
 from webkitpy.port.server_process import ServerProcess
 from webkitpy.port.driver import Driver
+from webkitpy.port.xvfbdriver import XvfbDriver
 
 _log = logging.getLogger(__name__)
 
@@ -40,7 +41,10 @@
 class WestonDriver(Driver):
     @staticmethod
     def check_driver(port):
-        weston_found = port.host.executive.run_command(['which', 'weston'], return_exit_code=True) is 0
+        weston_findcmd = ['which', 'weston']
+        if port._should_use_jhbuild():
+            weston_findcmd = port._jhbuild_wrapper + weston_findcmd
+        weston_found = port.host.executive.run_command(weston_findcmd, return_exit_code=True) is 0
         if not weston_found:
             _log.error("No weston found. Cannot run layout tests.")
         return weston_found
@@ -48,22 +52,28 @@
     def __init__(self, *args, **kwargs):
         Driver.__init__(self, *args, **kwargs)
         self._startup_delay_secs = 1.0
+        self._xvfbdriver = XvfbDriver(*args, **kwargs)
 
     def _start(self, pixel_tests, per_test_args):
         self.stop()
 
         driver_name = self._port.driver_name()
+
         self._driver_directory = self._port.host.filesystem.mkdtemp(prefix='%s-' % driver_name)
 
+        driver_environment = self._port.setup_environ_for_server(driver_name)
+        driver_environment['DISPLAY'] = ":%d" % self._xvfbdriver._xvfb_run(driver_environment)
+
         weston_socket = 'WKTesting-weston-%032x' % random.getrandbits(128)
-        weston_command = ['weston', '--socket=%s' % weston_socket, '--width=800', '--height=600']
+        weston_command = ['weston', '--socket=%s' % weston_socket, '--width=1024', '--height=768', '--use-pixman']
+        if self._port._should_use_jhbuild():
+            weston_command = self._port._jhbuild_wrapper + weston_command
         with open(os.devnull, 'w') as devnull:
-            self._weston_process = self._port.host.executive.popen(weston_command, stderr=devnull)
+            self._weston_process = self._port.host.executive.popen(weston_command, stderr=devnull, env=driver_environment)
 
         # Give Weston a bit of time to set itself up.
         time.sleep(self._startup_delay_secs)
 
-        driver_environment = self._port.setup_environ_for_server(driver_name)
         driver_environment['LOCAL_RESOURCE_ROOT'] = self._port.layout_tests_dir()
 
         # Currently on WebKit2, there is no API for setting the application cache directory.

Modified: trunk/Tools/Scripts/webkitpy/port/westondriver_unittest.py (202618 => 202619)


--- trunk/Tools/Scripts/webkitpy/port/westondriver_unittest.py	2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/Scripts/webkitpy/port/westondriver_unittest.py	2016-06-29 10:31:40 UTC (rev 202619)
@@ -41,6 +41,14 @@
 _log = logging.getLogger(__name__)
 
 
+class WestonXvfbDriverDisplayTest():
+    def __init__(self, expected_xvfbdisplay):
+        self._expected_xvfbdisplay = expected_xvfbdisplay
+
+    def _xvfb_run(self, environment):
+        return self._expected_xvfbdisplay
+
+
 class WestonDriverTest(unittest.TestCase):
     def make_driver(self, filesystem=None):
         port = Port(MockSystemHost(log_executive=True, filesystem=filesystem), 'westondrivertestport', options=MockOptions(configuration='Release'))
@@ -49,6 +57,9 @@
 
         driver = WestonDriver(port, worker_number=0, pixel_tests=True)
         driver._startup_delay_secs = 0
+        driver._expected_xvfbdisplay = 23
+        driver._xvfbdriver = WestonXvfbDriverDisplayTest(driver._expected_xvfbdisplay)
+        driver._environment = port.setup_environ_for_server(port.driver_name())
         return driver
 
     def test_start(self):
@@ -59,8 +70,10 @@
         driver.start(pixel_tests=True, per_test_args=[])
         _, _, logs = output_capture.restore_output()
 
-        self.assertTrue(re.match(r"MOCK popen: \['weston', '--socket=WKTesting-weston-[0-9a-f]{32}', '--width=800', '--height=600'\]\n", logs), None)
+        self.assertTrue(re.match(r"MOCK popen: \['weston', '--socket=WKTesting-weston-[0-9a-f]{32}', '--width=1024', '--height=768', '--use-pixman'\], env=.*\n", logs), None)
         self.assertTrue(re.match(r"WKTesting-weston-[0-9a-f]{32}", driver._server_process.env['WAYLAND_DISPLAY']))
+        self.assertFalse('DISPLAY' in driver._server_process.env)
+        self.assertTrue("'DISPLAY': ':%s'" % driver._expected_xvfbdisplay in logs)
         self.assertEqual(driver._server_process.env['GDK_BACKEND'], 'wayland')
         self.assertTrue(driver._server_process.started)
 

Modified: trunk/Tools/gtk/install-dependencies (202618 => 202619)


--- trunk/Tools/gtk/install-dependencies	2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/gtk/install-dependencies	2016-06-29 10:31:40 UTC (rev 202619)
@@ -143,6 +143,7 @@
         ruby \
         ruby-json \
         ruby-highline \
+        weston \
         xvfb"
 
     # These are dependencies necessary for building the jhbuild.
@@ -151,11 +152,17 @@
         gobject-introspection \
         icon-naming-utils \
         libcroco3-dev \
+        libdrm-dev \
         libegl1-mesa-dev \
         libepoxy-dev \
+        libevdev-dev \
+        libexpat1-dev \
+        libgbm-dev \
         libgcrypt11-dev \
         libgpg-error-dev \
         libjson-glib-dev \
+        libinput-dev \
+        libmtdev-dev \
         liborc-0.4-dev \
         libp11-kit-dev \
         libpciaccess-dev \
@@ -162,10 +169,12 @@
         libssl-dev \
         libtiff5-dev \
         libv4l-dev \
+        libxcb-composite0-dev \
         libxcb-xfixes0-dev \
         libxfont-dev \
         libxkbfile-dev \
         libtool-bin \
+        libudev-dev \
         llvm \
         llvm-dev \
         python-dev \
@@ -278,25 +287,32 @@
         python-gobject \
         ruby \
         ruby-highline \
+        weston \
         xorg-server-xvfb"
 
     # These are dependencies necessary for building the jhbuild.
     # Note: Could not find libegl-mesa
     packages="$packages \
+        expat \
         git \
         gobject-introspection \
         icon-naming-utils \
         libcroco \
+        libdrm \
         libepoxy \
+        libevdev \
         libgcrypt \
         libgpg-error \
+        libinput \
         p11-kit \
         libpciaccess \
         libtiff \
         libxfixes \
         libxfont \
+        libxcb \
         libxkbfile \
         llvm \
+        mtdev \
         python2 \
         python2-lxml \
         ragel \
@@ -396,10 +412,12 @@
         ruby \
         rubygem-json \
         rubygem-highline \
+        weston-devel \
         xorg-x11-server-Xvfb"
 
     # These are dependencies necessary for building the jhbuild.
     packages="$packages \
+        expat-devel \
         docbook-utils \
         docbook-utils-pdf \
         git \
@@ -408,15 +426,21 @@
         itstool \
         libXfont-devel \
         libcroco-devel \
+        libdrm-devel \
         libepoxy-devel \
+        libevdev-devel
         libgcrypt-devel \
         libgpg-error-devel \
+        libinput-devel \
         libp11-devel \
         libpciaccess-devel \
         libtiff-devel \
+        libxcb-devel \
         libxkbfile-devel \
         mesa-libEGL-devel \
+        mtdev-devel \
         ragel \
+        systemd-devel \
         xorg-x11-font-utils \
         xorg-x11-proto-devel \
         xorg-x11-util-macros \

Modified: trunk/Tools/gtk/jhbuild.modules (202618 => 202619)


--- trunk/Tools/gtk/jhbuild.modules	2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/gtk/jhbuild.modules	2016-06-29 10:31:40 UTC (rev 202619)
@@ -37,6 +37,7 @@
           <dep package="mesa"/>
           <dep package="at-spi2-core"/>
           <dep package="at-spi2-atk"/>
+          <dep package="weston"/>
       </if>
       <if condition-set="macos">
           <dep package="gsettings-desktop-schemas"/>
@@ -67,8 +68,12 @@
       href=""
   <repository type="git" name="freedesktop-git"
       href=""
+ <repository type="tarball" name="dri.freedesktop.org"
+      href=""
   <repository type="tarball" name="people.freedesktop.org"
       href=""
+  <repository type="tarball" name="wayland.freedesktop.org"
+      href=""
   <repository type="tarball" name="llvm.org"
       href=""
   <repository type="tarball" name="webkitgtk-jhbuild-mirror"
@@ -182,6 +187,7 @@
       <dep package="atk"/>
       <if condition-set="linux">
         <dep package="at-spi2-atk"/>
+        <dep package="wayland"/>
       </if>
       <dep package="gdk-pixbuf"/>
       <dep package="pango"/>
@@ -414,9 +420,40 @@
             hash="sha256:abb6e1cc9213a9915a121f48576ff6739a0b8cdb3d32796f9a7743c9a6efc871"
             md5sum="80d140f631d862b76dc67ae983151c77">
       <patch file="xserver-remove-bogus-dependencies.patch" strip="1"/>
+      <patch file="xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch" strip="1"/>
     </branch>
   </autotools>
 
+  <autotools id="wayland" autogenargs="--disable-documentation">
+    <pkg-config>wayland-server.pc</pkg-config>
+    <dependencies>
+      <dep package="libffi"/>
+    </dependencies>
+    <branch module="releases/wayland-1.8.1.tar.xz"
+            version="1.8.1"
+            repo="wayland.freedesktop.org"
+            hash="sha256:f17c938d1c24fd0a10f650a623a2775d329db3168b5732e498b08388ec776fc8"
+            md5sum="6e877877c3e04cfb865cfcd0733c9ab1">
+    </branch>
+  </autotools>
+
+  <autotools id="weston" autogenargs="--enable-x11-compositor --disable-rpi-compositor --disable-fbdev-compositor --disable-setuid-install --disable-ivi-shell --disable-weston-launch --with-cairo=gl">
+    <pkg-config>weston.pc</pkg-config>
+    <dependencies>
+      <dep package="wayland"/>
+      <dep package="libdrm"/>
+      <dep package="xserver"/>
+      <dep package="cairo"/>
+      <dep package="libinput"/>
+    </dependencies>
+    <branch module="releases/weston-1.8.0.tar.xz"
+            version="1.8.0"
+            repo="wayland.freedesktop.org"
+            hash="sha256:8963e69f328e815cec42c58046c4af721476c7541bb7d9edc71740fada5ad312"
+            md5sum="24cb8a7ed0535b4fc3642643988dab36">
+    </branch>
+  </autotools>
+
   <autotools id="gtk-doc" autogen-sh="configure">
     <if condition-set="macos">
       <autogenargs value="--with-xml-catalog=/usr/local/etc/xml/catalog"/>
@@ -429,7 +466,16 @@
             hash="sha256:3e6ecf134dbf92a74c24d79848fea3a48e59ab95408a38c6405905d95a293011"/>
   </autotools>
 
-  <autotools id="mesa" autogenargs="--enable-xlib-glx --disable-dri --disable-egl --with-gallium-drivers=swrast" skip-install="true">
+  <autotools id="libdrm" autogen-sh="configure">
+    <pkg-config>libdrm.pc</pkg-config>
+    <branch module="/libdrm/libdrm-2.4.65.tar.bz2" version="2.4.65"
+            repo="dri.freedesktop.org"
+            hash="sha256:71960ac8bde7d710992b1bc8879935e8300a870c36bd06f22412d0447e3d96c4"/>
+  </autotools>
+
+  <autotools id="mesa"
+    autogen-template="%(srcdir)s/%(autogen-sh)s --prefix %(prefix)s/softGL %(autogenargs)s"
+    autogenargs="--disable-dri3 --enable-dri --enable-glx --enable-egl --with-egl-platforms=x11,wayland --with-dri-drivers=swrast --with-gallium-drivers=swrast">
     <!--- WARNING: At jhbuildrc, when we define the path to the Gallium llvmpipe software rasterizer (needed by XvfbDriver),
           we assume that the directory is named "Mesa". So, don't change the checkoutdir name even if you update the version.  -->
     <branch module="/~brianp/mesa/11.0.6/mesa-11.0.6.tar.xz" version="11.0.6"
@@ -439,6 +485,8 @@
     </branch>
     <dependencies>
       <dep package="llvm"/>
+      <dep package="libdrm"/>
+      <dep package="wayland"/>
     </dependencies>
   </autotools>
 
@@ -525,4 +573,16 @@
     </branch>
   </autotools>
 
+  <!-- libinput is only included because the version of libinput shipped with Debian Jessie
+    os too old for building Weston 1.8. This may be removed after Debian Strech is released -->
+  <autotools id="libinput" autogen-sh="configure"  autogenargs="--disable-libwacom --disable-tests --disable-documentation">
+    <pkg-config>libinput.pc</pkg-config>
+    <branch module="software/libinput/libinput-1.2.4.tar.xz"
+            version="1.2.4"
+            repo="freedesktop.org"
+            hash="sha256:aee3650ad2a864ab9a10e7e63df543cc2b475f6bf3974751037a2df325dabbb1"
+            md5sum="1cbaa34f04a336f2703906d564e0a37a">
+    </branch>
+  </autotools>
+
 </moduleset>

Modified: trunk/Tools/gtk/jhbuildrc (202618 => 202619)


--- trunk/Tools/gtk/jhbuildrc	2016-06-29 10:28:27 UTC (rev 202618)
+++ trunk/Tools/gtk/jhbuildrc	2016-06-29 10:31:40 UTC (rev 202619)
@@ -34,7 +34,8 @@
 # for a module, so we do it here globally since it's a good idea for all other modules as well.
 buildroot = os.path.join(os.path.dirname(checkoutroot), "Build")
 
-os.environ['LLVMPIPE_LIBGL_PATH'] = os.path.abspath(os.path.join(buildroot, 'Mesa', 'lib', 'gallium'))
+# For the layout tests: path where llvmpipe/software-only mesa libraries are installed.
+os.environ['LLVMPIPE_LIBGL_PATH'] = os.path.abspath(os.path.join(prefix, 'softGL', 'lib'))
 
 os.environ['CFLAGS'] = '-Wno-error'
 os.environ['CXXFLAGS'] = '-Wno-error'

Added: trunk/Tools/gtk/patches/xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch (0 => 202619)


--- trunk/Tools/gtk/patches/xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch	                        (rev 0)
+++ trunk/Tools/gtk/patches/xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch	2016-06-29 10:31:40 UTC (rev 202619)
@@ -0,0 +1,84 @@
+From fcbd29debee422bcb147057a089fd1da5e699656 Mon Sep 17 00:00:00 2001
+From: Carlos Alberto Lopez Perez <[email protected]>
+Date: Wed, 23 Mar 2016 03:47:58 +0100
+Subject: [PATCH xserver] Search for DRI drivers at LIBGL_DRIVERS_PATH
+ environment variable.
+
+  * The Mesa driver uses this environment variable to override the
+    default compiled search path for DRI drivers.
+
+  * This is useful for testing purposes when the user needs to
+    override the system default one at runtime.
+---
+ glx/glxdricommon.c | 40 ++++++++++++++++++++++++++++++----------
+ 1 file changed, 30 insertions(+), 10 deletions(-)
+
+diff --git a/glx/glxdricommon.c b/glx/glxdricommon.c
+index 62cce13..543f631 100644
+--- a/glx/glxdricommon.c
++++ b/glx/glxdricommon.c
+@@ -246,8 +246,6 @@ glxConvertConfigs(const __DRIcoreExtension * core,
+     return head.next;
+ }
+ 
+-static const char dri_driver_path[] = DRI_DRIVER_PATH;
+-
+ /* Temporary define to allow building without a dri_interface.h from
+  * updated Mesa.  Some day when we don't care about Mesa that old any
+  * more this can be removed.
+@@ -261,22 +259,44 @@ glxProbeDriver(const char *driverName,
+                void **coreExt, const char *coreName, int coreVersion,
+                void **renderExt, const char *renderName, int renderVersion)
+ {
+-    int i;
++    int i, len;
+     void *driver;
+     char filename[PATH_MAX];
+     char *get_extensions_name;
+     const __DRIextension **extensions = NULL;
++    const char *dri_driver_path, *p, *next;
+ 
+-    snprintf(filename, sizeof filename, "%s/%s_dri.so",
+-             dri_driver_path, driverName);
++    dri_driver_path = getenv("LIBGL_DRIVERS_PATH");
++
++    if (dri_driver_path == NULL)
++        dri_driver_path = DRI_DRIVER_PATH;
++
++    for (p = dri_driver_path; *p; p = next) {
++        next = strchr(p, ':');
++        if (next == NULL) {
++            len = strlen(p);
++            next = p + len;
++        }
++        else {
++            len = next - p;
++            next++;
++        }
++
++        snprintf(filename, sizeof filename, "%.*s/%s_dri.so",
++                len, p, driverName);
++
++        driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
++        if (driver == NULL)
++            LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n",
++                    filename, dlerror());
++        else
++            break;
+ 
+-    driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
+-    if (driver == NULL) {
+-        LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n",
+-                   filename, dlerror());
+-        goto cleanup_failure;
+     }
+ 
++    if (driver == NULL)
++        goto cleanup_failure;
++
+     if (asprintf(&get_extensions_name, "%s_%s",
+                  __DRI_DRIVER_GET_EXTENSIONS, driverName) != -1) {
+         const __DRIextension **(*get_extensions)(void);
+-- 
+2.1.4
+
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to