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

Unified Diff: build/config/android/rules.gni

Issue 2203073002: [Android] Switch instrumentation tests to generated device isolates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-isolate-generation
Patch Set: rebase 2 Created 4 years, 4 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
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | chrome/android/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/android/rules.gni
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
index 2e424e42a8de4ffbae726a3a179d35b22b18b78a..239be859228e6cbcaaac22ee03f7782c96d5bc3c 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -2247,19 +2247,40 @@ if (enable_java_templates) {
template("instrumentation_test_apk") {
testonly = true
_apk_target_name = "${target_name}__apk"
+ _gen_isolate_target_name = "${target_name}__isolate"
_test_runner_target_name = "${target_name}__test_runner_script"
_install_script_name = "install_$target_name"
+ _target_dir_name = get_label_info(":$target_name", "dir")
+ _device_isolate_path = "$root_out_dir/gen.runtime/$_target_dir_name/$target_name.device.isolate"
+ device_isolate(_gen_isolate_target_name) {
+ forward_variables_from(invoker,
+ [
+ "data",
+ "data_deps",
+ "deps",
+ "public_deps",
+ ])
+ output = _device_isolate_path
+ }
+
+ if (defined(invoker.isolate_file)) {
+ assert(invoker.isolate_file != "")
+ }
+
test_runner_script(_test_runner_target_name) {
forward_variables_from(invoker,
[
"additional_apks",
"apk_under_test",
- "isolate_file",
])
test_name = invoker.target_name
test_type = "instrumentation"
apk_target = ":$_apk_target_name"
+ isolate_file = _device_isolate_path
+ deps = [
+ ":$_gen_isolate_target_name",
+ ]
}
test_runner_script("${_test_runner_target_name}_incremental") {
@@ -2267,12 +2288,15 @@ if (enable_java_templates) {
[
"additional_apks",
"apk_under_test",
- "isolate_file",
])
test_name = "${invoker.target_name}_incremental"
test_type = "instrumentation"
apk_target = ":$_apk_target_name"
incremental_install = true
+ isolate_file = _device_isolate_path
+ deps = [
+ ":$_gen_isolate_target_name",
+ ]
}
android_apk(_apk_target_name) {
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | chrome/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698