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

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

Issue 833003004: Update unittest_apk target to allow specifying the name of the apk. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Follow review Created 5 years, 11 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 | « no previous file | no next file » | 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 f83d92f1d8c77b2b47312caccedc074dbb9ef20d..b62ab38314852956b9e6f34db42be148c18ebb24 100644
--- a/build/config/android/rules.gni
+++ b/build/config/android/rules.gni
@@ -1428,6 +1428,8 @@ template("android_apk") {
# (which will be correct unless that target specifies an "output_name".
# TODO(brettw) make this automatic by allowing get_target_outputs to
# support executables.
+# apk_name: The name of the produced apk. If unspecified, it uses the name
+# of the unittests_dep target postfixed with "_apk"
#
# Example
# unittest_apk("foo_unittests_apk") {
@@ -1441,14 +1443,24 @@ template("unittest_apk") {
test_suite_name = get_label_info(invoker.unittests_dep, "name")
+ # This trivial assert is needed in case both unittests_binary and apk_name
+ # are defined, as otherwise test_suite_name would not be used.
+ assert(test_suite_name != "")
+
if (defined(invoker.unittests_binary)) {
unittests_binary = invoker.unittests_binary
} else {
unittests_binary = "lib" + test_suite_name + ".so"
}
+ if (defined(invoker.apk_name)) {
+ apk_name = invoker.apk_name
+ } else {
+ apk_name = test_suite_name
+ }
+
android_apk(target_name) {
- _apk_name = test_suite_name
+ _apk_name = apk_name
final_apk_path = "$root_build_dir/${_apk_name}_apk/${_apk_name}-debug.apk"
java_files = [ "//testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java" ]
android_manifest = "//testing/android/java/AndroidManifest.xml"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698