OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 # Do not add any imports to non-//build directories here. | 5 # Do not add any imports to non-//build directories here. |
6 # Some projects (e.g. V8) do not have non-build directories DEPS'ed in. | 6 # Some projects (e.g. V8) do not have non-build directories DEPS'ed in. |
7 import("//build/config/android/config.gni") | 7 import("//build/config/android/config.gni") |
8 import("//build/config/android/internal_rules.gni") | 8 import("//build/config/android/internal_rules.gni") |
9 import("//build/config/compiler/compiler.gni") | 9 import("//build/config/compiler/compiler.gni") |
10 import("//build/config/dcheck_always_on.gni") | 10 import("//build/config/dcheck_always_on.gni") |
(...skipping 2242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2253 # "android/org/chromium/foo/FooTestCase.java", | 2253 # "android/org/chromium/foo/FooTestCase.java", |
2254 # "android/org/chromium/foo/FooExampleTest.java", | 2254 # "android/org/chromium/foo/FooExampleTest.java", |
2255 # ] | 2255 # ] |
2256 # deps = [ | 2256 # deps = [ |
2257 # ":foo_test_support_java" | 2257 # ":foo_test_support_java" |
2258 # ] | 2258 # ] |
2259 # } | 2259 # } |
2260 template("instrumentation_test_apk") { | 2260 template("instrumentation_test_apk") { |
2261 testonly = true | 2261 testonly = true |
2262 _apk_target_name = "${target_name}__apk" | 2262 _apk_target_name = "${target_name}__apk" |
| 2263 _gen_isolate_target_name = "${target_name}__isolate" |
2263 _test_runner_target_name = "${target_name}__test_runner_script" | 2264 _test_runner_target_name = "${target_name}__test_runner_script" |
2264 _install_script_name = "install_$target_name" | 2265 _install_script_name = "install_$target_name" |
2265 | 2266 |
| 2267 _target_dir_name = get_label_info(":$target_name", "dir") |
| 2268 _device_isolate_path = "$root_out_dir/gen.runtime/$_target_dir_name/$target_
name.device.isolate" |
| 2269 device_isolate(_gen_isolate_target_name) { |
| 2270 forward_variables_from(invoker, |
| 2271 [ |
| 2272 "data", |
| 2273 "data_deps", |
| 2274 "deps", |
| 2275 "public_deps", |
| 2276 ]) |
| 2277 output = _device_isolate_path |
| 2278 } |
| 2279 |
2266 test_runner_script(_test_runner_target_name) { | 2280 test_runner_script(_test_runner_target_name) { |
2267 forward_variables_from(invoker, | 2281 forward_variables_from(invoker, |
2268 [ | 2282 [ |
2269 "additional_apks", | 2283 "additional_apks", |
2270 "apk_under_test", | 2284 "apk_under_test", |
2271 "data", | |
2272 "data_deps", | |
2273 "deps", | |
2274 "ignore_all_data_deps", | |
2275 "public_deps", | |
2276 ]) | 2285 ]) |
2277 test_name = invoker.target_name | 2286 test_name = invoker.target_name |
2278 test_type = "instrumentation" | 2287 test_type = "instrumentation" |
2279 apk_target = ":$_apk_target_name" | 2288 apk_target = ":$_apk_target_name" |
| 2289 isolate_file = _device_isolate_path |
| 2290 deps = [ |
| 2291 ":$_gen_isolate_target_name", |
| 2292 ] |
2280 } | 2293 } |
2281 | 2294 |
2282 test_runner_script("${_test_runner_target_name}_incremental") { | 2295 test_runner_script("${_test_runner_target_name}_incremental") { |
2283 forward_variables_from(invoker, | 2296 forward_variables_from(invoker, |
2284 [ | 2297 [ |
2285 "additional_apks", | 2298 "additional_apks", |
2286 "apk_under_test", | 2299 "apk_under_test", |
2287 "data", | |
2288 "data_deps", | |
2289 "deps", | |
2290 "ignore_all_data_deps", | |
2291 "public_deps", | |
2292 ]) | 2300 ]) |
2293 test_name = "${invoker.target_name}_incremental" | 2301 test_name = "${invoker.target_name}_incremental" |
2294 test_type = "instrumentation" | 2302 test_type = "instrumentation" |
2295 apk_target = ":$_apk_target_name" | 2303 apk_target = ":$_apk_target_name" |
2296 incremental_install = true | 2304 incremental_install = true |
| 2305 isolate_file = _device_isolate_path |
| 2306 deps = [ |
| 2307 ":$_gen_isolate_target_name", |
| 2308 ] |
2297 } | 2309 } |
2298 | 2310 |
2299 android_apk(_apk_target_name) { | 2311 android_apk(_apk_target_name) { |
2300 deps = [] | 2312 deps = [] |
2301 data_deps = [] | 2313 data_deps = [] |
2302 forward_variables_from(invoker, "*") | 2314 forward_variables_from(invoker, "*") |
2303 install_script_name = _install_script_name | 2315 install_script_name = _install_script_name |
2304 deps += [ "//testing/android/broker:broker_java" ] | 2316 deps += [ "//testing/android/broker:broker_java" ] |
2305 data_deps += [ | 2317 data_deps += [ |
2306 "//build/android/pylib/device/commands", | 2318 "//build/android/pylib/device/commands", |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2760 # because in practice they seem to contain classes required to be in the | 2772 # because in practice they seem to contain classes required to be in the |
2761 # classpath. | 2773 # classpath. |
2762 deps += _subjar_targets | 2774 deps += _subjar_targets |
2763 } | 2775 } |
2764 if (defined(_res_target_name)) { | 2776 if (defined(_res_target_name)) { |
2765 deps += [ ":$_res_target_name" ] | 2777 deps += [ ":$_res_target_name" ] |
2766 } | 2778 } |
2767 } | 2779 } |
2768 } | 2780 } |
2769 } | 2781 } |
OLD | NEW |