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

Unified Diff: pylib/gyp/generator/xcode.py

Issue 51413002: Adds generator support for Xcode 5 xctest targets. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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: pylib/gyp/generator/xcode.py
===================================================================
--- pylib/gyp/generator/xcode.py (revision 1773)
+++ pylib/gyp/generator/xcode.py (working copy)
@@ -72,6 +72,7 @@
'mac_bundle_resources',
'mac_framework_headers',
'mac_framework_private_headers',
+ 'mac_xctest_bundle',
'xcode_create_dependents_test_runner',
]
@@ -642,6 +643,7 @@
'static_library': 'com.apple.product-type.library.static',
'executable+bundle': 'com.apple.product-type.application',
'loadable_module+bundle': 'com.apple.product-type.bundle',
+ 'loadable_module+xctest': 'com.apple.product-type.bundle.unit-test',
'shared_library+bundle': 'com.apple.product-type.framework',
}
@@ -651,11 +653,18 @@
}
type = spec['type']
- is_bundle = int(spec.get('mac_bundle', 0))
+ is_xctest = int(spec.get('mac_xctest_bundle', 0))
+ is_bundle = int(spec.get('mac_bundle', 0)) or is_xctest
if type != 'none':
type_bundle_key = type
- if is_bundle:
+ if is_xctest:
+ type_bundle_key += '+xctest'
+ assert type == 'loadable_module', (
+ 'mac_xctest_bundle targets must have type loadable_module '
+ '(target %s)' % target_name)
+ elif is_bundle:
type_bundle_key += '+bundle'
+
xctarget_type = gyp.xcodeproj_file.PBXNativeTarget
try:
target_properties['productType'] = _types[type_bundle_key]
@@ -668,6 +677,9 @@
assert not is_bundle, (
'mac_bundle targets cannot have type none (target "%s")' %
target_name)
+ assert not is_xctest, (
+ 'mac_xctest_bundle targets cannot have type none (target "%s")' %
+ target_name)
target_product_name = spec.get('product_name')
if target_product_name is not None:
« no previous file with comments | « no previous file | pylib/gyp/xcodeproj_file.py » ('j') | test/mac/xctest/test.xcodeproj/xcshareddata/xcschemes/classes.xcscheme » ('J')

Powered by Google App Engine
This is Rietveld 408576698