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

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

Issue 1462363002: [Android] Make generated test scripts pass apk paths. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/android/test_runner.gypi ('k') | build/config/android/rules.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/android/internal_rules.gni
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni
index 90867ed48b160c22a1fab68aa46d0f3f180111b1..60f276e0c03b6957f70cf9c8e5e4cac8c5624f3d 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -452,6 +452,11 @@ template("write_build_config") {
rebase_path(invoker.proguard_info, root_build_dir),
]
}
+
+ if (defined(invoker.apk_path)) {
+ _rebased_apk_path = rebase_path(invoker.apk_path, root_build_dir)
+ args += [ "--apk-path=$_rebased_apk_path" ]
+ }
}
if (defined(invoker.srcjar)) {
@@ -530,8 +535,8 @@ template("process_java_prebuilt") {
group(target_name) {
forward_variables_from(invoker, [ "visibility" ])
public_deps = [
- ":${target_name}__ijar",
":$_output_jar_target",
+ ":${target_name}__ijar",
]
}
}
@@ -1754,10 +1759,18 @@ template("test_runner_script") {
invoker.test_suite,
]
} else if (_test_type == "instrumentation") {
- assert(defined(invoker.test_apk))
+ deps = [
+ "${invoker.apk_target}__build_config",
+ ]
+ _build_config =
+ get_label_info(invoker.apk_target, "target_gen_dir") + "/" +
+ get_label_info(invoker.apk_target, "name") + ".build_config"
+ _rebased_build_config = rebase_path(_build_config, root_build_dir)
test_runner_args += [
"--test-apk",
- invoker.test_apk,
+ "@FileArg($_rebased_build_config:deps_info:apk_path)",
+ "--apk-under-test",
+ "@FileArg($_rebased_build_config:deps_info:tested_apk_path)",
]
} else {
assert(false, "Invalid test type: $_test_type.")
« no previous file with comments | « build/android/test_runner.gypi ('k') | build/config/android/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698