Chromium Code Reviews| 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 9f48d043c76e67d7d0382bdae485c8d74df0add6..1bc0675b3fe45c885e67e799b8371a2b36ac0c73 100644 |
| --- a/ios/web/ios_web_shell_tests.gyp |
| +++ b/ios/web/ios_web_shell_tests.gyp |
| @@ -6,70 +6,87 @@ |
| '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': [ |
| + { |
| + 'target_name': 'ios_web_shell_test', |
| + 'type': 'loadable_module', |
| + 'mac_xctest_bundle': 1, |
| + 'variables': { |
| + 'test_host': '<(_target_name)_host', |
| + }, |
| + 'dependencies': [ |
| + '<(test_host)', |
| + ], |
| + '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', |
| + 'INFOPLIST_FILE': 'shell/test/Info.plist', |
| + 'OTHER_LDFLAGS': [ |
| + '-bundle_loader <(test_host).app/<(test_host)', |
| + ], |
| + }, |
| + 'sources': [ |
| + 'shell/test/shell_test.mm', |
| + ], |
| + 'link_settings': { |
| + 'libraries': [ |
| + 'Foundation.framework', |
| + 'XCTest.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', |
| + 'includes': [ |
| + 'ios_web_shell_exe.gypi', |
| + ], |
| + 'link_settings': { |
| + 'libraries': [ |
| + 'XCTest.framework', |
| + ], |
| + }, |
| + 'xcode_settings': { |
| + 'INFOPLIST_FILE': 'shell/test/Host-Info.plist', |
| + }, |
| + 'dependencies': [ |
| + '<(DEPTH)/ios/third_party/earl_grey/earl_grey.gyp:EarlGrey', |
| + 'ios_web.gyp:ios_web_test_support', |
| + ], |
| + 'sources': [ |
| + 'public/test/http_server_util.h', |
|
rohitrao (ping after 24h)
2016/04/26 11:40:58
We should move these files (except for _egtest.mm)
justincohen
2016/04/26 12:27:54
+ baxley, for follow up.
|
| + 'public/test/http_server_util.mm', |
| + 'shell/test/navigation_test_util.h', |
| + 'shell/test/navigation_test_util.mm', |
| + 'shell/test/shell_matchers.h', |
| + 'shell/test/shell_matchers.mm', |
| + 'shell/test/web_shell_navigation_egtest.mm', |
| + 'shell/test/web_shell_test_util.h', |
| + 'shell/test/web_shell_test_util.mm', |
| + 'shell/test/web_view_matchers.h', |
| + 'shell/test/web_view_matchers.mm', |
| + ], |
| + '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', |
| - 'ios_web.gyp:ios_web_test_support', |
| - ], |
| - 'sources': [ |
| - 'public/test/http_server_util.h', |
| - 'public/test/http_server_util.mm', |
| - 'shell/test/navigation_test_util.h', |
| - 'shell/test/navigation_test_util.mm', |
| - 'shell/test/shell_matchers.h', |
| - 'shell/test/shell_matchers.mm', |
| - 'shell/test/web_shell_navigation_egtest.mm', |
| - 'shell/test/web_shell_test_util.h', |
| - 'shell/test/web_shell_test_util.mm', |
| - 'shell/test/web_view_matchers.h', |
| - 'shell/test/web_view_matchers.mm', |
| + 'postbuild_name': 'Copy OCHamcrest to TEST_HOST', |
| + 'action': [ |
| + 'ditto', |
| + '${BUILT_PRODUCTS_DIR}/OCHamcrest.framework', |
| + '${BUILT_PRODUCTS_DIR}/<(_target_name).app/Frameworks/OCHamcrest.framework', |
| ], |
| - 'xcode_settings': { |
| - 'WRAPPER_EXTENSION': 'xctest', |
| - 'TEST_HOST': '${BUILT_PRODUCTS_DIR}/<(test_host)', |
| - 'BUNDLE_LOADER': '$(TEST_HOST)', |
| - 'conditions':[ |
| - ['"<(GENERATOR)"!="xcode" or "<(GENERATOR_FLAVOR)"=="ninja"', { |
| - 'OTHER_LDFLAGS': [ |
| - '-bundle_loader <@(test_host)', |
| - ], |
| - }], |
| - ], |
| - }, |
| - 'link_settings': { |
| - 'libraries': [ |
| - 'CoreGraphics.framework', |
| - 'Foundation.framework', |
| - 'QuartzCore.framework', |
| - 'UIKit.framework', |
| - 'XCTest.framework', |
| - ], |
| - }, |
| }, |
| - ], |
| - }, { # GENERATOR == ninja or GENERATOR_FLAVOR == ninja |
| - 'targets': [ |
| { |
| - # 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', |
| + 'postbuild_name': 'Copy EarlGrey to TEST_HOST', |
| + 'action': [ |
| + 'ditto', |
| + '${BUILT_PRODUCTS_DIR}/EarlGrey.framework', |
| + '${BUILT_PRODUCTS_DIR}/<(_target_name).app/Frameworks/EarlGrey.framework', |
| + ], |
| }, |
| ], |
| - }], |
| + }, |
| ], |
| } |