Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: testing/test.gni

Issue 1611363003: Add support for iOS application bundle to GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-bundles
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 # TEST SETUP 6 # TEST SETUP
7 # ============================================================================== 7 # ==============================================================================
8 8
9 # Define a test as an executable (or apk on Android) with the "testonly" flag 9 # Define a test as an executable (or apk on Android) with the "testonly" flag
10 # set. 10 # set.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 group("${target_name}_incremental") { 116 group("${target_name}_incremental") {
117 testonly = true 117 testonly = true
118 datadeps = [ 118 datadeps = [
119 ":$incremental_test_runner_script_name", 119 ":$incremental_test_runner_script_name",
120 ] 120 ]
121 deps = [ 121 deps = [
122 ":${apk_name}_incremental", 122 ":${apk_name}_incremental",
123 ] 123 ]
124 } 124 }
125 } else if (is_ios) { 125 } else if (is_ios) {
126 if (is_ios) { 126 import("//build/config/ios/ios_sdk.gni")
127 import("//build/config/ios/rules.gni") 127 import("//build/config/ios/rules.gni")
128 }
129 128
130 ios_app(target_name) { 129 ios_test_app(target_name) {
131 # TODO(GYP): Make this configurable and only provide a default
132 # that can be overridden.
133 info_plist = "//testing/gtest_ios/unittest-Info.plist"
134 app_name = target_name
135 entitlements_path = "//testing/gtest_ios"
136 code_signing_identity = ""
137 testonly = true
138
139 # See above call.
140 set_sources_assignment_filter([])
141
142 forward_variables_from(invoker, 130 forward_variables_from(invoker,
143 [ 131 [
132 # Arguments specific to ios_test_app target.
133 "app_name",
134 "code_signing_identity",
135 "entitlements_path",
136 "extra_substitutions",
137 "info_plist",
138 "test_data_files",
139
140 # Arguments supported by executable target.
144 "all_dependent_configs", 141 "all_dependent_configs",
145 "allow_circular_includes_from", 142 "allow_circular_includes_from",
143 "asmflags",
144 "bundle_data",
146 "cflags", 145 "cflags",
147 "cflags_c", 146 "cflags_c",
148 "cflags_cc", 147 "cflags_cc",
149 "cflags_objc",
150 "cflags_objcc", 148 "cflags_objcc",
151 "check_includes", 149 "check_includes",
152 "configs", 150 "configs",
153 "data", 151 "data",
154 "data_deps", 152 "data_deps",
155 "defines", 153 "defines",
154 "deps",
156 "include_dirs", 155 "include_dirs",
156 "inputs",
157 "ldflags", 157 "ldflags",
158 "lib_dirs",
158 "libs", 159 "libs",
159 "output_extension", 160 "output_extension",
160 "output_name", 161 "output_name",
162 "precompiled_header",
163 "precompiled_source",
161 "public", 164 "public",
162 "public_configs", 165 "public_configs",
163 "public_deps", 166 "public_deps",
164 "sources", 167 "sources",
165 "visibility", 168 "visibility",
166 ]) 169 ])
170 testonly = true
167 171
168 if (defined(invoker.deps)) { 172 _app_name = target_name
169 deps = invoker.deps 173 if (defined(invoker.app_name)) {
170 } else { 174 _app_name = invoker.app_name
175 }
176 _bundle_test_name = _app_name
177 if (defined(invoker.bundle_test_name)) {
178 _bundle_test_name = invoker.bundle_test_name
179 }
180
181 if (!defined(invoker.extra_substitutions)) {
182 extra_substitutions = []
183 }
184 extra_substitutions += [ "BUNDLE_ID_TEST_NAME=$_bundle_test_name" ]
185
186 if (!defined(invoker.bundle_data)) {
187 bundle_data = []
188 }
189 bundle_data += [ "//testing/gtest_ios/Default.png" ]
190
191 if (!defined(invoker.info_plist)) {
192 info_plist = "//testing/gtest_ios/unittest-Info.plist"
193 }
194
195 if (!defined(invoker.entitlements_path)) {
196 entitlements_path = ""
197 }
198
199 if (!defined(invoker.code_signing_identity)) {
200 code_signing_identity = ios_code_signing_identity
201 }
202
203 if (!defined(invoker.deps)) {
brettw 2016/01/22 19:00:12 I'd make this: if (!defined(deps)) { now.
sdefresne 2016/01/25 14:01:22 Done.
171 deps = [] 204 deps = []
172 } 205 }
173 deps += [ 206 deps += [
174 # All shared libraries must have the sanitizer deps to properly link in 207 # All shared libraries must have the sanitizer deps to properly link in
175 # asan mode (this target will be empty in other cases). 208 # asan mode (this target will be empty in other cases).
176 "//build/config/sanitizers:deps", 209 "//build/config/sanitizers:deps",
177 ] 210 ]
178 } 211 }
179 } else { 212 } else {
180 executable(target_name) { 213 executable(target_name) {
181 forward_variables_from(invoker, "*") 214 forward_variables_from(invoker, "*")
182 215
183 testonly = true 216 testonly = true
184 217
185 if (!defined(invoker.deps)) { 218 if (!defined(invoker.deps)) {
186 deps = [] 219 deps = []
187 } 220 }
188 deps += [ 221 deps += [
189 # All shared libraries must have the sanitizer deps to properly link in 222 # All shared libraries must have the sanitizer deps to properly link in
190 # asan mode (this target will be empty in other cases). 223 # asan mode (this target will be empty in other cases).
191 "//build/config/sanitizers:deps", 224 "//build/config/sanitizers:deps",
192 225
193 # Give tests the default manifest on Windows (a no-op elsewhere). 226 # Give tests the default manifest on Windows (a no-op elsewhere).
194 "//build/win:default_exe_manifest", 227 "//build/win:default_exe_manifest",
195 ] 228 ]
196 } 229 }
197 } 230 }
198 } 231 }
OLDNEW
« build/config/ios/ios_gen_plist.py ('K') | « build/toolchain/mac/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698