Respect ios_automatically_manage_certs when building EG tests.
When the ios_automatically_manage_certs variable is set to true, restrict the number of different Bundle Identifiers are used by the build (as they are currently limited to 10 free certs per day). BUG=613543 Review-Url: https://codereview.chromium.org/2709223002 Cr-Original-Commit-Position: refs/heads/master@{#452529} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: eb7eea750b9604ca75254a775f9d381514966196
This commit is contained in:
Родитель
902b634cd8
Коммит
2122d3e732
|
@ -57,6 +57,8 @@ assert(custom_toolchain == "" || additional_target_cpus == [],
|
|||
|
||||
use_ios_simulator = current_cpu == "x86" || current_cpu == "x64"
|
||||
|
||||
ios_generic_test_bundle_id_suffix = "generic-unit-test"
|
||||
|
||||
# Initialize additional_toolchains from additional_target_cpus. Assert here
|
||||
# that the list does not contains $target_cpu nor duplicates as this would
|
||||
# cause weird errors during the build.
|
||||
|
|
|
@ -1386,8 +1386,17 @@ template("ios_xctest_test") {
|
|||
ios_info_plist(_xctest_info_plist_target) {
|
||||
visibility = [ ":$_xctest_info_plist_bundle" ]
|
||||
info_plist = "//build/config/ios/Module-Info.plist"
|
||||
extra_substitutions = [ "MODULE_NAME=$_xctest_output" ]
|
||||
executable_name = _host_output
|
||||
if (ios_automatically_manage_certs) {
|
||||
# Use the same bundle identifier for EarlGrey tests as for unit tests
|
||||
# when managing certificates as the number of free certs is limited.
|
||||
extra_substitutions = [
|
||||
"EXECUTABLE_NAME=gtest.${ios_generic_test_bundle_id_suffix}",
|
||||
"MODULE_NAME=${ios_generic_test_bundle_id_suffix}-module",
|
||||
]
|
||||
} else {
|
||||
extra_substitutions = [ "MODULE_NAME=$_xctest_output" ]
|
||||
}
|
||||
}
|
||||
|
||||
bundle_data(_xctest_info_plist_bundle) {
|
||||
|
@ -1454,6 +1463,15 @@ template("ios_xctest_test") {
|
|||
|
||||
if (!defined(invoker.info_plist) && !defined(invoker.info_plist_target)) {
|
||||
info_plist = "//build/config/ios/Host-Info.plist"
|
||||
if (ios_automatically_manage_certs) {
|
||||
# Use the same bundle identifier for EarlGrey tests as for unit tests
|
||||
# when managing certificates as the number of free certs is limited.
|
||||
if (!defined(extra_substitutions)) {
|
||||
extra_substitutions = []
|
||||
}
|
||||
extra_substitutions +=
|
||||
[ "EXECUTABLE_NAME=gtest.${ios_generic_test_bundle_id_suffix}" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Xcode needs those two framework installed in the application (and signed)
|
||||
|
|
Загрузка…
Ссылка в новой задаче