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 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 import("//build/config/android/internal_rules.gni") | 6 import("//build/config/android/internal_rules.gni") |
7 import("//build/config/dcheck_always_on.gni") | 7 import("//build/config/dcheck_always_on.gni") |
8 import("//build/toolchain/toolchain.gni") | 8 import("//build/toolchain/toolchain.gni") |
9 | 9 |
10 assert(is_android) | 10 assert(is_android) |
(...skipping 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2240 # "android/org/chromium/foo/FooTestCase.java", | 2240 # "android/org/chromium/foo/FooTestCase.java", |
2241 # "android/org/chromium/foo/FooExampleTest.java", | 2241 # "android/org/chromium/foo/FooExampleTest.java", |
2242 # ] | 2242 # ] |
2243 # deps = [ | 2243 # deps = [ |
2244 # ":foo_test_support_java" | 2244 # ":foo_test_support_java" |
2245 # ] | 2245 # ] |
2246 # } | 2246 # } |
2247 template("instrumentation_test_apk") { | 2247 template("instrumentation_test_apk") { |
2248 testonly = true | 2248 testonly = true |
2249 _apk_target_name = "${target_name}__apk" | 2249 _apk_target_name = "${target_name}__apk" |
| 2250 _gen_isolate_target_name = "${target_name}__isolate" |
2250 _test_runner_target_name = "${target_name}__test_runner_script" | 2251 _test_runner_target_name = "${target_name}__test_runner_script" |
2251 _install_script_name = "install_$target_name" | 2252 _install_script_name = "install_$target_name" |
2252 | 2253 |
| 2254 _target_dir_name = get_label_info(":$target_name", "dir") |
| 2255 _device_isolate_path = "$root_out_dir/gen.runtime/$_target_dir_name/$target_
name.device.isolate" |
| 2256 device_isolate(_gen_isolate_target_name) { |
| 2257 forward_variables_from(invoker, |
| 2258 [ |
| 2259 "data", |
| 2260 "data_deps", |
| 2261 "deps", |
| 2262 "public_deps", |
| 2263 ]) |
| 2264 output = _device_isolate_path |
| 2265 } |
| 2266 |
| 2267 if (defined(invoker.isolate_file)) { |
| 2268 assert(invoker.isolate_file != "") |
| 2269 } |
| 2270 |
2253 test_runner_script(_test_runner_target_name) { | 2271 test_runner_script(_test_runner_target_name) { |
2254 forward_variables_from(invoker, | 2272 forward_variables_from(invoker, |
2255 [ | 2273 [ |
2256 "additional_apks", | 2274 "additional_apks", |
2257 "apk_under_test", | 2275 "apk_under_test", |
2258 "isolate_file", | |
2259 ]) | 2276 ]) |
2260 test_name = invoker.target_name | 2277 test_name = invoker.target_name |
2261 test_type = "instrumentation" | 2278 test_type = "instrumentation" |
2262 apk_target = ":$_apk_target_name" | 2279 apk_target = ":$_apk_target_name" |
| 2280 isolate_file = _device_isolate_path |
| 2281 deps = [ |
| 2282 ":$_gen_isolate_target_name", |
| 2283 ] |
2263 } | 2284 } |
2264 | 2285 |
2265 test_runner_script("${_test_runner_target_name}_incremental") { | 2286 test_runner_script("${_test_runner_target_name}_incremental") { |
2266 forward_variables_from(invoker, | 2287 forward_variables_from(invoker, |
2267 [ | 2288 [ |
2268 "additional_apks", | 2289 "additional_apks", |
2269 "apk_under_test", | 2290 "apk_under_test", |
2270 "isolate_file", | |
2271 ]) | 2291 ]) |
2272 test_name = "${invoker.target_name}_incremental" | 2292 test_name = "${invoker.target_name}_incremental" |
2273 test_type = "instrumentation" | 2293 test_type = "instrumentation" |
2274 apk_target = ":$_apk_target_name" | 2294 apk_target = ":$_apk_target_name" |
2275 incremental_install = true | 2295 incremental_install = true |
| 2296 isolate_file = _device_isolate_path |
| 2297 deps = [ |
| 2298 ":$_gen_isolate_target_name", |
| 2299 ] |
2276 } | 2300 } |
2277 | 2301 |
2278 android_apk(_apk_target_name) { | 2302 android_apk(_apk_target_name) { |
2279 deps = [] | 2303 deps = [] |
2280 data_deps = [] | 2304 data_deps = [] |
2281 forward_variables_from(invoker, "*") | 2305 forward_variables_from(invoker, "*") |
2282 install_script_name = _install_script_name | 2306 install_script_name = _install_script_name |
2283 deps += [ "//testing/android/broker:broker_java" ] | 2307 deps += [ "//testing/android/broker:broker_java" ] |
2284 data_deps += [ | 2308 data_deps += [ |
2285 "//testing/android/driver:driver_apk", | 2309 "//testing/android/driver:driver_apk", |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2675 supports_android = true | 2699 supports_android = true |
2676 jar_path = "${_output_path}/$jar" | 2700 jar_path = "${_output_path}/$jar" |
2677 } | 2701 } |
2678 } | 2702 } |
2679 | 2703 |
2680 java_group(target_name) { | 2704 java_group(target_name) { |
2681 deps = _resource_targets + _jar_targets | 2705 deps = _resource_targets + _jar_targets |
2682 } | 2706 } |
2683 } | 2707 } |
2684 } | 2708 } |
OLD | NEW |