Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74ec3f49 authored by Sebastien Hertz's avatar Sebastien Hertz
Browse files

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
Change-Id: Ic29c99b6feb7ea2251c29d659e7ea1f1c46d1ed1
parent 2e8a1fc9
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -109,6 +109,8 @@ LOCAL_ALLOW_UNDEFINED_SYMBOLS:=
# full or incremental
LOCAL_JACK_ENABLED:=full
LOCAL_JACK_FLAGS:=
LOCAL_JACK_COVERAGE_INCLUDE_FILTER:=
LOCAL_JACK_COVERAGE_EXCLUDE_FILTER:=
LOCAL_CERTIFICATE:=
LOCAL_SDK_VERSION:=
LOCAL_SDK_RES_VERSION:=
+4 −2
Original line number Diff line number Diff line
@@ -630,9 +630,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