diff --git a/core/Makefile b/core/Makefile index 361d190a98..78d1c325c5 100644 --- a/core/Makefile +++ b/core/Makefile @@ -1064,6 +1064,17 @@ $(APPS_ZIP): $(INSTALLED_SYSTEMIMAGE) $(hide) mkdir -p $(dir $@) $(hide) zip -qj $@ $(TARGET_OUT_APPS)/* + +#------------------------------------------------------------------ +# A zip of emma code coverage meta files. Generated for fully emma +# instrumented build. +# +EMMA_META_ZIP := $(PRODUCT_OUT)/emma_meta.zip +$(EMMA_META_ZIP): $(INSTALLED_SYSTEMIMAGE) + @echo "Collecting Emma coverage meta files." + $(hide) find $(TARGET_COMMON_OUT_ROOT) -name "coverage.em" | \ + zip -@ -q $@ + endif # TARGET_SIMULATOR != true # ----------------------------------------------------------------- diff --git a/core/main.mk b/core/main.mk index 3ffb084f47..1fd546e71b 100644 --- a/core/main.mk +++ b/core/main.mk @@ -705,6 +705,12 @@ $(call dist-for-goals, droid, \ $(INSTALLED_RAMDISK_TARGET) \ ) +ifeq ($(EMMA_INSTRUMENT),true) +$(call dist-for-goals, droid, \ + $(EMMA_META_ZIP) \ + ) +endif + # Tests are installed in userdata.img. If we're building the tests # variant, copy it for "make tests dist". Also copy a zip of the # contents of userdata.img, so that people can easily extract a