| 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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 ] | 285 ] |
| 286 sources = [ | 286 sources = [ |
| 287 "//testing/gtest_ios/Default.png", | 287 "//testing/gtest_ios/Default.png", |
| 288 ] | 288 ] |
| 289 outputs = [ | 289 outputs = [ |
| 290 "{{bundle_resources_dir}}/{{source_file_part}}", | 290 "{{bundle_resources_dir}}/{{source_file_part}}", |
| 291 ] | 291 ] |
| 292 } | 292 } |
| 293 | 293 |
| 294 ios_app_bundle(_test_target) { | 294 ios_app_bundle(_test_target) { |
| 295 # TODO: Make this configurable and only provide a default that can be | |
| 296 # overridden. | |
| 297 info_plist = "//testing/gtest_ios/unittest-Info.plist" | |
| 298 entitlements_path = "//testing/gtest_ios" | |
| 299 code_signing_identity = "" | |
| 300 testonly = true | 295 testonly = true |
| 301 | 296 |
| 297 # See above call. |
| 298 set_sources_assignment_filter([]) |
| 299 forward_variables_from(invoker, "*", [ "testonly" ]) |
| 300 |
| 301 # Provide sensible defaults in case invoker did not define any of those |
| 302 # required variables. |
| 303 if (!defined(info_plist)) { |
| 304 info_plist = "//testing/gtest_ios/unittest-Info.plist" |
| 305 } |
| 306 if (!defined(entitlements_path)) { |
| 307 entitlements_path = "//testing/gtest_ios" |
| 308 } |
| 309 if (!defined(code_signing_identity)) { |
| 310 code_signing_identity = "" |
| 311 } |
| 312 |
| 302 # TODO(crbug.com/603102): remove this once gyp support is dropped and all | 313 # TODO(crbug.com/603102): remove this once gyp support is dropped and all |
| 303 # application uses the target name as value for BUNDLE_ID_TEST_NAME. | 314 # application uses the target name as value for BUNDLE_ID_TEST_NAME. |
| 304 if (defined(invoker.app_name)) { | 315 if (defined(invoker.app_name)) { |
| 305 app_name = invoker.app_name | 316 app_name = invoker.app_name |
| 306 } else { | 317 } else { |
| 307 app_name = target_name | 318 app_name = target_name |
| 308 } | 319 } |
| 309 | 320 |
| 310 extra_substitutions = [ "BUNDLE_ID_TEST_NAME=$app_name" ] | 321 if (!defined(extra_substitutions)) { |
| 311 | 322 extra_substitutions = [] |
| 312 # See above call. | 323 } |
| 313 set_sources_assignment_filter([]) | 324 extra_substitutions += [ "BUNDLE_ID_TEST_NAME=$app_name" ] |
| 314 | |
| 315 forward_variables_from(invoker, "*") | |
| 316 | 325 |
| 317 if (!defined(deps)) { | 326 if (!defined(deps)) { |
| 318 deps = [] | 327 deps = [] |
| 319 } | 328 } |
| 320 deps += [ | 329 deps += [ |
| 321 ":$_resources_bundle_data", | 330 ":$_resources_bundle_data", |
| 322 | 331 |
| 323 # All shared libraries must have the sanitizer deps to properly link in | 332 # All shared libraries must have the sanitizer deps to properly link in |
| 324 # asan mode (this target will be empty in other cases). | 333 # asan mode (this target will be empty in other cases). |
| 325 "//build/config/sanitizers:deps", | 334 "//build/config/sanitizers:deps", |
| (...skipping 27 matching lines...) Expand all Loading... |
| 353 if (defined(invoker.output_name) && target_name != invoker.output_name) { | 362 if (defined(invoker.output_name) && target_name != invoker.output_name) { |
| 354 group("${invoker.output_name}_run") { | 363 group("${invoker.output_name}_run") { |
| 355 testonly = true | 364 testonly = true |
| 356 deps = [ | 365 deps = [ |
| 357 ":${invoker.target_name}", | 366 ":${invoker.target_name}", |
| 358 ] | 367 ] |
| 359 } | 368 } |
| 360 } | 369 } |
| 361 } | 370 } |
| 362 } | 371 } |
| OLD | NEW |