OLD | NEW |
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 template("_gen_isolate") { | 9 template("_gen_isolate") { |
10 testonly = true | 10 testonly = true |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 ":${invoker.target_name}", | 274 ":${invoker.target_name}", |
275 ] | 275 ] |
276 } | 276 } |
277 } else if (is_ios) { | 277 } else if (is_ios) { |
278 import("//build/config/ios/rules.gni") | 278 import("//build/config/ios/rules.gni") |
279 | 279 |
280 _test_target = target_name | 280 _test_target = target_name |
281 _resources_bundle_data = target_name + "_resources_bundle_data" | 281 _resources_bundle_data = target_name + "_resources_bundle_data" |
282 | 282 |
283 bundle_data(_resources_bundle_data) { | 283 bundle_data(_resources_bundle_data) { |
284 visibility = [ ":*" ] | 284 visibility = [ ":$_test_target" ] |
285 sources = [ | 285 sources = [ |
286 "//testing/gtest_ios/Default.png", | 286 "//testing/gtest_ios/Default.png", |
287 ] | 287 ] |
288 outputs = [ | 288 outputs = [ |
289 "{{bundle_resources_dir}}/{{source_file_part}}", | 289 "{{bundle_resources_dir}}/{{source_file_part}}", |
290 ] | 290 ] |
291 } | 291 } |
292 | 292 |
293 ios_app_bundle(_test_target) { | 293 ios_app_bundle(_test_target) { |
294 testonly = true | 294 testonly = true |
(...skipping 18 matching lines...) Expand all Loading... |
313 | 313 |
314 if (!defined(extra_substitutions)) { | 314 if (!defined(extra_substitutions)) { |
315 extra_substitutions = [] | 315 extra_substitutions = [] |
316 } | 316 } |
317 extra_substitutions += [ "BUNDLE_ID_TEST_NAME=$app_name" ] | 317 extra_substitutions += [ "BUNDLE_ID_TEST_NAME=$app_name" ] |
318 | 318 |
319 if (!defined(deps)) { | 319 if (!defined(deps)) { |
320 deps = [] | 320 deps = [] |
321 } | 321 } |
322 deps += [ | 322 deps += [ |
323 ":$_resources_bundle_data", | |
324 | |
325 # All shared libraries must have the sanitizer deps to properly link in | 323 # All shared libraries must have the sanitizer deps to properly link in |
326 # asan mode (this target will be empty in other cases). | 324 # asan mode (this target will be empty in other cases). |
327 "//build/config/sanitizers:deps", | 325 "//build/config/sanitizers:deps", |
328 ] | 326 ] |
| 327 if (!defined(bundle_deps)) { |
| 328 bundle_deps = [] |
| 329 } |
| 330 bundle_deps += [ ":$_resources_bundle_data" ] |
329 } | 331 } |
330 } else { | 332 } else { |
331 executable(target_name) { | 333 executable(target_name) { |
332 deps = [] | 334 deps = [] |
333 forward_variables_from(invoker, "*") | 335 forward_variables_from(invoker, "*") |
334 | 336 |
335 testonly = true | 337 testonly = true |
336 deps += [ | 338 deps += [ |
337 # All shared libraries must have the sanitizer deps to properly link in | 339 # All shared libraries must have the sanitizer deps to properly link in |
338 # asan mode (this target will be empty in other cases). | 340 # asan mode (this target will be empty in other cases). |
(...skipping 25 matching lines...) Expand all Loading... |
364 } | 366 } |
365 | 367 |
366 # Test defaults. | 368 # Test defaults. |
367 set_defaults("test") { | 369 set_defaults("test") { |
368 if (is_android) { | 370 if (is_android) { |
369 configs = default_shared_library_configs | 371 configs = default_shared_library_configs |
370 } else { | 372 } else { |
371 configs = default_executable_configs | 373 configs = default_executable_configs |
372 } | 374 } |
373 } | 375 } |
OLD | NEW |