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 'variables': { |
12 ['"<(GENERATOR)"=="ninja" or "<(GENERATOR_FLAVOR)"=="ninja"', { | 12 'test_host': 'ios_web_shell_test_host', |
13 'targets': [ | 13 'bundle_loader': 'ios_web_shell' |
14 }, | |
15 'target_name': 'ios_web_shell_test', | |
16 'type': 'loadable_module', | |
17 'mac_xctest_bundle': 1, | |
18 'dependencies': [ | |
19 '../third_party/earl_grey/earl_grey.gyp:EarlGrey', | |
20 'ios_web_shell_test_host', | |
21 ], | |
22 'sources': [ | |
23 'shell/test/web_shell_navigation_egtest.mm', | |
24 ], | |
25 'xcode_settings': { | |
26 'WRAPPER_EXTENSION': 'xctest', | |
27 'TEST_HOST': '${BUILT_PRODUCTS_DIR}/<(test_host).app/<(test_host)', | |
28 'BUNDLE_LOADER': '$(TEST_HOST)', | |
29 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', | |
30 'PRODUCT_BUNDLE_IDENTIFIER': 'org.chromium.ios_web_shell_test', | |
31 'INFOPLIST_FILE': 'shell/test/Info.plist', | |
32 'OTHER_LDFLAGS': [ | |
33 '-bundle_loader <@(bundle_loader).app/<@(bundle_loader)', | |
34 ], | |
35 }, | |
36 'link_settings': { | |
37 'libraries': [ | |
38 'CoreGraphics.framework', | |
39 'Foundation.framework', | |
40 'QuartzCore.framework', | |
41 'UIKit.framework', | |
42 'XCTest.framework', | |
43 ], | |
44 }, | |
45 'postbuilds': [ | |
14 { | 46 { |
15 'variables': { | 47 'postbuild_name': 'Copy OCHamcrest to TEST_HOST', |
16 'test_host': 'ios_web_shell.app/ios_web_shell', | 48 'action': [ |
17 'test_host_name': 'ios_web_shell', | 49 'ditto', |
18 }, | 50 '${BUILT_PRODUCTS_DIR}/OCHamcrest.framework', |
19 'target_name': 'ios_web_shell_test', | 51 '${BUILT_PRODUCTS_DIR}/<(test_host).app/Frameworks/OCHamcrest.framew ork', |
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 ], | 52 ], |
26 'sources': [ | 53 }, |
27 'shell/test/web_shell_navigation_egtest.mm', | 54 { |
28 ], | 55 'postbuild_name': 'Copy EarlGrey to TEST_HOST', |
29 'xcode_settings': { | 56 'action': [ |
30 'WRAPPER_EXTENSION': 'xctest', | 57 'ditto', |
31 'TEST_HOST': '$(CONFIGURATION_BUILD_DIR)/<(test_host)', | 58 '${BUILT_PRODUCTS_DIR}/EarlGrey.framework', |
32 'BUNDLE_LOADER': '$(TEST_HOST)', | 59 '${BUILT_PRODUCTS_DIR}/<(test_host).app/Frameworks/EarlGrey.framewor k', |
33 'conditions':[ | |
34 ['"<(GENERATOR)"!="xcode" or "<(GENERATOR_FLAVOR)"=="ninja"', { | |
35 'OTHER_LDFLAGS': [ | |
36 '-bundle_loader <@(test_host)', | |
37 ], | |
38 }], | |
39 ], | |
40 }, | |
41 'link_settings': { | |
42 'libraries': [ | |
43 'CoreGraphics.framework', | |
44 'Foundation.framework', | |
45 'QuartzCore.framework', | |
46 'UIKit.framework', | |
47 'XCTest.framework', | |
48 ], | |
49 }, | |
50 'postbuilds': [ | |
51 { | |
52 'postbuild_name': 'Copy xctest to TEST_HOST', | |
53 'action': [ | |
54 'ditto', | |
55 '${BUILT_PRODUCTS_DIR}/ios_web_shell_test.xctest', | |
56 '${BUILT_PRODUCTS_DIR}/<(test_host_name).app/PlugIns/ios_web_she ll_test.xctest', | |
57 ], | |
58 }, | |
59 ], | 60 ], |
60 }, | 61 }, |
61 ], | 62 ], |
62 }, { # GENERATOR == ninja or GENERATOR_FLAVOR == ninja | 63 }, |
63 'targets': [ | 64 { |
65 # Create a test host for earl grey tests, so Xcode 7.3 and above | |
66 # doesn't contaminate the app structure. | |
67 'target_name': 'ios_web_shell_test_host', | |
68 'type': 'executable', | |
69 'mac_bundle': 1, | |
70 'dependencies': [ | |
71 'ios_web_shell.gyp:ios_web_shell', | |
72 ], | |
73 # This seems to be necessary to override these xcode-settings since the | |
74 # the way they are set in common.gypi | |
75 '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.
| |
76 'Debug': { | |
77 'xcode_settings': { | |
78 'STRIP_INSTALLED_PRODUCT': 'NO', | |
79 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', | |
80 }, | |
81 }, | |
82 'Release': { | |
83 'xcode_settings': { | |
84 'STRIP_INSTALLED_PRODUCT': 'NO', | |
85 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', | |
86 }, | |
87 }, | |
88 'Profile': { | |
89 'xcode_settings': { | |
90 'STRIP_INSTALLED_PRODUCT': 'NO', | |
91 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', | |
92 }, | |
93 }, | |
94 }, | |
95 'actions': [ | |
64 { | 96 { |
65 # The iOS frameworks being built for ios_web_shell_test require certs | 97 'action_name': 'rsync web shell', |
66 # which bot do not currently have installed. Ninja allows this, Xcode | 98 'inputs': [ |
67 # does not. | 99 '<(PRODUCT_DIR)/ios_web_shell.app' |
68 'target_name': 'ios_web_shell_test', | 100 ], |
69 'type': 'none', | 101 'outputs': [ |
102 '<(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
| |
103 ], | |
104 'action': [ | |
105 'rsync', | |
106 '-ah', | |
107 '${BUILT_PRODUCTS_DIR}/ios_web_shell.app/', | |
108 '${BUILT_PRODUCTS_DIR}/<(_target_name).app/', | |
109 # Don't delete Frameworks/ and Plugins/ when syncing. | |
110 '--exclude=Frameworks/', | |
111 '--exclude=PlugIns/', | |
112 '--delete', | |
113 ], | |
70 }, | 114 }, |
71 ], | 115 ], |
72 }], | 116 }, |
73 ], | 117 ], |
74 } | 118 } |
OLD | NEW |