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

Unified Diff: build/config/android/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/config/android/internal_rules.gni ('k') | build/java_apk.gypi » ('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 2dd616b6e168b95a58ff1ea305b5bfd20ca661b0..95e1303a7aac9962be2552ddae02f082f89a6c8f 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -1375,6 +1375,7 @@ template("android_apk") {
type = "android_apk"
jar_path = _jar_path
dex_path = final_dex_path
+ apk_path = _final_apk_path
resources_zip = resources_zip_path
build_config = _build_config
android_manifest = _android_manifest
@@ -1839,35 +1840,36 @@ template("android_apk") {
# ]
# }
template("instrumentation_test_apk") {
- set_sources_assignment_filter([])
testonly = true
- _template_name = target_name
+ _apk_target_name = "${target_name}__apk"
+ _test_runner_target_name = "${target_name}__test_runner_script"
- if (defined(invoker.apk_name)) {
- test_runner_data_dep = [ ":${_template_name}__test_runner_script" ]
- test_runner_script("${_template_name}__test_runner_script") {
- forward_variables_from(invoker, [ "isolate_file" ])
- test_name = invoker.target_name
- test_type = "instrumentation"
- test_apk = invoker.apk_name
- }
+ test_runner_script(_test_runner_target_name) {
+ forward_variables_from(invoker, [ "isolate_file" ])
+ test_name = invoker.target_name
+ test_type = "instrumentation"
+ apk_target = ":$_apk_target_name"
}
- android_apk(target_name) {
+ android_apk(_apk_target_name) {
deps = []
data_deps = []
forward_variables_from(invoker, "*")
+ deps += [ "//testing/android/broker:broker_java" ]
data_deps += [
"//testing/android/driver:driver_apk",
"//tools/android/forwarder2",
"//tools/android/md5sum",
]
- if (defined(test_runner_data_dep)) {
- data_deps += test_runner_data_dep
- }
- deps += [ "//testing/android/broker:broker_java" ]
run_findbugs = false
}
+
+ group(target_name) {
+ public_deps = [
+ ":$_apk_target_name",
+ ":$_test_runner_target_name",
+ ]
+ }
}
# Declare an Android gtest apk
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | build/java_apk.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698