Skip instrumenting non-class files

Jacoco normally recurses into .jar files, but we don't want it to.
Some .jar files may be intentionally corrupt test files.

Test: m -j showcommands dist EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true WITH_DEXPREOPT=false cts google-tradefed-all general-tests tests
Bug: 68056327
Change-Id: I1550e3acafd7cd9a65164742370e051d3eb3bf69
This commit is contained in:
Jeff Gaston 2017-10-25 15:55:16 -07:00
parent 55ce60c2b6
commit 6fdbdc86f6
1 changed files with 1 additions and 0 deletions

View File

@ -68,6 +68,7 @@ $(my_unzipped_timestamp_path): $(LOCAL_FULL_CLASSES_PRE_JACOCO_JAR)
-d $(PRIVATE_UNZIPPED_PATH) \ -d $(PRIVATE_UNZIPPED_PATH) \
$(PRIVATE_INCLUDE_ARGS) $(PRIVATE_INCLUDE_ARGS)
(cd $(PRIVATE_UNZIPPED_PATH) && rm -rf $(PRIVATE_EXCLUDE_ARGS)) (cd $(PRIVATE_UNZIPPED_PATH) && rm -rf $(PRIVATE_EXCLUDE_ARGS))
(cd $(PRIVATE_UNZIPPED_PATH) && find -not -name "*.class" -type f | xargs --no-run-if-empty rm)
touch $(PRIVATE_UNZIPPED_TIMESTAMP_PATH) touch $(PRIVATE_UNZIPPED_TIMESTAMP_PATH)
# Unfortunately in the previous task above, # Unfortunately in the previous task above,
# 'rm -rf $(PRIVATE_EXCLUDE_ARGS)' needs to be a separate # 'rm -rf $(PRIVATE_EXCLUDE_ARGS)' needs to be a separate