Attempt to fix webkitpy tests on GTK Linux ports
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Jan 2015 10:08:28 +0000 (10:08 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 17 Jan 2015 10:08:28 +0000 (10:08 +0000)
* Scripts/webkitpy/port/ios.py:
(IOSPort.determine_full_port_name): Set a sensible default if
not running on a Mac platform or if no iOS SDK is installed.

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

Tools/ChangeLog
Tools/Scripts/webkitpy/port/ios.py

index c05b0909ae883a8c8b64dc30ae66cc62ea0f6054..63556e95c9b9cacc738bb2d6a341123c30db865f 100644 (file)
@@ -1,3 +1,11 @@
+2015-01-17  David Kilzer  <ddkilzer@apple.com>
+
+        Attempt to fix webkitpy tests on GTK Linux ports
+
+        * Scripts/webkitpy/port/ios.py:
+        (IOSPort.determine_full_port_name): Set a sensible default if
+        not running on a Mac platform or if no iOS SDK is installed.
+
 2015-01-17  Jake Nielsen  <jacob_nielsen@apple.com>
 
         Create iOS-EWS client queue
index 77adb7c15d5e90200b76fd7616000774a2ee23cc..a87e8a699ebd59c1ebc4795c24c4a77009d5048f 100644 (file)
@@ -51,12 +51,14 @@ class IOSPort(ApplePort):
     @classmethod
     def determine_full_port_name(cls, host, options, port_name):
         if port_name == cls.port_name:
-            sdk_command_process = subprocess.Popen('xcrun --sdk iphoneos --show-sdk-version', stdout=subprocess.PIPE, stderr=None, shell=True)
-            sdk_command_stdout = sdk_command_process.communicate()[0].strip()
-
-            assert sdk_command_stdout, "Xcode is not installed, and hence we cannot construct an iOS port object!"
-
-            port_name = port_name + '-' + re.match('^([0-9]+).*', sdk_command_stdout).group(1)
+            sdk_version = '8.0'
+            if host.platform.is_mac():
+                sdk_command_process = subprocess.Popen('xcrun --sdk iphoneos --show-sdk-version', stdout=subprocess.PIPE, stderr=None, shell=True)
+                sdk_command_output = sdk_command_process.communicate()[0].strip()
+                if sdk_command_output:
+                    sdk_version = sdk_command_output
+
+            port_name = port_name + '-' + re.match('^([0-9]+).*', sdk_version).group(1)
 
         return port_name