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

Side by Side Diff: test/ios/gyptest-archs.py

Issue 421453003: Add TestGypXcodeNinja to run tests against the xcode-ninja generator (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase onto origin/master Created 6 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2013 Google Inc. All rights reserved. 3 # Copyright (c) 2013 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """ 7 """
8 Verifies that device and simulator bundles are built correctly. 8 Verifies that device and simulator bundles are built correctly.
9 """ 9 """
10 10
(...skipping 17 matching lines...) Expand all
28 ('Default', 'TestNoArchs', ['i386']), 28 ('Default', 'TestNoArchs', ['i386']),
29 ('Default-iphoneos', 'TestNoArchs', ['armv7'])]) 29 ('Default-iphoneos', 'TestNoArchs', ['armv7'])])
30 30
31 if TestMac.Xcode.Version() >= '0500': 31 if TestMac.Xcode.Version() >= '0500':
32 test_cases.extend([ 32 test_cases.extend([
33 ('Default', 'TestArch64Bits', ['x86_64']), 33 ('Default', 'TestArch64Bits', ['x86_64']),
34 ('Default', 'TestMultiArchs', ['i386', 'x86_64']), 34 ('Default', 'TestMultiArchs', ['i386', 'x86_64']),
35 ('Default-iphoneos', 'TestArch64Bits', ['arm64']), 35 ('Default-iphoneos', 'TestArch64Bits', ['arm64']),
36 ('Default-iphoneos', 'TestMultiArchs', ['armv7', 'arm64'])]) 36 ('Default-iphoneos', 'TestMultiArchs', ['armv7', 'arm64'])])
37 37
38 test.run_gyp('test-archs.gyp', chdir='app-bundle') 38 test.run_gyp('test-archs.gyp',
39 '-G', 'xcode_ninja_target_pattern=^.*$',
40 chdir='app-bundle')
39 for configuration, target, archs in test_cases: 41 for configuration, target, archs in test_cases:
40 is_device_build = configuration.endswith('-iphoneos') 42 is_device_build = configuration.endswith('-iphoneos')
41 43
42 kwds = collections.defaultdict(list) 44 kwds = collections.defaultdict(list)
43 if test.format == 'xcode': 45 if test.format == 'xcode':
44 if is_device_build: 46 if is_device_build:
45 configuration, sdk = configuration.split('-') 47 configuration, sdk = configuration.split('-')
46 kwds['arguments'].extend(['-sdk', sdk]) 48 kwds['arguments'].extend(['-sdk', sdk])
47 if TestMac.Xcode.Version() < '0500': 49 if TestMac.Xcode.Version() < '0500':
48 kwds['arguments'].extend(['-arch', archs[0]]) 50 kwds['arguments'].extend(['-arch', archs[0]])
49 51
50 test.set_configuration(configuration) 52 test.set_configuration(configuration)
51 filename = '%s.bundle/%s' % (target, target) 53 filename = '%s.bundle/%s' % (target, target)
52 test.build('test-archs.gyp', target, chdir='app-bundle', **kwds) 54 test.build('test-archs.gyp', target, chdir='app-bundle', **kwds)
53 result_file = test.built_file_path(filename, chdir='app-bundle') 55 result_file = test.built_file_path(filename, chdir='app-bundle')
54 56
55 test.must_exist(result_file) 57 test.must_exist(result_file)
56 TestMac.CheckFileType(test, result_file, archs) 58 TestMac.CheckFileType(test, result_file, archs)
57 59
58 test.pass_test() 60 test.pass_test()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698