Title: [130065] trunk/Tools
Revision
130065
Author
rak...@webkit.org
Date
2012-10-01 12:21:31 -0700 (Mon, 01 Oct 2012)

Log Message

[webkitpy] Detect the multiple names of the wdiff binary in the Port class.
https://bugs.webkit.org/show_bug.cgi?id=98039

Reviewed by Dirk Pranke.

Unify the duplicate checks for the wdiff binary present in
different ports into the base Port class.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port):
(Port._path_to_wdiff):
* Scripts/webkitpy/layout_tests/port/chromium_linux.py:
(ChromiumLinuxPort._path_to_wdiff): Removed.
* Scripts/webkitpy/layout_tests/port/gtk.py:
(GtkPort._path_to_wdiff): Removed.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (130064 => 130065)


--- trunk/Tools/ChangeLog	2012-10-01 19:11:16 UTC (rev 130064)
+++ trunk/Tools/ChangeLog	2012-10-01 19:21:31 UTC (rev 130065)
@@ -1,5 +1,23 @@
 2012-10-01  Raphael Kubo da Costa  <raphael.kubo.da.co...@intel.com>
 
+        [webkitpy] Detect the multiple names of the wdiff binary in the Port class.
+        https://bugs.webkit.org/show_bug.cgi?id=98039
+
+        Reviewed by Dirk Pranke.
+
+        Unify the duplicate checks for the wdiff binary present in
+        different ports into the base Port class.
+
+        * Scripts/webkitpy/layout_tests/port/base.py:
+        (Port):
+        (Port._path_to_wdiff):
+        * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
+        (ChromiumLinuxPort._path_to_wdiff): Removed.
+        * Scripts/webkitpy/layout_tests/port/gtk.py:
+        (GtkPort._path_to_wdiff): Removed.
+
+2012-10-01  Raphael Kubo da Costa  <raphael.kubo.da.co...@intel.com>
+
         [chromium] Remove custom implementation of _path_to_apache_config_file in chromium_linux.
         https://bugs.webkit.org/show_bug.cgi?id=98042
 

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py (130064 => 130065)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py	2012-10-01 19:11:16 UTC (rev 130064)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py	2012-10-01 19:21:31 UTC (rev 130065)
@@ -1226,11 +1226,15 @@
         This is needed only by ports that use the http_server.py module."""
         raise NotImplementedError('Port._path_to_lighttpd_php')
 
+    @memoized
     def _path_to_wdiff(self):
         """Returns the full path to the wdiff binary, or None if it is not available.
 
         This is likely used only by wdiff_text()"""
-        return 'wdiff'
+        for path in ("/usr/bin/wdiff", "/usr/bin/dwdiff"):
+            if self._filesystem.exists(path):
+                return path
+        return None
 
     def _webkit_baseline_path(self, platform):
         """Return the  full path to the top of the baseline tree for a

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py (130064 => 130065)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py	2012-10-01 19:11:16 UTC (rev 130064)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py	2012-10-01 19:21:31 UTC (rev 130065)
@@ -170,9 +170,3 @@
 
     def _path_to_helper(self):
         return None
-
-    def _path_to_wdiff(self):
-        if self._is_redhat_based():
-            return '/usr/bin/dwdiff'
-        else:
-            return '/usr/bin/wdiff'

Modified: trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py (130064 => 130065)


--- trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py	2012-10-01 19:11:16 UTC (rev 130064)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/port/gtk.py	2012-10-01 19:21:31 UTC (rev 130065)
@@ -89,12 +89,6 @@
     def _path_to_image_diff(self):
         return self._build_path('Programs', 'ImageDiff')
 
-    def _path_to_wdiff(self):
-        if self._is_redhat_based():
-            return '/usr/bin/dwdiff'
-        else:
-            return '/usr/bin/wdiff'
-
     def _path_to_webcore_library(self):
         gtk_library_names = [
             "libwebkitgtk-1.0.so",
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to