Update code coverage filtering
Replaces old LOCAL_EMMA_COVERAGE_FILTER by new variables:
- LOCAL_JACK_COVERAGE_INCLUDE_FILTER for included classes
- LOCAL_JACK_COVERAGE_EXCLUDE_FILTER for excluded classes
Both variables can contain a comma-separated list of class names,
where * and ? are accepted wildcard (like foo.?ar.*).
When code coverage is enabled, we will use these variables to
pass code coverage filters on the Jack command-line.
Bug: 28014424
(cherry picked from commit 74ec3f49d1
)
Change-Id: Ie4253981c0e6a62422ab84dfd67ef5eebc0b0284
This commit is contained in:
parent
839ec10bbc
commit
18da8dd97a
2 changed files with 6 additions and 2 deletions
|
@ -111,6 +111,8 @@ LOCAL_ALLOW_UNDEFINED_SYMBOLS:=
|
|||
LOCAL_DX_FLAGS:=
|
||||
LOCAL_JACK_ENABLED:=$(DEFAULT_JACK_ENABLED) # '' (ie disabled), disabled, full, incremental
|
||||
LOCAL_JACK_FLAGS:=
|
||||
LOCAL_JACK_COVERAGE_INCLUDE_FILTER:=
|
||||
LOCAL_JACK_COVERAGE_EXCLUDE_FILTER:=
|
||||
LOCAL_JILL_FLAGS:=
|
||||
LOCAL_CERTIFICATE:=
|
||||
LOCAL_SDK_VERSION:=
|
||||
|
|
|
@ -714,9 +714,11 @@ $(built_dex_intermediate): PRIVATE_CLASSES_JACK := $(full_classes_jack)
|
|||
|
||||
ifeq ($(LOCAL_EMMA_INSTRUMENT),true)
|
||||
$(built_dex_intermediate): PRIVATE_JACK_COVERAGE_OPTIONS := \
|
||||
-D jack.coverage="true" \
|
||||
-D jack.coverage=true \
|
||||
-D jack.coverage.metadata.file=$(intermediates.COMMON)/coverage.em \
|
||||
-D jack.coverage.jacoco.package=$(JACOCO_PACKAGE_NAME)
|
||||
-D jack.coverage.jacoco.package=$(JACOCO_PACKAGE_NAME) \
|
||||
$(addprefix -D jack.coverage.jacoco.include=,$(LOCAL_JACK_COVERAGE_INCLUDE_FILTER)) \
|
||||
$(addprefix -D jack.coverage.jacoco.exclude=,$(LOCAL_JACK_COVERAGE_EXCLUDE_FILTER))
|
||||
else
|
||||
$(built_dex_intermediate): PRIVATE_JACK_COVERAGE_OPTIONS :=
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue