Changeset 202619 in webkit
- Timestamp:
- Jun 29, 2016 3:31:40 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202617 r202619 1 2016-06-29 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 3 [GTK][Wayland] Implement support for running the layout tests under a (virtualized) Wayland environment. 4 https://bugs.webkit.org/show_bug.cgi?id=156716 5 6 Reviewed by Carlos Garcia Campos and Michael Catanzaro. 7 8 * platform/gtk-wayland/TestExpectations: Added. Add initial Wayland specific test expectations. 9 1 10 2016-06-29 David Kilzer <ddkilzer@apple.com> 2 11 -
trunk/Tools/ChangeLog
r202618 r202619 1 2016-06-29 Carlos Alberto Lopez Perez <clopez@igalia.com> 2 3 [GTK][Wayland] Implement support for running the layout tests under a (virtualized) Wayland environment. 4 https://bugs.webkit.org/show_bug.cgi?id=156716 5 6 Reviewed by Carlos Garcia Campos and Michael Catanzaro. 7 8 * Scripts/webkitpy/layout_tests/run_webkit_tests.py: Allow to run the layout tests on Wayland by passing --wayland 9 (parse_args): 10 * Scripts/webkitpy/port/gtk.py: 11 (GtkPort.__init__): 12 (GtkPort._driver_class): 13 (GtkPort.setup_environ_for_server): Set the softgl renderer (now with EGL support) for the wayland tests. 14 (GtkPort._search_paths): When running inside the wayland environment, use ${port}-wayland as an additional 15 platform directory for storing the wayland specific layout test results and expectations for ${port}. 16 For example, the file LayoutTests/platform/gtk-wayland/TestExpectations will be used as the most specific 17 test expectations file on the GTK port when running the tests with the --wayland command line switch. 18 Baseline search path: gtk-wayland -> gtk -> wk2 -> generic. 19 * Scripts/webkitpy/port/westondriver.py: Run the weston display server inside Xvfb. 20 (WestonDriver.check_driver): 21 (WestonDriver.__init__): 22 (WestonDriver._start): 23 * Scripts/webkitpy/port/westondriver_unittest.py: Fix unittests for the new Weston inside Xvfb driver. 24 (WestonXvfbDriverDisplayTest): 25 (WestonXvfbDriverDisplayTest.__init__): 26 (WestonXvfbDriverDisplayTest._xvfb_run): 27 (WestonDriverTest.make_driver): 28 (WestonDriverTest.test_start): 29 * gtk/install-dependencies: Add the new dependencies that are required for either building weston, 30 or to satisfy the pkg-config check of the new added modules in JHBuild. 31 * gtk/jhbuild.modules: For building weston new enough on Debian Jessie we also need to build wayland 32 and libinput. Declare a pkg-config entry on all this modules to avoid building them if the ones 33 provided by the system are already new enough. 34 Switch the Mesa software rasterizer from a Xlib based GLX renderer to a DRI based EGL/GLX one. 35 It was the only way to get the software EGL rasterizer working without depending on user drivers. 36 Due to this the Mesa build now depends on a modern enough libdrm, so we also use JHBuild pkg-config 37 feature to avoid building libdrm when the one provided by the system is new enough. 38 * gtk/jhbuildrc: 39 * gtk/patches/xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch: Added. 40 Xorg had no support for searching the DRI drivers on a custom path at runtime. 41 This patch implements support for that reusing the same variable that we use with Mesa to set the 42 custom path for the DRI drivers path. 43 1 44 2016-06-29 Alejandro G. Castro <alex@igalia.com> 2 45 -
trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
r184382 r202619 283 283 help="Output per-test profile information, using the specified profiler."), 284 284 optparse.make_option("--no-timeout", action="store_true", default=False, help="Disable test timeouts"), 285 optparse.make_option("--wayland", action="store_true", default=False, 286 help="Run the layout tests inside a (virtualized) weston compositor (GTK only)."), 285 287 ])) 286 288 -
trunk/Tools/Scripts/webkitpy/port/gtk.py
r202362 r202619 53 53 super(GtkPort, self).__init__(*args, **kwargs) 54 54 self._pulseaudio_sanitizer = PulseAudioSanitizer() 55 self._wayland = self.get_option("wayland") 55 56 56 57 if self.get_option("leaks"): … … 77 78 @memoized 78 79 def _driver_class(self): 79 if os.environ.get("WAYLAND_DISPLAY"):80 if self._wayland: 80 81 return WestonDriver 81 82 if os.environ.get("USE_NATIVE_XDISPLAY"): … … 119 120 environment['OWR_USE_TEST_SOURCES'] = '1' 120 121 self._copy_value_from_environ_if_set(environment, 'WEBKIT_OUTPUTDIR') 121 if self._driver_class() == XvfbDriver and self._should_use_jhbuild(): 122 # Configure the software libgl renderer if jhbuild ready and we test inside a virtualized window system 123 if self._driver_class() in [XvfbDriver, WestonDriver] and self._should_use_jhbuild(): 122 124 llvmpipe_libgl_path = self.host.executive.run_command(self._jhbuild_wrapper + ['printenv', 'LLVMPIPE_LIBGL_PATH'], 123 125 error_handler=self.host.executive.ignore_error).strip() 124 if os.path.exists(os.path.join(llvmpipe_libgl_path, "libGL.so")): 126 dri_libgl_path = os.path.join(llvmpipe_libgl_path, "dri") 127 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")): 125 128 # Force the Gallium llvmpipe software rasterizer 129 environment['LIBGL_ALWAYS_SOFTWARE'] = "1" 130 environment['LIBGL_DRIVERS_PATH'] = dri_libgl_path 126 131 environment['LD_LIBRARY_PATH'] = llvmpipe_libgl_path 127 132 if os.environ.get('LD_LIBRARY_PATH'): … … 181 186 def _search_paths(self): 182 187 search_paths = [] 188 if self._wayland: 189 search_paths.append(self.port_name + "-wayland") 183 190 search_paths.append(self.port_name) 184 191 search_paths.append('wk2') -
trunk/Tools/Scripts/webkitpy/port/westondriver.py
r153439 r202619 34 34 from webkitpy.port.server_process import ServerProcess 35 35 from webkitpy.port.driver import Driver 36 from webkitpy.port.xvfbdriver import XvfbDriver 36 37 37 38 _log = logging.getLogger(__name__) … … 41 42 @staticmethod 42 43 def check_driver(port): 43 weston_found = port.host.executive.run_command(['which', 'weston'], return_exit_code=True) is 0 44 weston_findcmd = ['which', 'weston'] 45 if port._should_use_jhbuild(): 46 weston_findcmd = port._jhbuild_wrapper + weston_findcmd 47 weston_found = port.host.executive.run_command(weston_findcmd, return_exit_code=True) is 0 44 48 if not weston_found: 45 49 _log.error("No weston found. Cannot run layout tests.") … … 49 53 Driver.__init__(self, *args, **kwargs) 50 54 self._startup_delay_secs = 1.0 55 self._xvfbdriver = XvfbDriver(*args, **kwargs) 51 56 52 57 def _start(self, pixel_tests, per_test_args): … … 54 59 55 60 driver_name = self._port.driver_name() 61 56 62 self._driver_directory = self._port.host.filesystem.mkdtemp(prefix='%s-' % driver_name) 57 63 64 driver_environment = self._port.setup_environ_for_server(driver_name) 65 driver_environment['DISPLAY'] = ":%d" % self._xvfbdriver._xvfb_run(driver_environment) 66 58 67 weston_socket = 'WKTesting-weston-%032x' % random.getrandbits(128) 59 weston_command = ['weston', '--socket=%s' % weston_socket, '--width=800', '--height=600'] 68 weston_command = ['weston', '--socket=%s' % weston_socket, '--width=1024', '--height=768', '--use-pixman'] 69 if self._port._should_use_jhbuild(): 70 weston_command = self._port._jhbuild_wrapper + weston_command 60 71 with open(os.devnull, 'w') as devnull: 61 self._weston_process = self._port.host.executive.popen(weston_command, stderr=devnull )72 self._weston_process = self._port.host.executive.popen(weston_command, stderr=devnull, env=driver_environment) 62 73 63 74 # Give Weston a bit of time to set itself up. 64 75 time.sleep(self._startup_delay_secs) 65 76 66 driver_environment = self._port.setup_environ_for_server(driver_name)67 77 driver_environment['LOCAL_RESOURCE_ROOT'] = self._port.layout_tests_dir() 68 78 -
trunk/Tools/Scripts/webkitpy/port/westondriver_unittest.py
r174136 r202619 42 42 43 43 44 class WestonXvfbDriverDisplayTest(): 45 def __init__(self, expected_xvfbdisplay): 46 self._expected_xvfbdisplay = expected_xvfbdisplay 47 48 def _xvfb_run(self, environment): 49 return self._expected_xvfbdisplay 50 51 44 52 class WestonDriverTest(unittest.TestCase): 45 53 def make_driver(self, filesystem=None): … … 50 58 driver = WestonDriver(port, worker_number=0, pixel_tests=True) 51 59 driver._startup_delay_secs = 0 60 driver._expected_xvfbdisplay = 23 61 driver._xvfbdriver = WestonXvfbDriverDisplayTest(driver._expected_xvfbdisplay) 62 driver._environment = port.setup_environ_for_server(port.driver_name()) 52 63 return driver 53 64 … … 60 71 _, _, logs = output_capture.restore_output() 61 72 62 self.assertTrue(re.match(r"MOCK popen: \['weston', '--socket=WKTesting-weston-[0-9a-f]{32}', '--width= 800', '--height=600'\]\n", logs), None)73 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) 63 74 self.assertTrue(re.match(r"WKTesting-weston-[0-9a-f]{32}", driver._server_process.env['WAYLAND_DISPLAY'])) 75 self.assertFalse('DISPLAY' in driver._server_process.env) 76 self.assertTrue("'DISPLAY': ':%s'" % driver._expected_xvfbdisplay in logs) 64 77 self.assertEqual(driver._server_process.env['GDK_BACKEND'], 'wayland') 65 78 self.assertTrue(driver._server_process.started) -
trunk/Tools/gtk/install-dependencies
r202392 r202619 144 144 ruby-json \ 145 145 ruby-highline \ 146 weston \ 146 147 xvfb" 147 148 … … 152 153 icon-naming-utils \ 153 154 libcroco3-dev \ 155 libdrm-dev \ 154 156 libegl1-mesa-dev \ 155 157 libepoxy-dev \ 158 libevdev-dev \ 159 libexpat1-dev \ 160 libgbm-dev \ 156 161 libgcrypt11-dev \ 157 162 libgpg-error-dev \ 158 163 libjson-glib-dev \ 164 libinput-dev \ 165 libmtdev-dev \ 159 166 liborc-0.4-dev \ 160 167 libp11-kit-dev \ … … 163 170 libtiff5-dev \ 164 171 libv4l-dev \ 172 libxcb-composite0-dev \ 165 173 libxcb-xfixes0-dev \ 166 174 libxfont-dev \ 167 175 libxkbfile-dev \ 168 176 libtool-bin \ 177 libudev-dev \ 169 178 llvm \ 170 179 llvm-dev \ … … 279 288 ruby \ 280 289 ruby-highline \ 290 weston \ 281 291 xorg-server-xvfb" 282 292 … … 284 294 # Note: Could not find libegl-mesa 285 295 packages="$packages \ 296 expat \ 286 297 git \ 287 298 gobject-introspection \ 288 299 icon-naming-utils \ 289 300 libcroco \ 301 libdrm \ 290 302 libepoxy \ 303 libevdev \ 291 304 libgcrypt \ 292 305 libgpg-error \ 306 libinput \ 293 307 p11-kit \ 294 308 libpciaccess \ … … 296 310 libxfixes \ 297 311 libxfont \ 312 libxcb \ 298 313 libxkbfile \ 299 314 llvm \ 315 mtdev \ 300 316 python2 \ 301 317 python2-lxml \ … … 397 413 rubygem-json \ 398 414 rubygem-highline \ 415 weston-devel \ 399 416 xorg-x11-server-Xvfb" 400 417 401 418 # These are dependencies necessary for building the jhbuild. 402 419 packages="$packages \ 420 expat-devel \ 403 421 docbook-utils \ 404 422 docbook-utils-pdf \ … … 409 427 libXfont-devel \ 410 428 libcroco-devel \ 429 libdrm-devel \ 411 430 libepoxy-devel \ 431 libevdev-devel 412 432 libgcrypt-devel \ 413 433 libgpg-error-devel \ 434 libinput-devel \ 414 435 libp11-devel \ 415 436 libpciaccess-devel \ 416 437 libtiff-devel \ 438 libxcb-devel \ 417 439 libxkbfile-devel \ 418 440 mesa-libEGL-devel \ 441 mtdev-devel \ 419 442 ragel \ 443 systemd-devel \ 420 444 xorg-x11-font-utils \ 421 445 xorg-x11-proto-devel \ -
trunk/Tools/gtk/jhbuild.modules
r202618 r202619 38 38 <dep package="at-spi2-core"/> 39 39 <dep package="at-spi2-atk"/> 40 <dep package="weston"/> 40 41 </if> 41 42 <if condition-set="macos"> … … 68 69 <repository type="git" name="freedesktop-git" 69 70 href="http://anongit.freedesktop.org/git"/> 71 <repository type="tarball" name="dri.freedesktop.org" 72 href="http://dri.freedesktop.org"/> 70 73 <repository type="tarball" name="people.freedesktop.org" 71 74 href="http://people.freedesktop.org"/> 75 <repository type="tarball" name="wayland.freedesktop.org" 76 href="http://wayland.freedesktop.org"/> 72 77 <repository type="tarball" name="llvm.org" 73 78 href="http://llvm.org"/> … … 183 188 <if condition-set="linux"> 184 189 <dep package="at-spi2-atk"/> 190 <dep package="wayland"/> 185 191 </if> 186 192 <dep package="gdk-pixbuf"/> … … 415 421 md5sum="80d140f631d862b76dc67ae983151c77"> 416 422 <patch file="xserver-remove-bogus-dependencies.patch" strip="1"/> 423 <patch file="xserver-search-for-DRI-drivers-at-LIBGL_DRIVERS_PATH-environ.patch" strip="1"/> 424 </branch> 425 </autotools> 426 427 <autotools id="wayland" autogenargs="--disable-documentation"> 428 <pkg-config>wayland-server.pc</pkg-config> 429 <dependencies> 430 <dep package="libffi"/> 431 </dependencies> 432 <branch module="releases/wayland-1.8.1.tar.xz" 433 version="1.8.1" 434 repo="wayland.freedesktop.org" 435 hash="sha256:f17c938d1c24fd0a10f650a623a2775d329db3168b5732e498b08388ec776fc8" 436 md5sum="6e877877c3e04cfb865cfcd0733c9ab1"> 437 </branch> 438 </autotools> 439 440 <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"> 441 <pkg-config>weston.pc</pkg-config> 442 <dependencies> 443 <dep package="wayland"/> 444 <dep package="libdrm"/> 445 <dep package="xserver"/> 446 <dep package="cairo"/> 447 <dep package="libinput"/> 448 </dependencies> 449 <branch module="releases/weston-1.8.0.tar.xz" 450 version="1.8.0" 451 repo="wayland.freedesktop.org" 452 hash="sha256:8963e69f328e815cec42c58046c4af721476c7541bb7d9edc71740fada5ad312" 453 md5sum="24cb8a7ed0535b4fc3642643988dab36"> 417 454 </branch> 418 455 </autotools> … … 430 467 </autotools> 431 468 432 <autotools id="mesa" autogenargs="--enable-xlib-glx --disable-dri --disable-egl --with-gallium-drivers=swrast" skip-install="true"> 469 <autotools id="libdrm" autogen-sh="configure"> 470 <pkg-config>libdrm.pc</pkg-config> 471 <branch module="/libdrm/libdrm-2.4.65.tar.bz2" version="2.4.65" 472 repo="dri.freedesktop.org" 473 hash="sha256:71960ac8bde7d710992b1bc8879935e8300a870c36bd06f22412d0447e3d96c4"/> 474 </autotools> 475 476 <autotools id="mesa" 477 autogen-template="%(srcdir)s/%(autogen-sh)s --prefix %(prefix)s/softGL %(autogenargs)s" 478 autogenargs="--disable-dri3 --enable-dri --enable-glx --enable-egl --with-egl-platforms=x11,wayland --with-dri-drivers=swrast --with-gallium-drivers=swrast"> 433 479 <!--- WARNING: At jhbuildrc, when we define the path to the Gallium llvmpipe software rasterizer (needed by XvfbDriver), 434 480 we assume that the directory is named "Mesa". So, don't change the checkoutdir name even if you update the version. --> … … 440 486 <dependencies> 441 487 <dep package="llvm"/> 488 <dep package="libdrm"/> 489 <dep package="wayland"/> 442 490 </dependencies> 443 491 </autotools> … … 526 574 </autotools> 527 575 576 <!-- libinput is only included because the version of libinput shipped with Debian Jessie 577 os too old for building Weston 1.8. This may be removed after Debian Strech is released --> 578 <autotools id="libinput" autogen-sh="configure" autogenargs="--disable-libwacom --disable-tests --disable-documentation"> 579 <pkg-config>libinput.pc</pkg-config> 580 <branch module="software/libinput/libinput-1.2.4.tar.xz" 581 version="1.2.4" 582 repo="freedesktop.org" 583 hash="sha256:aee3650ad2a864ab9a10e7e63df543cc2b475f6bf3974751037a2df325dabbb1" 584 md5sum="1cbaa34f04a336f2703906d564e0a37a"> 585 </branch> 586 </autotools> 587 528 588 </moduleset> -
trunk/Tools/gtk/jhbuildrc
r197713 r202619 35 35 buildroot = os.path.join(os.path.dirname(checkoutroot), "Build") 36 36 37 os.environ['LLVMPIPE_LIBGL_PATH'] = os.path.abspath(os.path.join(buildroot, 'Mesa', 'lib', 'gallium')) 37 # For the layout tests: path where llvmpipe/software-only mesa libraries are installed. 38 os.environ['LLVMPIPE_LIBGL_PATH'] = os.path.abspath(os.path.join(prefix, 'softGL', 'lib')) 38 39 39 40 os.environ['CFLAGS'] = '-Wno-error'
Note: See TracChangeset
for help on using the changeset viewer.