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

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

Issue 1674353004: [Android] Fix generated scripts for junit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Alphabetized the gyp includes everywhere. Created 4 years, 10 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/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 2cbbe30bbd1c21447c0996d105c98243601ee908..f0087abf9fae880514204955cd98a7d5a53b3900 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -198,7 +198,7 @@ template("java_binary_script") {
action(target_name) {
script = "//build/android/gyp/create_java_binary_script.py"
depfile = "$target_gen_dir/$_script_name.d"
- java_script = "$root_build_dir/bin/$_script_name"
+ java_script = "$root_build_dir/bin/helper/$_script_name"
inputs = [
_build_config,
]
@@ -1295,6 +1295,9 @@ template("java_prebuilt_impl") {
build_config = _build_config
jar_path = _jar_path
script_name = _template_name
+ if (defined(invoker.wrapper_script_name)) {
+ script_name = invoker.wrapper_script_name
+ }
deps = [
":$_build_config_target_name",
]
@@ -1532,8 +1535,12 @@ template("java_library_impl") {
# Jar files can be needed at runtime (by Robolectric tests or java binaries),
# so do not put them under gen/.
+ _jar_name = target_name
+ if (defined(invoker.jar_name)) {
+ _jar_name = invoker.jar_name
+ }
target_dir_name = get_label_info(":$target_name", "dir")
- _jar_path = "$root_out_dir/lib.java$target_dir_name/$target_name.jar"
+ _jar_path = "$root_out_dir/lib.java$target_dir_name/$_jar_name.jar"
if (defined(invoker.jar_path)) {
_jar_path = invoker.jar_path
}
@@ -1688,6 +1695,9 @@ template("java_library_impl") {
build_config = _build_config
jar_path = _jar_path
script_name = _template_name
+ if (defined(invoker.wrapper_script_name)) {
+ script_name = invoker.wrapper_script_name
+ }
deps = build_config_deps
}
}
@@ -2069,6 +2079,12 @@ template("test_runner_script") {
rebase_path("$root_out_dir/coverage", root_build_dir),
]
}
+ } else if (_test_type == "junit") {
+ assert(defined(invoker.test_suite))
+ test_runner_args += [
+ "--test-suite",
+ invoker.test_suite,
+ ]
} 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