Title: [225274] trunk/Tools
Revision
225274
Author
jbed...@apple.com
Date
2017-11-29 10:04:06 -0800 (Wed, 29 Nov 2017)

Log Message

webkitpy: Trying to use iOS versions from machines without iOS SDKs doesn't make sense
https://bugs.webkit.org/show_bug.cgi?id=179534
<rdar://problem/35469509>

Reviewed by Brent Fulgham.

Provide more specific information in builders.py so that machines do not try and calculate
an iOS SDK version while running tests.

* Scripts/webkitpy/port/builders.py: Explicitly specify a version for iOS Simulator.
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort._version_from_name): Attempt to extract the iOS version from the name
of the port.
(IOSSimulatorPort.ios_version): Use specified iOS version if a version is detected in
in the provided name string (just like Mac).

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (225273 => 225274)


--- trunk/Tools/ChangeLog	2017-11-29 17:46:26 UTC (rev 225273)
+++ trunk/Tools/ChangeLog	2017-11-29 18:04:06 UTC (rev 225274)
@@ -1,3 +1,21 @@
+2017-11-29  Jonathan Bedard  <jbed...@apple.com>
+
+        webkitpy: Trying to use iOS versions from machines without iOS SDKs doesn't make sense
+        https://bugs.webkit.org/show_bug.cgi?id=179534
+        <rdar://problem/35469509>
+
+        Reviewed by Brent Fulgham.
+
+        Provide more specific information in builders.py so that machines do not try and calculate
+        an iOS SDK version while running tests.
+
+        * Scripts/webkitpy/port/builders.py: Explicitly specify a version for iOS Simulator.
+        * Scripts/webkitpy/port/ios_simulator.py:
+        (IOSSimulatorPort._version_from_name): Attempt to extract the iOS version from the name
+        of the port.
+        (IOSSimulatorPort.ios_version): Use specified iOS version if a version is detected in
+        in the provided name string (just like Mac).
+
 2017-11-29  Robin Morisset  <rmoris...@apple.com>
 
         The recursive tail call optimisation is wrong on closures

Modified: trunk/Tools/Scripts/webkitpy/port/builders.py (225273 => 225274)


--- trunk/Tools/Scripts/webkitpy/port/builders.py	2017-11-29 17:46:26 UTC (rev 225273)
+++ trunk/Tools/Scripts/webkitpy/port/builders.py	2017-11-29 18:04:06 UTC (rev 225274)
@@ -88,8 +88,8 @@
 
 
 _ports_without_builders = [
-    r"ios-simulator",
-    r"ios-simulator-wk2",
+    r"ios-simulator-11",
+    r"ios-simulator-11-wk2",
 ]
 
 

Modified: trunk/Tools/Scripts/webkitpy/port/ios_simulator.py (225273 => 225274)


--- trunk/Tools/Scripts/webkitpy/port/ios_simulator.py	2017-11-29 17:46:26 UTC (rev 225273)
+++ trunk/Tools/Scripts/webkitpy/port/ios_simulator.py	2017-11-29 18:04:06 UTC (rev 225274)
@@ -108,6 +108,12 @@
             runtime = Runtime.from_version(self.host.platform.xcode_sdk_version('iphonesimulator'))
         return runtime
 
+    @staticmethod
+    def _version_from_name(name):
+        if len(name.split('-')) > 2 and name.split('-')[2].isdigit():
+            return Version.from_string(name.split('-')[2])
+        return None
+
     @memoized
     def ios_version(self):
         runtime_identifier = self.get_option('runtime')
@@ -115,7 +121,7 @@
             return Version.from_string(self.get_option('version'))
         if runtime_identifier:
             return Runtime.from_identifier(runtime_identifier).version
-        return self.host.platform.xcode_sdk_version('iphonesimulator')
+        return IOSSimulatorPort._version_from_name(self._name) if IOSSimulatorPort._version_from_name(self._name) else self.host.platform.xcode_sdk_version('iphonesimulator')
 
     def simulator_device_type(self):
         device_type_identifier = self.get_option('device_type')
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to