Title: [252058] trunk/Tools
Revision
252058
Author
[email protected]
Date
2019-11-05 09:25:57 -0800 (Tue, 05 Nov 2019)

Log Message

webkitpy: Build ImageDiff if it is missing (Follow-fix)
https://bugs.webkit.org/show_bug.cgi?id=183422

Unreviewed infrastructure fix.

* Scripts/webkitpy/port/base.py:
(Port._path_to_image_diff): Use the host build directory.
* Scripts/webkitpy/port/config.py:
(Config.build_directory): Allow the caller to ignore the port argument, which will return the default
build directory for the host running the script.
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.make_port):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (252057 => 252058)


--- trunk/Tools/ChangeLog	2019-11-05 17:13:00 UTC (rev 252057)
+++ trunk/Tools/ChangeLog	2019-11-05 17:25:57 UTC (rev 252058)
@@ -1,3 +1,18 @@
+2019-11-05  Jonathan Bedard  <[email protected]>
+
+        webkitpy: Build ImageDiff if it is missing (Follow-fix)
+        https://bugs.webkit.org/show_bug.cgi?id=183422
+
+        Unreviewed infrastructure fix.
+
+        * Scripts/webkitpy/port/base.py:
+        (Port._path_to_image_diff): Use the host build directory.
+        * Scripts/webkitpy/port/config.py:
+        (Config.build_directory): Allow the caller to ignore the port argument, which will return the default
+        build directory for the host running the script.
+        * Scripts/webkitpy/port/port_testcase.py:
+        (PortTestCase.make_port):
+
 2019-11-05  Chris Lord  <[email protected]>
 
         [WPE] WebKit.NewFirstVisuallyNonEmptyLayout* unexpected pass

Modified: trunk/Tools/Scripts/webkitpy/port/base.py (252057 => 252058)


--- trunk/Tools/Scripts/webkitpy/port/base.py	2019-11-05 17:13:00 UTC (rev 252057)
+++ trunk/Tools/Scripts/webkitpy/port/base.py	2019-11-05 17:25:57 UTC (rev 252058)
@@ -1376,7 +1376,7 @@
         default_image_diff = self._path_to_default_image_diff()
         if self._filesystem.exists(default_image_diff):
             return default_image_diff
-        built_image_diff = self._filesystem.join(self._config.build_directory(self.get_option('configuration')), 'ImageDiff')
+        built_image_diff = self._filesystem.join(self._config.build_directory(self.get_option('configuration'), for_host=True), 'ImageDiff')
         _log.debug('ImageDiff not found at {}, using {} instead'.format(default_image_diff, built_image_diff))
         return built_image_diff
 

Modified: trunk/Tools/Scripts/webkitpy/port/config.py (252057 => 252058)


--- trunk/Tools/Scripts/webkitpy/port/config.py	2019-11-05 17:13:00 UTC (rev 252057)
+++ trunk/Tools/Scripts/webkitpy/port/config.py	2019-11-05 17:25:57 UTC (rev 252058)
@@ -79,7 +79,7 @@
         self._build_directories = {}
         self._port_implementation = port_implementation
 
-    def build_directory(self, configuration):
+    def build_directory(self, configuration, for_host=False):
         """Returns the path to the build directory for the configuration."""
         if configuration:
             flags = ["--configuration", self.flag_for_configuration(configuration)]
@@ -87,7 +87,7 @@
             configuration = ""
             flags = []
 
-        if self._port_implementation:
+        if self._port_implementation and not for_host:
             flags.append('--' + self._port_implementation)
 
         if not self._build_directories.get(configuration):

Modified: trunk/Tools/Scripts/webkitpy/port/port_testcase.py (252057 => 252058)


--- trunk/Tools/Scripts/webkitpy/port/port_testcase.py	2019-11-05 17:13:00 UTC (rev 252057)
+++ trunk/Tools/Scripts/webkitpy/port/port_testcase.py	2019-11-05 17:25:57 UTC (rev 252058)
@@ -120,7 +120,7 @@
         port_name = port_name or self.port_name
         port_name = self.port_maker.determine_full_port_name(host, options, port_name)
         port = self.port_maker(host, port_name, options=options, **kwargs)
-        port._config.build_directory = lambda configuration: '/mock-build'
+        port._config.build_directory = lambda configuration, for_host=False: '/mock-build'
         return port
 
     def test_default_timeout_ms(self):
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to