Title: [252663] branches/safari-608-branch/Tools
Revision
252663
Author
[email protected]
Date
2019-11-19 17:24:45 -0800 (Tue, 19 Nov 2019)

Log Message

Cherry-pick r252058. rdar://problem/56889868

    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):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252058 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-608-branch/Tools/ChangeLog (252662 => 252663)


--- branches/safari-608-branch/Tools/ChangeLog	2019-11-20 01:24:40 UTC (rev 252662)
+++ branches/safari-608-branch/Tools/ChangeLog	2019-11-20 01:24:45 UTC (rev 252663)
@@ -1,5 +1,39 @@
 2019-11-19  Alan Coon  <[email protected]>
 
+        Cherry-pick r252058. rdar://problem/56889868
+
+    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):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252058 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-19  Alan Coon  <[email protected]>
+
         Cherry-pick r249652. rdar://problem/55190632
 
     run-webkit-tests: Report results archive to results.webkit.org

Modified: branches/safari-608-branch/Tools/Scripts/webkitpy/port/base.py (252662 => 252663)


--- branches/safari-608-branch/Tools/Scripts/webkitpy/port/base.py	2019-11-20 01:24:40 UTC (rev 252662)
+++ branches/safari-608-branch/Tools/Scripts/webkitpy/port/base.py	2019-11-20 01:24:45 UTC (rev 252663)
@@ -1385,7 +1385,12 @@
         """Returns the full path to the image_diff binary, or None if it is not available.
 
         This is likely used only by diff_image()"""
-        return self._build_path('ImageDiff')
+        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'), for_host=True), 'ImageDiff')
+        _log.debug('ImageDiff not found at {}, using {} instead'.format(default_image_diff, built_image_diff))
+        return built_image_diff
 
     API_TEST_BINARY_NAMES = ['TestWTF', 'TestWebKitAPI']
 

Modified: branches/safari-608-branch/Tools/Scripts/webkitpy/port/config.py (252662 => 252663)


--- branches/safari-608-branch/Tools/Scripts/webkitpy/port/config.py	2019-11-20 01:24:40 UTC (rev 252662)
+++ branches/safari-608-branch/Tools/Scripts/webkitpy/port/config.py	2019-11-20 01:24:45 UTC (rev 252663)
@@ -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: branches/safari-608-branch/Tools/Scripts/webkitpy/port/port_testcase.py (252662 => 252663)


--- branches/safari-608-branch/Tools/Scripts/webkitpy/port/port_testcase.py	2019-11-20 01:24:40 UTC (rev 252662)
+++ branches/safari-608-branch/Tools/Scripts/webkitpy/port/port_testcase.py	2019-11-20 01:24:45 UTC (rev 252663)
@@ -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