aboutsummaryrefslogtreecommitdiffstats
path: root/androidmk
diff options
context:
space:
mode:
authorSasha Smundak <asmundak@google.com>2019-01-08 19:19:21 -0800
committerAlexander Smundak <asmundak@google.com>2019-01-09 19:30:38 +0000
commite5c5317f44c97702ee290ea67550ee5e3eb72462 (patch)
treefbf7c00275a732908b28ca59d0df0392cc8287d1 /androidmk
parent6cf911150a523724864316ee90e5251ce3a98ce3 (diff)
downloadbuild_soong-e5c5317f44c97702ee290ea67550ee5e3eb72462.tar.gz
build_soong-e5c5317f44c97702ee290ea67550ee5e3eb72462.tar.bz2
build_soong-e5c5317f44c97702ee290ea67550ee5e3eb72462.zip
Handle Jacoco filters
Test: treehugger Change-Id: I8bf242cdb4709d086ff0806c143ff03ad2e5cd30
Diffstat (limited to 'androidmk')
-rw-r--r--androidmk/cmd/androidmk/android.go4
-rw-r--r--androidmk/cmd/androidmk/androidmk_test.go8
2 files changed, 12 insertions, 0 deletions
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go
index c8228ede..a28cf49b 100644
--- a/androidmk/cmd/androidmk/android.go
+++ b/androidmk/cmd/androidmk/android.go
@@ -158,6 +158,10 @@ func init() {
"LOCAL_SHARED_ANDROID_LIBRARIES": "android_libs",
"LOCAL_STATIC_ANDROID_LIBRARIES": "android_static_libs",
"LOCAL_ADDITIONAL_CERTIFICATES": "additional_certificates",
+
+ // Jacoco filters:
+ "LOCAL_JACK_COVERAGE_INCLUDE_FILTER": "jacoco.include_filter",
+ "LOCAL_JACK_COVERAGE_EXCLUDE_FILTER": "jacoco.exclude_filter",
})
addStandardProperties(bpparser.BoolType,
diff --git a/androidmk/cmd/androidmk/androidmk_test.go b/androidmk/cmd/androidmk/androidmk_test.go
index 40fc9f3e..c750f220 100644
--- a/androidmk/cmd/androidmk/androidmk_test.go
+++ b/androidmk/cmd/androidmk/androidmk_test.go
@@ -643,12 +643,14 @@ include $(call all-makefiles-under,$(LOCAL_PATH))
include $(CLEAR_VARS)
LOCAL_SRC_FILES := test.java
LOCAL_RESOURCE_DIR := res
+ LOCAL_JACK_COVERAGE_INCLUDE_FILTER := foo.*
include $(BUILD_STATIC_JAVA_LIBRARY)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := test.java
LOCAL_STATIC_LIBRARIES := foo
LOCAL_STATIC_ANDROID_LIBRARIES := bar
+ LOCAL_JACK_COVERAGE_EXCLUDE_FILTER := bar.*
include $(BUILD_STATIC_JAVA_LIBRARY)
include $(CLEAR_VARS)
@@ -666,6 +668,9 @@ include $(call all-makefiles-under,$(LOCAL_PATH))
android_library {
srcs: ["test.java"],
resource_dirs: ["res"],
+ jacoco: {
+ include_filter: ["foo.*"],
+ },
}
android_library {
@@ -674,6 +679,9 @@ include $(call all-makefiles-under,$(LOCAL_PATH))
"foo",
"bar",
],
+ jacoco: {
+ exclude_filter: ["bar.*"],
+ },
}
android_library {