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

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

Issue 1465523002: [Android] Make generated test scripts pass apk paths. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on pkotwicz's emma change 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 26ca8498ad8a7764ab409265bccca4018857c8f2..f676010bf1c06aaf36bb6569b6eda21facb73a8d 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)) {
@@ -1878,10 +1883,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