| Index: test/ios/gyptest-archs.py
|
| diff --git a/test/ios/gyptest-archs.py b/test/ios/gyptest-archs.py
|
| index 7b5a070d54d22341cad4294f286e0c9b49271a3b..87d0657db512379d6a3f1961ae2b49131be63d9c 100644
|
| --- a/test/ios/gyptest-archs.py
|
| +++ b/test/ios/gyptest-archs.py
|
| @@ -26,14 +26,35 @@ def CheckFileType(file, expected):
|
| test.fail_test()
|
|
|
|
|
| +def XcodeVersion():
|
| + xcode, build = GetStdout(['xcodebuild', '-version']).splitlines()
|
| + xcode = xcode.split()[-1].replace('.', '')
|
| + xcode = (xcode + '0' * (3 - len(xcode))).zfill(4)
|
| + return xcode
|
| +
|
| +
|
| +def GetStdout(cmdlist):
|
| + proc = subprocess.Popen(cmdlist, stdout=subprocess.PIPE)
|
| + o = proc.communicate()[0].strip()
|
| + assert not proc.returncode
|
| + return o
|
| +
|
| +
|
| if sys.platform == 'darwin':
|
| test = TestGyp.TestGyp()
|
|
|
| test.run_gyp('test-archs.gyp', chdir='app-bundle')
|
| test.set_configuration('Default')
|
| - test.build('test-archs.gyp', test.ALL, chdir='app-bundle')
|
|
|
| - for filename in ['Test No Archs', 'Test Archs i386', 'Test Archs x86_64']:
|
| + # TODO(sdefresne): add 'Test Archs x86_64' once bots have been updated to
|
| + # a SDK version that supports "x86_64" architecture.
|
| + filenames = ['Test No Archs', 'Test Archs i386']
|
| + if XcodeVersion() >= '0500':
|
| + filenames.append('Test Archs x86_64')
|
| +
|
| + for filename in filenames:
|
| + target = filename.replace(' ', '_').lower()
|
| + test.build('test-archs.gyp', target, chdir='app-bundle')
|
| result_file = test.built_file_path(
|
| '%s.bundle/%s' % (filename, filename), chdir='app-bundle')
|
| test.must_exist(result_file)
|
|
|