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

Unified Diff: testing/test.gni

Issue 2043843003: [iOS/GN] Allow overriding parameters of "ios_app_bundle" in "test" template. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/test.gni
diff --git a/testing/test.gni b/testing/test.gni
index 53e84153aebdaacfb201d3401645399db0ec4c9d..385bc535d47dad8d224c09a7cb808716b13da540 100644
--- a/testing/test.gni
+++ b/testing/test.gni
@@ -292,13 +292,24 @@ template("test") {
}
ios_app_bundle(_test_target) {
- # TODO: Make this configurable and only provide a default that can be
- # overridden.
- info_plist = "//testing/gtest_ios/unittest-Info.plist"
- entitlements_path = "//testing/gtest_ios"
- code_signing_identity = ""
testonly = true
+ # See above call.
+ set_sources_assignment_filter([])
+ forward_variables_from(invoker, "*", [ "testonly" ])
+
+ # Provide sensible defaults in case invoker did not define any of those
+ # required variables.
+ if (!defined(info_plist)) {
+ info_plist = "//testing/gtest_ios/unittest-Info.plist"
+ }
+ if (!defined(entitlements_path)) {
+ entitlements_path = "//testing/gtest_ios"
+ }
+ if (!defined(code_signing_identity)) {
+ code_signing_identity = ""
+ }
+
# TODO(crbug.com/603102): remove this once gyp support is dropped and all
# application uses the target name as value for BUNDLE_ID_TEST_NAME.
if (defined(invoker.app_name)) {
@@ -307,12 +318,10 @@ template("test") {
app_name = target_name
}
- extra_substitutions = [ "BUNDLE_ID_TEST_NAME=$app_name" ]
-
- # See above call.
- set_sources_assignment_filter([])
-
- forward_variables_from(invoker, "*")
+ if (!defined(extra_substitutions)) {
+ extra_substitutions = []
+ }
+ extra_substitutions += [ "BUNDLE_ID_TEST_NAME=$app_name" ]
if (!defined(deps)) {
deps = []
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698