Use new flag for emma instrumented build and limit to apps only
Based on existing setup, when EMMA_INSTRUMENT is used on a full build, all Java modules will be processed with emma instrument unless otherwise marked in their own Makefiles. For the purpose of collecting code coverage, emma-instrument all Java modules aren't that useful, instead, instrumenting all the app packages is more useful. This change adds a new flag EMMA_FULL_APP_INSTRUMENT, which can be used with a full build to instrument all app packages. Change-Id: Ie143fed49c23402b21f6cccac2ef25741726be45
This commit is contained in:
15
core/java.mk
15
core/java.mk
@@ -76,6 +76,21 @@ intermediates := $(call local-intermediates-dir)
|
|||||||
intermediates.COMMON := $(call local-intermediates-dir,COMMON)
|
intermediates.COMMON := $(call local-intermediates-dir,COMMON)
|
||||||
|
|
||||||
# Emma source code coverage
|
# Emma source code coverage
|
||||||
|
ifeq ($(EMMA_FULL_APP_INSTRUMENT),true)
|
||||||
|
# doing a full emma instrument here, i.e. all app packages instrumented
|
||||||
|
EMMA_INSTRUMENT := true
|
||||||
|
# do not instrument modules that are not app packages
|
||||||
|
ifneq ($(LOCAL_MODULE_CLASS),APPS)
|
||||||
|
LOCAL_NO_EMMA_INSTRUMENT := true
|
||||||
|
LOCAL_NO_EMMA_COMPILE := true
|
||||||
|
endif
|
||||||
|
# do not instrument modules that are marked tests
|
||||||
|
ifeq ($(LOCAL_MODULE_TAGS),tests)
|
||||||
|
LOCAL_NO_EMMA_INSTRUMENT := true
|
||||||
|
LOCAL_NO_EMMA_COMPILE := true
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(EMMA_INSTRUMENT),true)
|
ifneq ($(EMMA_INSTRUMENT),true)
|
||||||
LOCAL_NO_EMMA_INSTRUMENT := true
|
LOCAL_NO_EMMA_INSTRUMENT := true
|
||||||
LOCAL_NO_EMMA_COMPILE := true
|
LOCAL_NO_EMMA_COMPILE := true
|
||||||
|
Reference in New Issue
Block a user