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

Side by Side Diff: build/config/ios/rules.gni

Issue 2709223002: Respect ios_automatically_manage_certs when building EG tests. (Closed)
Patch Set: Address comment. Created 3 years, 10 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
« no previous file with comments | « build/config/ios/ios_sdk.gni ('k') | ios/chrome/test/earl_grey/chrome_ios_eg_test.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import("//build/config/ios/ios_sdk.gni") 5 import("//build/config/ios/ios_sdk.gni")
6 import("//build/config/mac/base_rules.gni") 6 import("//build/config/mac/base_rules.gni")
7 import("//build/config/mac/symbols.gni") 7 import("//build/config/mac/symbols.gni")
8 import("//build/toolchain/toolchain.gni") 8 import("//build/toolchain/toolchain.gni")
9 9
10 # Invokes lipo on multiple arch-specific binaries to create a fat binary. 10 # Invokes lipo on multiple arch-specific binaries to create a fat binary.
(...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 public_deps = [ 1379 public_deps = [
1380 ":$_xctest_arch_loadable_module_target", 1380 ":$_xctest_arch_loadable_module_target",
1381 ] 1381 ]
1382 } 1382 }
1383 } else { 1383 } else {
1384 _xctest_info_plist_target = _xctest_target + "_info_plist" 1384 _xctest_info_plist_target = _xctest_target + "_info_plist"
1385 _xctest_info_plist_bundle = _xctest_target + "_info_plist_bundle" 1385 _xctest_info_plist_bundle = _xctest_target + "_info_plist_bundle"
1386 ios_info_plist(_xctest_info_plist_target) { 1386 ios_info_plist(_xctest_info_plist_target) {
1387 visibility = [ ":$_xctest_info_plist_bundle" ] 1387 visibility = [ ":$_xctest_info_plist_bundle" ]
1388 info_plist = "//build/config/ios/Module-Info.plist" 1388 info_plist = "//build/config/ios/Module-Info.plist"
1389 extra_substitutions = [ "MODULE_NAME=$_xctest_output" ]
1390 executable_name = _host_output 1389 executable_name = _host_output
1390 if (ios_automatically_manage_certs) {
1391 # Use the same bundle identifier for EarlGrey tests as for unit tests
1392 # when managing certificates as the number of free certs is limited.
1393 extra_substitutions = [
1394 "EXECUTABLE_NAME=gtest.${ios_generic_test_bundle_id_suffix}",
1395 "MODULE_NAME=${ios_generic_test_bundle_id_suffix}-module",
1396 ]
1397 } else {
1398 extra_substitutions = [ "MODULE_NAME=$_xctest_output" ]
1399 }
1391 } 1400 }
1392 1401
1393 bundle_data(_xctest_info_plist_bundle) { 1402 bundle_data(_xctest_info_plist_bundle) {
1394 visibility = [ ":$_xctest_target" ] 1403 visibility = [ ":$_xctest_target" ]
1395 public_deps = [ 1404 public_deps = [
1396 ":$_xctest_info_plist_target", 1405 ":$_xctest_info_plist_target",
1397 ] 1406 ]
1398 sources = get_target_outputs(":$_xctest_info_plist_target") 1407 sources = get_target_outputs(":$_xctest_info_plist_target")
1399 outputs = [ 1408 outputs = [
1400 "{{bundle_root_dir}}/Info.plist", 1409 "{{bundle_root_dir}}/Info.plist",
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 1456
1448 ios_app_bundle(_host_target) { 1457 ios_app_bundle(_host_target) {
1449 forward_variables_from(invoker, "*", [ "testonly" ]) 1458 forward_variables_from(invoker, "*", [ "testonly" ])
1450 1459
1451 testonly = true 1460 testonly = true
1452 output_name = _host_output 1461 output_name = _host_output
1453 configs += [ "//build/config/ios:xctest_config" ] 1462 configs += [ "//build/config/ios:xctest_config" ]
1454 1463
1455 if (!defined(invoker.info_plist) && !defined(invoker.info_plist_target)) { 1464 if (!defined(invoker.info_plist) && !defined(invoker.info_plist_target)) {
1456 info_plist = "//build/config/ios/Host-Info.plist" 1465 info_plist = "//build/config/ios/Host-Info.plist"
1466 if (ios_automatically_manage_certs) {
1467 # Use the same bundle identifier for EarlGrey tests as for unit tests
1468 # when managing certificates as the number of free certs is limited.
1469 if (!defined(extra_substitutions)) {
1470 extra_substitutions = []
1471 }
1472 extra_substitutions +=
1473 [ "EXECUTABLE_NAME=gtest.${ios_generic_test_bundle_id_suffix}" ]
1474 }
1457 } 1475 }
1458 1476
1459 # Xcode needs those two framework installed in the application (and signed) 1477 # Xcode needs those two framework installed in the application (and signed)
1460 # for the XCTest to run, so install them using extra_system_frameworks. 1478 # for the XCTest to run, so install them using extra_system_frameworks.
1461 _ios_platform_library = "$ios_sdk_platform_path/Developer/Library" 1479 _ios_platform_library = "$ios_sdk_platform_path/Developer/Library"
1462 extra_system_frameworks = [ 1480 extra_system_frameworks = [
1463 "$_ios_platform_library/Frameworks/XCTest.framework", 1481 "$_ios_platform_library/Frameworks/XCTest.framework",
1464 "$_ios_platform_library/PrivateFrameworks/IDEBundleInjection.framework", 1482 "$_ios_platform_library/PrivateFrameworks/IDEBundleInjection.framework",
1465 ] 1483 ]
1466 1484
(...skipping 16 matching lines...) Expand all
1483 "-rpath", 1501 "-rpath",
1484 "-Xlinker", 1502 "-Xlinker",
1485 "@loader_path/Frameworks", 1503 "@loader_path/Frameworks",
1486 ] 1504 ]
1487 } 1505 }
1488 } 1506 }
1489 1507
1490 set_defaults("ios_xctest_test") { 1508 set_defaults("ios_xctest_test") {
1491 configs = default_executable_configs 1509 configs = default_executable_configs
1492 } 1510 }
OLDNEW
« no previous file with comments | « build/config/ios/ios_sdk.gni ('k') | ios/chrome/test/earl_grey/chrome_ios_eg_test.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698