Index: pylib/gyp/xcode_ninja.py |
diff --git a/pylib/gyp/xcode_ninja.py b/pylib/gyp/xcode_ninja.py |
index 3820d6bf04817f6d90e6b9796245782167456275..0886d99e77174b18d29763502441643cb5750be7 100644 |
--- a/pylib/gyp/xcode_ninja.py |
+++ b/pylib/gyp/xcode_ninja.py |
@@ -92,11 +92,16 @@ def _TargetFromSpec(old_spec, params): |
new_xcode_settings['CODE_SIGNING_REQUIRED'] = "NO" |
new_xcode_settings['IPHONEOS_DEPLOYMENT_TARGET'] = \ |
old_xcode_settings['IPHONEOS_DEPLOYMENT_TARGET'] |
+ for key in ['BUNDLE_LOADER', 'TEST_HOST']: |
+ if key in old_xcode_settings: |
+ new_xcode_settings[key] = old_xcode_settings[key] |
+ |
ninja_target['configurations'][config] = {} |
ninja_target['configurations'][config]['xcode_settings'] = \ |
new_xcode_settings |
ninja_target['mac_bundle'] = old_spec.get('mac_bundle', 0) |
+ ninja_target['mac_xctest_bundle'] = old_spec.get('mac_xctest_bundle', 0) |
ninja_target['ios_app_extension'] = old_spec.get('ios_app_extension', 0) |
ninja_target['ios_watchkit_extension'] = \ |
old_spec.get('ios_watchkit_extension', 0) |
@@ -138,9 +143,10 @@ def IsValidTargetForWrapper(target_extras, executable_target_pattern, spec): |
if target_extras is not None and re.search(target_extras, target_name): |
return True |
- # Otherwise just show executable targets. |
- if spec.get('type', '') == 'executable' and \ |
- spec.get('product_extension', '') != 'bundle': |
+ # Otherwise just show executable targets and xc_tests. |
+ if (int(spec.get('mac_xctest_bundle', 0)) != 0 or |
+ (spec.get('type', '') == 'executable' and |
+ spec.get('product_extension', '') != 'bundle')): |
# If there is a filter and the target does not match, exclude the target. |
if executable_target_pattern is not None: |