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") { ...@@ -295,6 +295,7 @@ template("ios_info_plist") {
extra_substitutions = invoker.extra_substitutions extra_substitutions = invoker.extra_substitutions
} }
extra_substitutions += [ extra_substitutions += [
"IOS_BUNDLE_ID_PREFIX=$ios_app_bundle_id_prefix",
"IOS_DEPLOYMENT_TARGET=$ios_deployment_target", "IOS_DEPLOYMENT_TARGET=$ios_deployment_target",
"IOS_PLATFORM_BUILD=$ios_platform_build", "IOS_PLATFORM_BUILD=$ios_platform_build",
"IOS_PLATFORM_NAME=$ios_sdk_name", "IOS_PLATFORM_NAME=$ios_sdk_name",
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string> <string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key> <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> <key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string> <string>6.0</string>
<key>CFBundleName</key> <key>CFBundleName</key>
...@@ -151,10 +151,10 @@ ...@@ -151,10 +151,10 @@
<dict> <dict>
<key>CFBundleURLSchemes</key> <key>CFBundleURLSchemes</key>
<array> <array>
<string>${BUNDLE_ID_TEST_NAME:rfc1034identifier}.http</string> <string>${PRODUCT_NAME:rfc1034identifier}.http</string>
<string>${BUNDLE_ID_TEST_NAME:rfc1034identifier}.https</string> <string>${PRODUCT_NAME:rfc1034identifier}.https</string>
<string>${BUNDLE_ID_TEST_NAME:rfc1034identifier}-x-callback</string> <string>${PRODUCT_NAME:rfc1034identifier}-x-callback</string>
<string>com.google.sso.${BUNDLE_ID_TEST_NAME:rfc1034identifier}</string> <string>${IOS_BUNDLE_ID_PREFIX}.sso.${PRODUCT_NAME:rfc1034identifier}</string>
</array> </array>
</dict> </dict>
</array> </array>
...@@ -187,6 +187,6 @@ ...@@ -187,6 +187,6 @@
<string>fetch</string> <string>fetch</string>
</array> </array>
<key>SSOAuthURLScheme</key> <key>SSOAuthURLScheme</key>
<string>com.google.sso.${BUNDLE_ID_TEST_NAME:rfc1034identifier}</string> <string>${IOS_BUNDLE_ID_PREFIX}.sso.${PRODUCT_NAME:rfc1034identifier}</string>
</dict> </dict>
</plist> </plist>
...@@ -249,10 +249,16 @@ template("test") { ...@@ -249,10 +249,16 @@ template("test") {
info_plist = "//testing/gtest_ios/unittest-Info.plist" 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)) { if (!defined(extra_substitutions)) {
extra_substitutions = [] extra_substitutions = []
} }
extra_substitutions += [ "BUNDLE_ID_TEST_NAME=$target_name" ] extra_substitutions += [ "GTEST_BUNDLE_ID_SUFFIX=$_bundle_id_suffix" ]
if (!defined(deps)) { if (!defined(deps)) {
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