Index: pylib/gyp/generator/xcode.py |
diff --git a/pylib/gyp/generator/xcode.py b/pylib/gyp/generator/xcode.py |
index 7e5f79f1704871eab663fd7c877ea838a3f8cab4..ccf91e3ce4b183e71510680f2788132f0ca8fc2a 100644 |
--- a/pylib/gyp/generator/xcode.py |
+++ b/pylib/gyp/generator/xcode.py |
@@ -73,6 +73,7 @@ generator_additional_non_configuration_keys = [ |
'mac_framework_headers', |
'mac_framework_private_headers', |
'xcode_create_dependents_test_runner', |
+ 'xctest_bundle', |
] |
# We want to let any rules apply to files that are resources also. |
@@ -642,6 +643,7 @@ def GenerateOutput(target_list, target_dicts, data, params): |
'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', |
} |
@@ -652,10 +654,17 @@ def GenerateOutput(target_list, target_dicts, data, params): |
type = spec['type'] |
is_bundle = int(spec.get('mac_bundle', 0)) |
Mark Mentovai
2013/10/30 21:31:16
The name mac_bundle was chosen because platform-sp
jonwall
2013/10/30 22:03:15
Done.
|
+ is_xctest = int(spec.get('xctest_bundle', 0)) |
if type != 'none': |
type_bundle_key = type |
- if is_bundle: |
+ if is_xctest: |
+ type_bundle_key += '+xctest' |
+ assert type == 'loadable_module', ( |
+ '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 @@ def GenerateOutput(target_list, target_dicts, data, params): |
assert not is_bundle, ( |
'mac_bundle targets cannot have type none (target "%s")' % |
target_name) |
+ assert not is_xctest, ( |
+ '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: |