Bug 141255 - test-webkitpy fails on Mac without iphoneos SDK
Summary: test-webkitpy fails on Mac without iphoneos SDK
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad iOS 8.1
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-02-04 12:07 PST by Daniel Bates
Modified: 2015-02-04 14:05 PST (History)
4 users (show)

See Also:


Attachments
Patch and unit test (4.45 KB, patch)
2015-02-04 12:12 PST, Daniel Bates
ddkilzer: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2015-02-04 12:07:58 PST
We should support running the Python unit tests on a Mac without the iphoneos SDK.
Comment 1 Daniel Bates 2015-02-04 12:09:06 PST
<rdar://problem/19619691>
Comment 2 Daniel Bates 2015-02-04 12:12:31 PST
Created attachment 246041 [details]
Patch and unit test

As mentioned in the ChangeLog entry for PlatformInfo.xcode_sdk_version(), I took advantage of the behavior that xcrun --show-sdk-version only writes to standard output if the SDK is installed to return the empty string when the SDK is not installed. Let me know if it is preferred to explicitly check the exit status of xcrun and return the empty string instead of making use of this behavior.
Comment 3 David Kilzer (:ddkilzer) 2015-02-04 12:16:32 PST
Comment on attachment 246041 [details]
Patch and unit test

r=me
Comment 4 Alexey Proskuryakov 2015-02-04 12:17:11 PST
Comment on attachment 246041 [details]
Patch and unit test

View in context: https://bugs.webkit.org/attachment.cgi?id=246041&action=review

> Tools/Scripts/webkitpy/port/ios.py:57
> +                raise Exception("Ensure that the Xcode command line tools and the iphoneos SDK are installed.")

Maybe add a "please" somewhere here? E.g. "Please install Xcode command line tools and the iPhone SDK".

Also, why do we need command line tools? I thought that we didn't rely on them.
Comment 5 Daniel Bates 2015-02-04 12:24:22 PST
(In reply to comment #4)
> Comment on attachment 246041 [details]
> Patch and unit test
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=246041&action=review
> 
> > Tools/Scripts/webkitpy/port/ios.py:57
> > +                raise Exception("Ensure that the Xcode command line tools and the iphoneos SDK are installed.")
> 
> Maybe add a "please" somewhere here? E.g. "Please install Xcode command line
> tools and the iPhone SDK".
> 
> Also, why do we need command line tools? I thought that we didn't rely on
> them.

After talking with Alexey Proskuryakov on IRC today (02/04) we confirmed that xcrun is included with a default OS install. So, I will update the exception message to read: "Please install the iOS SDK."
Comment 6 Daniel Bates 2015-02-04 12:26:29 PST
Committed r179622: <http://trac.webkit.org/changeset/179622>
Comment 7 Daniel Bates 2015-02-04 14:05:19 PST
Fixed exception message per comment 5 and committed this in <http://trac.webkit.org/changeset/179629>.