From 0198d6ebb457d11797deb414c51b8897c67f7f10 Mon Sep 17 00:00:00 2001 From: Guang Zhu Date: Fri, 23 Apr 2010 11:54:37 -0700 Subject: [PATCH] collect emm meta files for emma instrumented build when doing 'make dist', with EMMA_INSTRUMENT on the coverage.em files generated for each module will be collected into one emma_meta.zip file Change-Id: I382c39a97005e6cae5c79ad7eaef1c8857f658af --- core/Makefile | 11 +++++++++++ core/main.mk | 6 ++++++ 2 files changed, 17 insertions(+) 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