Chromium Code Reviews| 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: |