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

Unified Diff: testing/test.gni

Issue 1611363003: Add support for iOS application bundle to GN. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-bundles
Patch Set: Filter .xcassets from the copy_bundle_data step Created 4 years, 11 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
« build/config/ios/rules.gni ('K') | « build/toolchain/mac/BUILD.gn ('k') | 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 6739bfebb21ce85f18903e934fe9822658d2f109..8898fb16902bf4af9d69911a79af43ae9b1d3a42 100644
--- a/testing/test.gni
+++ b/testing/test.gni
@@ -123,51 +123,41 @@ template("test") {
]
}
} else if (is_ios) {
- if (is_ios) {
- import("//build/config/ios/rules.gni")
- }
+ import("//build/config/ios/ios_sdk.gni")
+ import("//build/config/ios/rules.gni")
- ios_app(target_name) {
- # TODO(GYP): Make this configurable and only provide a default
- # that can be overridden.
- info_plist = "//testing/gtest_ios/unittest-Info.plist"
- app_name = target_name
- entitlements_path = "//testing/gtest_ios"
- code_signing_identity = ""
+ ios_test_app(target_name) {
+ forward_variables_from(invoker, "*", [ "bundle_test_name" ])
testonly = true
- # See above call.
- set_sources_assignment_filter([])
+ if (defined(invoker.bundle_test_name)) {
+ _bundle_test_name = invoker.bundle_test_name
+ } else if (defined(app_name)) {
+ _bundle_test_name = app_name
+ } else {
+ _bundle_test_name = target_name
+ }
- forward_variables_from(invoker,
- [
- "all_dependent_configs",
- "allow_circular_includes_from",
- "cflags",
- "cflags_c",
- "cflags_cc",
- "cflags_objc",
- "cflags_objcc",
- "check_includes",
- "configs",
- "data",
- "data_deps",
- "defines",
- "include_dirs",
- "ldflags",
- "libs",
- "output_extension",
- "output_name",
- "public",
- "public_configs",
- "public_deps",
- "sources",
- "visibility",
- ])
+ if (!defined(extra_substitutions)) {
+ extra_substitutions = []
+ }
+ extra_substitutions += [ "BUNDLE_ID_TEST_NAME=$_bundle_test_name" ]
- if (defined(invoker.deps)) {
- deps = invoker.deps
- } else {
+ if (!defined(bundle_data)) {
+ bundle_data = []
+ }
+ bundle_data += [ "//testing/gtest_ios/Default.png" ]
+ info_plist = "//testing/gtest_ios/unittest-Info.plist"
+
+ if (!defined(entitlements_path)) {
+ entitlements_path = ""
+ }
+
+ if (!defined(code_signing_identity)) {
+ code_signing_identity = ios_code_signing_identity
+ }
+
+ if (!defined(deps)) {
deps = []
}
deps += [
« build/config/ios/rules.gni ('K') | « build/toolchain/mac/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698