Index: ios/web/ios_web_shell_tests.gyp |
diff --git a/ios/web/ios_web_shell_tests.gyp b/ios/web/ios_web_shell_tests.gyp |
index 806c056c451bea44af2dc1437558d6af11e4c96d..96a65b1de0f4ba64073cfbe9ab1fa0683b46d8e0 100644 |
--- a/ios/web/ios_web_shell_tests.gyp |
+++ b/ios/web/ios_web_shell_tests.gyp |
@@ -6,69 +6,113 @@ |
'variables': { |
'chromium_code': 1, |
}, |
- 'conditions': [ |
- # The iOS frameworks being built for ios_web_shell_test require certs which |
- # bots do not currently have installed. Ninja allows this, Xcode does not. |
- ['"<(GENERATOR)"=="ninja" or "<(GENERATOR_FLAVOR)"=="ninja"', { |
- 'targets': [ |
+ 'targets': [ |
+ { |
+ 'variables': { |
+ 'test_host': 'ios_web_shell_test_host', |
+ 'bundle_loader': 'ios_web_shell' |
+ }, |
+ 'target_name': 'ios_web_shell_test', |
+ 'type': 'loadable_module', |
+ 'mac_xctest_bundle': 1, |
+ 'dependencies': [ |
+ '../third_party/earl_grey/earl_grey.gyp:EarlGrey', |
+ 'ios_web_shell_test_host', |
+ ], |
+ 'sources': [ |
+ 'shell/test/web_shell_navigation_egtest.mm', |
+ ], |
+ 'xcode_settings': { |
+ 'WRAPPER_EXTENSION': 'xctest', |
+ 'TEST_HOST': '${BUILT_PRODUCTS_DIR}/<(test_host).app/<(test_host)', |
+ 'BUNDLE_LOADER': '$(TEST_HOST)', |
+ 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', |
+ 'PRODUCT_BUNDLE_IDENTIFIER': 'org.chromium.ios_web_shell_test', |
+ 'INFOPLIST_FILE': 'shell/test/Info.plist', |
+ 'OTHER_LDFLAGS': [ |
+ '-bundle_loader <@(bundle_loader).app/<@(bundle_loader)', |
+ ], |
+ }, |
+ 'link_settings': { |
+ 'libraries': [ |
+ 'CoreGraphics.framework', |
+ 'Foundation.framework', |
+ 'QuartzCore.framework', |
+ 'UIKit.framework', |
+ 'XCTest.framework', |
+ ], |
+ }, |
+ 'postbuilds': [ |
{ |
- 'variables': { |
- 'test_host': 'ios_web_shell.app/ios_web_shell', |
- 'test_host_name': 'ios_web_shell', |
- }, |
- 'target_name': 'ios_web_shell_test', |
- 'type': 'loadable_module', |
- 'mac_xctest_bundle': 1, |
- 'dependencies': [ |
- '../third_party/earl_grey/earl_grey.gyp:EarlGrey', |
- 'ios_web_shell.gyp:ios_web_shell', |
+ 'postbuild_name': 'Copy OCHamcrest to TEST_HOST', |
+ 'action': [ |
+ 'ditto', |
+ '${BUILT_PRODUCTS_DIR}/OCHamcrest.framework', |
+ '${BUILT_PRODUCTS_DIR}/<(test_host).app/Frameworks/OCHamcrest.framework', |
], |
- 'sources': [ |
- 'shell/test/web_shell_navigation_egtest.mm', |
+ }, |
+ { |
+ 'postbuild_name': 'Copy EarlGrey to TEST_HOST', |
+ 'action': [ |
+ 'ditto', |
+ '${BUILT_PRODUCTS_DIR}/EarlGrey.framework', |
+ '${BUILT_PRODUCTS_DIR}/<(test_host).app/Frameworks/EarlGrey.framework', |
], |
+ }, |
+ ], |
+ }, |
+ { |
+ # Create a test host for earl grey tests, so Xcode 7.3 and above |
+ # doesn't contaminate the app structure. |
+ 'target_name': 'ios_web_shell_test_host', |
+ 'type': 'executable', |
+ 'mac_bundle': 1, |
+ 'dependencies': [ |
+ 'ios_web_shell.gyp:ios_web_shell', |
+ ], |
+ # This seems to be necessary to override these xcode-settings since the |
+ # the way they are set in common.gypi |
+ 'configurations': { |
justincohen
2016/04/20 21:10:49
Is there an easier way to do this? I need to disa
justincohen
2016/04/24 20:26:45
Ack, this is now gone.
|
+ 'Debug': { |
+ 'xcode_settings': { |
+ 'STRIP_INSTALLED_PRODUCT': 'NO', |
+ 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', |
+ }, |
+ }, |
+ 'Release': { |
'xcode_settings': { |
- 'WRAPPER_EXTENSION': 'xctest', |
- 'TEST_HOST': '$(CONFIGURATION_BUILD_DIR)/<(test_host)', |
- 'BUNDLE_LOADER': '$(TEST_HOST)', |
- 'conditions':[ |
- ['"<(GENERATOR)"!="xcode" or "<(GENERATOR_FLAVOR)"=="ninja"', { |
- 'OTHER_LDFLAGS': [ |
- '-bundle_loader <@(test_host)', |
- ], |
- }], |
- ], |
+ 'STRIP_INSTALLED_PRODUCT': 'NO', |
+ 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', |
}, |
- 'link_settings': { |
- 'libraries': [ |
- 'CoreGraphics.framework', |
- 'Foundation.framework', |
- 'QuartzCore.framework', |
- 'UIKit.framework', |
- 'XCTest.framework', |
- ], |
+ }, |
+ 'Profile': { |
+ 'xcode_settings': { |
+ 'STRIP_INSTALLED_PRODUCT': 'NO', |
+ 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', |
}, |
- 'postbuilds': [ |
- { |
- 'postbuild_name': 'Copy xctest to TEST_HOST', |
- 'action': [ |
- 'ditto', |
- '${BUILT_PRODUCTS_DIR}/ios_web_shell_test.xctest', |
- '${BUILT_PRODUCTS_DIR}/<(test_host_name).app/PlugIns/ios_web_shell_test.xctest', |
- ], |
- }, |
- ], |
}, |
- ], |
- }, { # GENERATOR == ninja or GENERATOR_FLAVOR == ninja |
- 'targets': [ |
+ }, |
+ 'actions': [ |
{ |
- # The iOS frameworks being built for ios_web_shell_test require certs |
- # which bot do not currently have installed. Ninja allows this, Xcode |
- # does not. |
- 'target_name': 'ios_web_shell_test', |
- 'type': 'none', |
+ 'action_name': 'rsync web shell', |
+ 'inputs': [ |
+ '<(PRODUCT_DIR)/ios_web_shell.app' |
+ ], |
+ 'outputs': [ |
+ '<(PRODUCT_DIR)/<(_target_name).app' |
justincohen
2016/04/20 21:10:49
Is there a better way to do this as well?
justincohen
2016/04/24 20:26:45
This can be done simpler in GN, leaving for now in
|
+ ], |
+ 'action': [ |
+ 'rsync', |
+ '-ah', |
+ '${BUILT_PRODUCTS_DIR}/ios_web_shell.app/', |
+ '${BUILT_PRODUCTS_DIR}/<(_target_name).app/', |
+ # Don't delete Frameworks/ and Plugins/ when syncing. |
+ '--exclude=Frameworks/', |
+ '--exclude=PlugIns/', |
+ '--delete', |
+ ], |
}, |
], |
- }], |
+ }, |
], |
} |