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

Side by Side Diff: testing/test.gni

Issue 1250913002: patch from chinmaygarde@ to make progress on mac, ios. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tweaks needed to get base_unittests to compile Created 5 years, 5 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 group(target_name) { 145 group(target_name) {
146 testonly = true 146 testonly = true
147 datadeps = [ 147 datadeps = [
148 ":$test_runner_script_name", 148 ":$test_runner_script_name",
149 ] 149 ]
150 deps = [ 150 deps = [
151 ":$library_name", 151 ":$library_name",
152 ":$apk_name", 152 ":$apk_name",
153 ] 153 ]
154 } 154 }
155 } else if (is_ios) {
156 if (is_ios) {
157 import("//build/config/ios/rules.gni")
158 }
159
160 target__sources_name = "${target_name}__sources"
161 if (defined(invoker.sources)) {
162 source_set(target__sources_name) {
163 sources = invoker.sources
164 testonly = true
165
166 configs = [] # Prevent list overwriting warning.
167 configs += invoker.configs
168
169 if (defined(invoker.data)) {
170 data = invoker.data
171 }
172 if (defined(invoker.deps)) {
173 deps = invoker.deps
174 }
175 if (defined(invoker.data_deps)) {
176 data_deps = invoker.data_deps
177 }
178 if (defined(invoker.datadeps)) {
179 datadeps = invoker.datadeps
180 }
181 if (defined(invoker.defines)) {
182 defines = invoker.defines
183 }
184 if (defined(invoker.includes)) {
185 defines = invoker.includes
186 }
187 }
188 }
189
190 ios_app(target_name) {
191 info_plist = "//testing/gtest_ios/unittest-Info.plist"
sdefresne 2015/07/25 19:15:30 Some unit tests on iOS do specify different Info.p
Dirk Pranke 2015/07/31 21:27:41 Added a TODO.
192 app_name = target_name
193 entitlements_path = "//testing/gtest_ios"
194 code_signing_identity = ""
195 testonly = true
196
197 # See above call.
198 set_sources_assignment_filter([])
199
200 if (defined(invoker.all_dependent_configs)) {
201 all_dependent_configs = invoker.all_dependent_configs
202 }
203 if (defined(invoker.allow_circular_includes_from)) {
204 allow_circular_includes_from = invoker.allow_circular_includes_from
205 }
206 if (defined(invoker.cflags)) {
207 cflags = invoker.cflags
208 }
209 if (defined(invoker.cflags_c)) {
210 cflags_c = invoker.cflags_c
211 }
212 if (defined(invoker.cflags_cc)) {
213 cflags_cc = invoker.cflags_cc
214 }
215 if (defined(invoker.cflags_objc)) {
216 cflags_objc = invoker.cflags_objc
217 }
218 if (defined(invoker.cflags_objcc)) {
219 cflags_objcc = invoker.cflags_objcc
220 }
221 if (defined(invoker.check_includes)) {
222 check_includes = invoker.check_includes
223 }
224
225 if (defined(invoker.deps)) {
226 deps = invoker.deps
227 } else {
228 deps = []
229 }
230 deps += [
231 # All shared libraries must have the sanitizer deps to properly link in
232 # asan mode (this target will be empty in other cases).
233 "//build/config/sanitizers:deps",
234
235 # Give tests the default manifest on Windows (a no-op elsewhere).
236 "//build/win:default_exe_manifest",
sdefresne 2015/07/25 19:15:30 Can we omit this since it is a noop?
Dirk Pranke 2015/07/31 21:27:41 Done.
237 ]
238
239 if (defined(invoker.forward_dependent_configs_from)) {
240 forward_dependent_configs_from = invoker.forward_dependent_configs_from
241 }
242 if (defined(invoker.include_dirs)) {
243 include_dirs = invoker.include_dirs
244 }
245 if (defined(invoker.ldflags)) {
246 ldflags = invoker.ldflags
247 }
248 if (defined(invoker.lib_dirs)) {
249 lib_dirs = invoker.lib_dirs
250 }
251 if (defined(invoker.libs)) {
252 libs = invoker.libs
253 }
254 if (defined(invoker.output_extension)) {
255 output_extension = invoker.output_extension
256 }
257 if (defined(invoker.output_name)) {
258 output_name = invoker.output_name
259 }
260 if (defined(invoker.public)) {
261 public = invoker.public
262 }
263 if (defined(invoker.public_configs)) {
264 public_configs = invoker.public_configs
265 }
266 if (defined(invoker.public_deps)) {
267 public_deps = invoker.public_deps
268 }
269 if (defined(invoker.sources)) {
270 deps += [ ":${target__sources_name}" ]
271 }
272 if (defined(invoker.visibility)) {
273 visibility = invoker.visibility
274 }
275 }
155 } else { 276 } else {
156 executable(target_name) { 277 executable(target_name) {
157 # See above. 278 # See above.
158 configs = [] # Prevent list overwriting warning. 279 configs = [] # Prevent list overwriting warning.
159 configs = invoker.configs 280 configs = invoker.configs
160 281
161 # See above call. 282 # See above call.
162 set_sources_assignment_filter([]) 283 set_sources_assignment_filter([])
163 284
164 testonly = true 285 testonly = true
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 367 }
247 if (defined(invoker.sources)) { 368 if (defined(invoker.sources)) {
248 sources = invoker.sources 369 sources = invoker.sources
249 } 370 }
250 if (defined(invoker.visibility)) { 371 if (defined(invoker.visibility)) {
251 visibility = invoker.visibility 372 visibility = invoker.visibility
252 } 373 }
253 } 374 }
254 } 375 }
255 } 376 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698