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

Side by Side Diff: testing/test.gni

Issue 2851523002: [android] Write a runner script to the top-level output dir for gtests. (Closed)
Patch Set: trivial rebase Created 3 years, 7 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
« no previous file with comments | « build/config/android/internal_rules.gni ('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 if (is_android) { 9 if (is_android) {
10 import("//build/config/android/config.gni") 10 import("//build/config/android/config.gni")
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 executable_dist_dir = "$root_out_dir/$_dist_target" 183 executable_dist_dir = "$root_out_dir/$_dist_target"
184 } else { 184 } else {
185 apk_target = ":$_apk_target" 185 apk_target = ":$_apk_target"
186 } 186 }
187 test_name = _output_name 187 test_name = _output_name
188 test_type = "gtest" 188 test_type = "gtest"
189 test_suite = _output_name 189 test_suite = _output_name
190 } 190 }
191 } 191 }
192 192
193 group(target_name) { 193 test_runner_script(target_name) {
194 testonly = true 194 forward_variables_from(invoker,
195 if (_incremental_apk_only) { 195 _wrapper_script_vars + [
196 deps = [ 196 "data",
197 ":${target_name}_incremental", 197 "data_deps",
198 "deps",
199 "public_deps",
200 ])
201
202 if (_use_raw_android_executable) {
203 executable_dist_dir = "$root_out_dir/$_dist_target"
204 deps += [
205 ":$_dist_target",
206 ":$_test_runner_target",
198 ] 207 ]
199 } else { 208 } else {
200 deps = [ 209 apk_target = ":$_apk_target"
201 ":$_test_runner_target", 210 deps += [ ":$_apk_target" ]
202 ] 211 if (_incremental_apk_only) {
203 if (_use_raw_android_executable) { 212 deps += [ ":${target_name}_incremental" ]
204 deps += [ ":$_dist_target" ]
205 } else { 213 } else {
206 deps += [ ":$_apk_target" ] 214 deps += [ ":$_test_runner_target" ]
207 } 215 }
208 } 216 }
217 generated_script = "$root_build_dir/$_output_name"
218 incremental_install = _incremental_apk_only
219 test_name = _output_name
220 test_suite = _output_name
221 test_type = "gtest"
209 } 222 }
210 223
211 # TODO(GYP_GONE): Delete this after we've converted everything to GN. 224 # TODO(GYP_GONE): Delete this after we've converted everything to GN.
212 # The _run targets exist only for compatibility w/ GYP. 225 # The _run targets exist only for compatibility w/ GYP.
213 group("${target_name}_apk_run") { 226 group("${target_name}_apk_run") {
214 testonly = true 227 testonly = true
215 deps = [ 228 deps = [
216 ":${invoker.target_name}", 229 ":${invoker.target_name}",
217 ] 230 ]
218 } 231 }
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } 300 }
288 301
289 # Test defaults. 302 # Test defaults.
290 set_defaults("test") { 303 set_defaults("test") {
291 if (is_android) { 304 if (is_android) {
292 configs = default_shared_library_configs 305 configs = default_shared_library_configs
293 } else { 306 } else {
294 configs = default_executable_configs 307 configs = default_executable_configs
295 } 308 }
296 } 309 }
OLDNEW
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698