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

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

Issue 23781011: ninja/mac: Insert a few synthesized Info.plist entries. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 3 months 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
Index: test/mac/gyptest-app.py
===================================================================
--- test/mac/gyptest-app.py (revision 1733)
+++ test/mac/gyptest-app.py (working copy)
@@ -11,8 +11,13 @@
import TestGyp
import os
+import plistlib
+import subprocess
import sys
+def GetStdout(cmdlist):
+ return subprocess.Popen(cmdlist,
+ stdout=subprocess.PIPE).communicate()[0].rstrip('\n')
def ls(path):
'''Returns a list of all files in a directory, relative to the directory.'''
@@ -41,6 +46,24 @@
test.must_contain(info_plist, 'com.google.Test-App-Gyp') # Variable expansion
test.must_not_contain(info_plist, '${MACOSX_DEPLOYMENT_TARGET}');
+ if test.format != 'make':
+ # TODO: Synthesized plist entries aren't hooked up in the make generator.
+ plist = plistlib.readPlist(info_plist)
+ if plist['BuildMachineOSBuild'] != GetStdout(['sw_vers', '-buildVersion']):
+ test.fail_test()
+ if plist['DTSDKName'] != '':
+ test.fail_test()
+ if plist['DTSDKBuild'] != GetStdout(
+ ['xcodebuild', '-version', '-sdk', '', 'ProductBuildVersion']):
+ test.fail_test()
+ xcode, build = GetStdout(['xcodebuild', '-version']).splitlines()
+ xcode = xcode.split()[-1].replace('.', '').zfill(4)
Nico 2013/09/17 22:03:49 It might seem silly to have the same test here as
scottmg 2013/09/17 22:27:44 Oh, I thought maybe that was a first https://code.
+ build = build.split()[-1]
+ if plist['DTXcode'] != xcode:
+ test.fail_test()
+ if plist['DTXcodeBuild'] != build:
+ test.fail_test()
+
# Resources
strings_files = ['InfoPlist.strings', 'utf-16be.strings', 'utf-16le.strings']
for f in strings_files:

Powered by Google App Engine
This is Rietveld 408576698