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

Side by Side 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: Address comments 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 unified diff | Download patch
« build/toolchain/mac/BUILD.gn ('K') | « build/toolchain/mac/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # ============================================================================== 5 # ==============================================================================
6 # TEST SETUP 6 # TEST SETUP
7 # ============================================================================== 7 # ==============================================================================
8 8
9 # Define a test as an executable (or apk on Android) with the "testonly" flag 9 # Define a test as an executable (or apk on Android) with the "testonly" flag
10 # set. 10 # set.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 group("${target_name}_incremental") { 116 group("${target_name}_incremental") {
117 testonly = true 117 testonly = true
118 datadeps = [ 118 datadeps = [
119 ":$incremental_test_runner_script_name", 119 ":$incremental_test_runner_script_name",
120 ] 120 ]
121 deps = [ 121 deps = [
122 ":${apk_name}_incremental", 122 ":${apk_name}_incremental",
123 ] 123 ]
124 } 124 }
125 } else if (is_ios) { 125 } else if (is_ios) {
126 if (is_ios) { 126 import("//build/config/ios/ios_sdk.gni")
127 import("//build/config/ios/rules.gni") 127 import("//build/config/ios/rules.gni")
128 }
129 128
130 ios_app(target_name) { 129 ios_test_app(target_name) {
131 # TODO(GYP): Make this configurable and only provide a default 130 forward_variables_from(invoker, "*", [ "bundle_test_name" ])
132 # that can be overridden.
133 info_plist = "//testing/gtest_ios/unittest-Info.plist"
134 app_name = target_name
135 entitlements_path = "//testing/gtest_ios"
136 code_signing_identity = ""
137 testonly = true 131 testonly = true
138 132
139 # See above call. 133 if (defined(invoker.bundle_test_name)) {
140 set_sources_assignment_filter([]) 134 _bundle_test_name = invoker.bundle_test_name
135 } else if (defined(app_name)) {
136 _bundle_test_name = app_name
137 } else {
138 _bundle_test_name = target_name
139 }
141 140
142 forward_variables_from(invoker, 141 if (!defined(extra_substitutions)) {
143 [ 142 extra_substitutions = []
144 "all_dependent_configs", 143 }
145 "allow_circular_includes_from", 144 extra_substitutions += [ "BUNDLE_ID_TEST_NAME=$_bundle_test_name" ]
146 "cflags",
147 "cflags_c",
148 "cflags_cc",
149 "cflags_objc",
150 "cflags_objcc",
151 "check_includes",
152 "configs",
153 "data",
154 "data_deps",
155 "defines",
156 "include_dirs",
157 "ldflags",
158 "libs",
159 "output_extension",
160 "output_name",
161 "public",
162 "public_configs",
163 "public_deps",
164 "sources",
165 "visibility",
166 ])
167 145
168 if (defined(invoker.deps)) { 146 if (!defined(bundle_data)) {
169 deps = invoker.deps 147 bundle_data = []
170 } else { 148 }
149 bundle_data += [ "//testing/gtest_ios/Default.png" ]
150 info_plist = "//testing/gtest_ios/unittest-Info.plist"
151
152 if (!defined(entitlements_path)) {
153 entitlements_path = ""
154 }
155
156 if (!defined(code_signing_identity)) {
157 code_signing_identity = ios_code_signing_identity
158 }
159
160 if (!defined(deps)) {
171 deps = [] 161 deps = []
172 } 162 }
173 deps += [ 163 deps += [
174 # All shared libraries must have the sanitizer deps to properly link in 164 # All shared libraries must have the sanitizer deps to properly link in
175 # asan mode (this target will be empty in other cases). 165 # asan mode (this target will be empty in other cases).
176 "//build/config/sanitizers:deps", 166 "//build/config/sanitizers:deps",
177 ] 167 ]
178 } 168 }
179 } else { 169 } else {
180 executable(target_name) { 170 executable(target_name) {
181 forward_variables_from(invoker, "*") 171 forward_variables_from(invoker, "*")
182 172
183 testonly = true 173 testonly = true
184 174
185 if (!defined(invoker.deps)) { 175 if (!defined(invoker.deps)) {
186 deps = [] 176 deps = []
187 } 177 }
188 deps += [ 178 deps += [
189 # All shared libraries must have the sanitizer deps to properly link in 179 # All shared libraries must have the sanitizer deps to properly link in
190 # asan mode (this target will be empty in other cases). 180 # asan mode (this target will be empty in other cases).
191 "//build/config/sanitizers:deps", 181 "//build/config/sanitizers:deps",
192 182
193 # Give tests the default manifest on Windows (a no-op elsewhere). 183 # Give tests the default manifest on Windows (a no-op elsewhere).
194 "//build/win:default_exe_manifest", 184 "//build/win:default_exe_manifest",
195 ] 185 ]
196 } 186 }
197 } 187 }
198 } 188 }
OLDNEW
« build/toolchain/mac/BUILD.gn ('K') | « build/toolchain/mac/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698