Title: [263261] trunk/Tools
Revision
263261
Author
[email protected]
Date
2020-06-19 06:18:21 -0700 (Fri, 19 Jun 2020)

Log Message

[webkitpy][WPE] Default to headless if _display_server is xfvb
https://bugs.webkit.org/show_bug.cgi?id=213327

Reviewed by Philippe Normand.

Xvfb is used as the default display server for some scripts, and the
equivalent for WPE is the headless one.

WTR and the API tests already create only HeadlessViewBackends, but the
WebDriver tests create them through MiniBrowser, which requires the
'--headless' parameter.

* Scripts/run-webdriver-tests: Do not override _display_server
* Scripts/webkitpy/port/base.py:
(Port.__init__): Define _display_server for all ports to avoid
eventually needing to override it.
* Scripts/webkitpy/port/wpe.py:
(WPEPort.__init__): Default to 'headless' if _display_server is 'xvfb'
* Scripts/webkitpy/w3c/wpt_runner.py:
(main): Dot not override _display_server

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (263260 => 263261)


--- trunk/Tools/ChangeLog	2020-06-19 12:43:03 UTC (rev 263260)
+++ trunk/Tools/ChangeLog	2020-06-19 13:18:21 UTC (rev 263261)
@@ -1,3 +1,26 @@
+2020-06-19  Lauro Moura  <[email protected]>
+
+        [webkitpy][WPE] Default to headless if _display_server is xfvb
+        https://bugs.webkit.org/show_bug.cgi?id=213327
+
+        Reviewed by Philippe Normand.
+
+        Xvfb is used as the default display server for some scripts, and the
+        equivalent for WPE is the headless one.
+
+        WTR and the API tests already create only HeadlessViewBackends, but the
+        WebDriver tests create them through MiniBrowser, which requires the
+        '--headless' parameter.
+
+        * Scripts/run-webdriver-tests: Do not override _display_server
+        * Scripts/webkitpy/port/base.py:
+        (Port.__init__): Define _display_server for all ports to avoid
+        eventually needing to override it.
+        * Scripts/webkitpy/port/wpe.py:
+        (WPEPort.__init__): Default to 'headless' if _display_server is 'xvfb'
+        * Scripts/webkitpy/w3c/wpt_runner.py:
+        (main): Dot not override _display_server
+
 2020-06-19  Carlos Garcia Campos  <[email protected]>
 
         Add support for fetching registrable domains with resource load statistics

Modified: trunk/Tools/Scripts/run-webdriver-tests (263260 => 263261)


--- trunk/Tools/Scripts/run-webdriver-tests	2020-06-19 12:43:03 UTC (rev 263260)
+++ trunk/Tools/Scripts/run-webdriver-tests	2020-06-19 13:18:21 UTC (rev 263261)
@@ -81,7 +81,6 @@
             print '*** Run update-webkitgtk-libs or update-webkit-flatpak before build-webkit to ensure proper testing..'
             print '***'
 
-port._display_server = options.display_server
 runner = WebDriverTestRunner(port)
 runner.run(args)
 runner.teardown()

Modified: trunk/Tools/Scripts/webkitpy/port/base.py (263260 => 263261)


--- trunk/Tools/Scripts/webkitpy/port/base.py	2020-06-19 12:43:03 UTC (rev 263260)
+++ trunk/Tools/Scripts/webkitpy/port/base.py	2020-06-19 13:18:21 UTC (rev 263261)
@@ -143,6 +143,7 @@
         self._jhbuild_wrapper = []
         self._layout_tests_dir = hasattr(options, 'layout_tests_dir') and options.layout_tests_dir and self._filesystem.abspath(options.layout_tests_dir)
         self._w3c_resource_files = None
+        self._display_server = None
 
     def target_host(self, worker_number=None):
         return self.host

Modified: trunk/Tools/Scripts/webkitpy/port/wpe.py (263260 => 263261)


--- trunk/Tools/Scripts/webkitpy/port/wpe.py	2020-06-19 12:43:03 UTC (rev 263260)
+++ trunk/Tools/Scripts/webkitpy/port/wpe.py	2020-06-19 13:18:21 UTC (rev 263261)
@@ -42,6 +42,9 @@
         super(WPEPort, self).__init__(*args, **kwargs)
 
         self._display_server = self.get_option("display_server")
+        if self._display_server == 'xvfb':
+            # While not supported by WPE, xvfb is used as the default value in the main scripts
+            self._display_server = 'headless'
         if self._should_use_jhbuild():
             self._jhbuild_wrapper = [self.path_from_webkit_base('Tools', 'jhbuild', 'jhbuild-wrapper'), '--wpe', 'run']
             self.set_option_default('wrapper', ' '.join(self._jhbuild_wrapper))

Modified: trunk/Tools/Scripts/webkitpy/w3c/wpt_runner.py (263260 => 263261)


--- trunk/Tools/Scripts/webkitpy/w3c/wpt_runner.py	2020-06-19 12:43:03 UTC (rev 263260)
+++ trunk/Tools/Scripts/webkitpy/w3c/wpt_runner.py	2020-06-19 13:18:21 UTC (rev 263261)
@@ -78,7 +78,6 @@
             _log.warning('jhbuild environment not present. Run update-webkitgtk-libs before build-webkit to ensure proper testing.')
 
     # Create the Port-specific driver.
-    port._display_server = options.display_server
     display_driver = port.create_driver(worker_number=0, no_timeout=True)._make_driver(pixel_tests=False)
     if not display_driver.check_driver(port):
         raise RuntimeError("Failed to check driver %s" % display_driver.__class__.__name__)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to