Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(860)

Unified Diff: test/mac/gyptest-app.py

Issue 83463003: Fix gyptest-app for Xcode 5.0.2 (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Rebase Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pylib/gyp/xcode_emulation.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mac/gyptest-app.py
diff --git a/test/mac/gyptest-app.py b/test/mac/gyptest-app.py
index c84c92fd3098442875881de0ba5685f060a870ab..b50e1a841184282bfb1c1f81843f3c774737b5d7 100755
--- a/test/mac/gyptest-app.py
+++ b/test/mac/gyptest-app.py
@@ -32,6 +32,11 @@ def ls(path):
result.append(os.path.join(dirpath, f)[len(path) + 1:])
return result
+def XcodeVersion():
+ stdout = subprocess.check_output(['xcodebuild', '-version'])
+ version = stdout.splitlines()[0].split()[-1].replace('.', '')
+ return (version + '0' * (3 - len(version))).zfill(4)
+
if sys.platform == 'darwin':
test = TestGyp.TestGyp(formats=['ninja', 'make', 'xcode'])
@@ -56,7 +61,15 @@ if sys.platform == 'darwin':
plist = plistlib.readPlist(info_plist)
ExpectEq(GetStdout(['sw_vers', '-buildVersion']),
plist['BuildMachineOSBuild'])
- ExpectEq('', plist['DTSDKName'])
+
+ # Prior to Xcode 5.0.0, SDKROOT (and thus DTSDKName) was only defined if
+ # set in the Xcode project file. Starting with that version, it is always
+ # defined.
+ expected = ''
+ if XcodeVersion() >= '0500':
+ version = GetStdout(['xcodebuild', '-version', '-sdk', '', 'SDKVersion'])
+ expected = 'macosx' + version
+ ExpectEq(expected, plist['DTSDKName'])
sdkbuild = GetStdout(
['xcodebuild', '-version', '-sdk', '', 'ProductBuildVersion'])
if not sdkbuild:
« no previous file with comments | « pylib/gyp/xcode_emulation.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698