Commit ae44722d authored by sdefresne's avatar sdefresne Committed by Commit bot

Use "Organization Identifier" as prefix for gtest CFBundleIdentifier.

Respect the ios_app_bundle_id_prefix and ios_automatically_manage_certs
when generating the Info.plist file for unit tests targets on iOS.

BUG=613543

Review-Url: https://codereview.chromium.org/2441793002
Cr-Commit-Position: refs/heads/master@{#427057}
parent 839adb26
......@@ -295,6 +295,7 @@ template("ios_info_plist") {
extra_substitutions = invoker.extra_substitutions
}
extra_substitutions += [
"IOS_BUNDLE_ID_PREFIX=$ios_app_bundle_id_prefix",
"IOS_DEPLOYMENT_TARGET=$ios_deployment_target",
"IOS_PLATFORM_BUILD=$ios_platform_build",
"IOS_PLATFORM_NAME=$ios_sdk_name",
......
......@@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.google.gtest.${BUNDLE_ID_TEST_NAME:rfc1034identifier}</string>
<string>${IOS_BUNDLE_ID_PREFIX}.gtest.${GTEST_BUNDLE_ID_SUFFIX:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
......@@ -151,10 +151,10 @@
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>${BUNDLE_ID_TEST_NAME:rfc1034identifier}.http</string>
<string>${BUNDLE_ID_TEST_NAME:rfc1034identifier}.https</string>
<string>${BUNDLE_ID_TEST_NAME:rfc1034identifier}-x-callback</string>
<string>com.google.sso.${BUNDLE_ID_TEST_NAME:rfc1034identifier}</string>
<string>${PRODUCT_NAME:rfc1034identifier}.http</string>
<string>${PRODUCT_NAME:rfc1034identifier}.https</string>
<string>${PRODUCT_NAME:rfc1034identifier}-x-callback</string>
<string>${IOS_BUNDLE_ID_PREFIX}.sso.${PRODUCT_NAME:rfc1034identifier}</string>
</array>
</dict>
</array>
......@@ -187,6 +187,6 @@
<string>fetch</string>
</array>
<key>SSOAuthURLScheme</key>
<string>com.google.sso.${BUNDLE_ID_TEST_NAME:rfc1034identifier}</string>
<string>${IOS_BUNDLE_ID_PREFIX}.sso.${PRODUCT_NAME:rfc1034identifier}</string>
</dict>
</plist>
......@@ -249,10 +249,16 @@ template("test") {
info_plist = "//testing/gtest_ios/unittest-Info.plist"
}
_bundle_id_suffix = target_name
if (ios_automatically_manage_certs) {
# Use the same bundle identifier for all unit tests when managing
# certificates automatically as the number of free certs is limited.
_bundle_id_suffix = "generic-unit-test"
}
if (!defined(extra_substitutions)) {
extra_substitutions = []
}
extra_substitutions += [ "BUNDLE_ID_TEST_NAME=$target_name" ]
extra_substitutions += [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
if (!defined(deps)) {
deps = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment