| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 'variables': { | 6 'variables': { |
| 7 'chromium_code': 1, | 7 'chromium_code': 1, |
| 8 }, | 8 }, |
| 9 'conditions': [ | 9 'targets': [ |
| 10 # The iOS frameworks being built for ios_web_shell_test require certs which | 10 { |
| 11 # bots do not currently have installed. Ninja allows this, Xcode does not. | 11 'target_name': 'ios_web_shell_test', |
| 12 ['"<(GENERATOR)"=="ninja" or "<(GENERATOR_FLAVOR)"=="ninja"', { | 12 'type': 'loadable_module', |
| 13 'targets': [ | 13 'mac_xctest_bundle': 1, |
| 14 'variables': { |
| 15 'test_host': '<(_target_name)_host', |
| 16 }, |
| 17 'dependencies': [ |
| 18 '<(test_host)', |
| 19 ], |
| 20 'xcode_settings': { |
| 21 'WRAPPER_EXTENSION': 'xctest', |
| 22 'TEST_HOST': '${BUILT_PRODUCTS_DIR}/<(test_host).app/<(test_host)', |
| 23 'BUNDLE_LOADER': '$(TEST_HOST)', |
| 24 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', |
| 25 'INFOPLIST_FILE': 'shell/test/Module-Info.plist', |
| 26 'OTHER_LDFLAGS': [ |
| 27 '-bundle_loader <(test_host).app/<(test_host)', |
| 28 ], |
| 29 }, |
| 30 'sources': [ |
| 31 'shell/test/shell_test.mm', |
| 32 ], |
| 33 'link_settings': { |
| 34 'libraries': [ |
| 35 'Foundation.framework', |
| 36 'XCTest.framework', |
| 37 ], |
| 38 }, |
| 39 }, |
| 40 { |
| 41 # Create a test host for earl grey tests, so Xcode 7.3 and above |
| 42 # doesn't contaminate the app structure. |
| 43 'target_name': 'ios_web_shell_test_host', |
| 44 'includes': [ |
| 45 'ios_web_shell_exe.gypi', |
| 46 ], |
| 47 'link_settings': { |
| 48 'libraries': [ |
| 49 'XCTest.framework', |
| 50 ], |
| 51 }, |
| 52 'xcode_settings': { |
| 53 'INFOPLIST_FILE': 'shell/test/Host-Info.plist', |
| 54 }, |
| 55 'dependencies': [ |
| 56 '<(DEPTH)/ios/third_party/earl_grey/earl_grey.gyp:EarlGrey', |
| 57 'ios_web.gyp:ios_web_test_support', |
| 58 ], |
| 59 'sources': [ |
| 60 'public/test/http_server_util.h', |
| 61 'public/test/http_server_util.mm', |
| 62 'shell/test/navigation_test_util.h', |
| 63 'shell/test/navigation_test_util.mm', |
| 64 'shell/test/shell_matchers.h', |
| 65 'shell/test/shell_matchers.mm', |
| 66 'shell/test/web_shell_navigation_egtest.mm', |
| 67 'shell/test/web_shell_test_util.h', |
| 68 'shell/test/web_shell_test_util.mm', |
| 69 'shell/test/web_view_matchers.h', |
| 70 'shell/test/web_view_matchers.mm', |
| 71 ], |
| 72 'postbuilds': [ |
| 14 { | 73 { |
| 15 'variables': { | 74 'postbuild_name': 'Copy OCHamcrest to TEST_HOST', |
| 16 'test_host': 'ios_web_shell.app/ios_web_shell', | 75 'action': [ |
| 17 'test_host_name': 'ios_web_shell', | 76 'ditto', |
| 18 }, | 77 '${BUILT_PRODUCTS_DIR}/OCHamcrest.framework', |
| 19 'target_name': 'ios_web_shell_test', | 78 '${BUILT_PRODUCTS_DIR}/<(_target_name).app/Frameworks/OCHamcrest.fra
mework', |
| 20 'type': 'loadable_module', | |
| 21 'mac_xctest_bundle': 1, | |
| 22 'dependencies': [ | |
| 23 '../third_party/earl_grey/earl_grey.gyp:EarlGrey', | |
| 24 'ios_web_shell.gyp:ios_web_shell', | |
| 25 'ios_web.gyp:ios_web_test_support', | |
| 26 ], | 79 ], |
| 27 'sources': [ | 80 }, |
| 28 'public/test/http_server_util.h', | 81 { |
| 29 'public/test/http_server_util.mm', | 82 'postbuild_name': 'Copy EarlGrey to TEST_HOST', |
| 30 'shell/test/navigation_test_util.h', | 83 'action': [ |
| 31 'shell/test/navigation_test_util.mm', | 84 'ditto', |
| 32 'shell/test/shell_matchers.h', | 85 '${BUILT_PRODUCTS_DIR}/EarlGrey.framework', |
| 33 'shell/test/shell_matchers.mm', | 86 '${BUILT_PRODUCTS_DIR}/<(_target_name).app/Frameworks/EarlGrey.frame
work', |
| 34 'shell/test/web_shell_navigation_egtest.mm', | |
| 35 'shell/test/web_shell_test_util.h', | |
| 36 'shell/test/web_shell_test_util.mm', | |
| 37 'shell/test/web_view_matchers.h', | |
| 38 'shell/test/web_view_matchers.mm', | |
| 39 ], | 87 ], |
| 40 'xcode_settings': { | |
| 41 'WRAPPER_EXTENSION': 'xctest', | |
| 42 'TEST_HOST': '${BUILT_PRODUCTS_DIR}/<(test_host)', | |
| 43 'BUNDLE_LOADER': '$(TEST_HOST)', | |
| 44 'conditions':[ | |
| 45 ['"<(GENERATOR)"!="xcode" or "<(GENERATOR_FLAVOR)"=="ninja"', { | |
| 46 'OTHER_LDFLAGS': [ | |
| 47 '-bundle_loader <@(test_host)', | |
| 48 ], | |
| 49 }], | |
| 50 ], | |
| 51 }, | |
| 52 'link_settings': { | |
| 53 'libraries': [ | |
| 54 'CoreGraphics.framework', | |
| 55 'Foundation.framework', | |
| 56 'QuartzCore.framework', | |
| 57 'UIKit.framework', | |
| 58 'XCTest.framework', | |
| 59 ], | |
| 60 }, | |
| 61 }, | 88 }, |
| 62 ], | 89 ], |
| 63 }, { # GENERATOR == ninja or GENERATOR_FLAVOR == ninja | 90 }, |
| 64 'targets': [ | |
| 65 { | |
| 66 # The iOS frameworks being built for ios_web_shell_test require certs | |
| 67 # which bot do not currently have installed. Ninja allows this, Xcode | |
| 68 # does not. | |
| 69 'target_name': 'ios_web_shell_test', | |
| 70 'type': 'none', | |
| 71 }, | |
| 72 ], | |
| 73 }], | |
| 74 ], | 91 ], |
| 75 } | 92 } |
| OLD | NEW |