Title: [225904] trunk/Tools
Revision
225904
Author
[email protected]
Date
2017-12-14 08:13:29 -0800 (Thu, 14 Dec 2017)

Log Message

webkitpy: Better name-version mapping (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=179621
<rdar://problem/35589585>

Unreviewed infrastructure fix.

r225856 caused some undesired logging on Linux and Windows.

* Scripts/webkitpy/port/mac.py:
(MacPort.__init__): Use most recent OS release if not on a Mac.
(MacPort.default_baseline_search_path): Make platform explicit.
(MacPort.configuration_specifier_macros): Ditto.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (225903 => 225904)


--- trunk/Tools/ChangeLog	2017-12-14 15:36:31 UTC (rev 225903)
+++ trunk/Tools/ChangeLog	2017-12-14 16:13:29 UTC (rev 225904)
@@ -1,3 +1,18 @@
+2017-12-14  Jonathan Bedard  <[email protected]>
+
+        webkitpy: Better name-version mapping (Follow-up fix)
+        https://bugs.webkit.org/show_bug.cgi?id=179621
+        <rdar://problem/35589585>
+
+        Unreviewed infrastructure fix.
+
+        r225856 caused some undesired logging on Linux and Windows.
+
+        * Scripts/webkitpy/port/mac.py:
+        (MacPort.__init__): Use most recent OS release if not on a Mac.
+        (MacPort.default_baseline_search_path): Make platform explicit.
+        (MacPort.configuration_specifier_macros): Ditto.
+
 2017-12-14  Carlos Garcia Campos  <[email protected]>
 
         WebDriver: add a common way to run tests with pytest

Modified: trunk/Tools/Scripts/webkitpy/port/mac.py (225903 => 225904)


--- trunk/Tools/Scripts/webkitpy/port/mac.py	2017-12-14 15:36:31 UTC (rev 225903)
+++ trunk/Tools/Scripts/webkitpy/port/mac.py	2017-12-14 16:13:29 UTC (rev 225904)
@@ -55,10 +55,14 @@
 
     def __init__(self, host, port_name, **kwargs):
         DarwinPort.__init__(self, host, port_name, **kwargs)
+        version_name_map = VersionNameMap.map(host.platform)
         if port_name.split('-') > 1:
-            self._os_version = VersionNameMap.map(host.platform).from_name(port_name.split('-')[1])[1]
+            self._os_version = version_name_map.from_name(port_name.split('-')[1])[1]
+        elif self.host.platform.is_mac():
+            self._os_version = self.host.platform.os_version
         else:
-            self._os_version = self.host.platform.os_version
+            sorted_versions = sorted(version_name_map.mapping_for_platform(platform=self.port_name).values())
+            self._os_version = sorted_versions[sorted_versions.index(self.VERSION_MAX) - 1]
 
     def _build_driver_flags(self):
         return ['ARCHS=i386'] if self.architecture() == 'x86' else []
@@ -69,7 +73,7 @@
         if self._os_version < self.VERSION_MIN or self._os_version > self.VERSION_MAX:
             version_fallback = [self._os_version]
         else:
-            sorted_versions = sorted(version_name_map.mapping_for_platform().values())
+            sorted_versions = sorted(version_name_map.mapping_for_platform(platform=self.port_name).values())
             version_fallback = sorted_versions[sorted_versions.index(self._os_version):-1]
         wk_string = 'wk1'
         if self.get_option('webkit_test_runner'):
@@ -77,9 +81,9 @@
 
         expectations = []
         for version in version_fallback:
-            version_name = version_name_map.to_name(version).lower().replace(' ', '')
+            version_name = version_name_map.to_name(version, platform=self.port_name).lower().replace(' ', '')
             if apple_additions():
-                apple_name = version_name_map.to_name(version, table='internal')
+                apple_name = version_name_map.to_name(version, platform=self.port_name, table='internal')
             else:
                 apple_name = None
             if apple_name:
@@ -104,7 +108,7 @@
     def configuration_specifier_macros(self):
         map = {}
         version_name_map = VersionNameMap.map(self.host.platform)
-        sorted_versions = sorted(version_name_map.mapping_for_platform().values())
+        sorted_versions = sorted(version_name_map.mapping_for_platform(platform=self.port_name).values())
         for version in sorted_versions:
             list = []
             for newer in sorted_versions[sorted_versions.index(version):]:
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to