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

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: Removed a single space. 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 7e279c3ee8fbf07e683044d232165f04ce914122..8a421bea768a7fb1d8cbca73648ecb04daffb1d4 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,
]
@@ -1294,7 +1294,11 @@ 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
+ } else {
+ script_name = _template_name
+ }
deps = [
":$_build_config_target_name",
]
@@ -1532,8 +1536,13 @@ template("java_library_impl") {
# Jar files can be needed at runtime (by Robolectric tests or java binaries),
# so do not put them under gen/.
+ if (defined(invoker.jar_name)) {
+ _jar_name = invoker.jar_name
+ } else {
+ _jar_name = target_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
}
@@ -1687,7 +1696,11 @@ template("java_library_impl") {
])
build_config = _build_config
jar_path = _jar_path
- script_name = _template_name
+ if (defined(invoker.wrapper_script_name)) {
jbudorick 2016/02/11 21:45:34 I think the typical way of expressing default-with
mikecase (-- gone --) 2016/02/11 22:06:19 Done
+ script_name = invoker.wrapper_script_name
+ } else {
+ script_name = _template_name
+ }
deps = build_config_deps
}
}
@@ -2069,6 +2082,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