From affd00883f33b86d1977ed69ca37fd7c5c36bf29 Mon Sep 17 00:00:00 2001 From: Yu Liu Date: Fri, 11 Aug 2023 12:59:45 -0700 Subject: [PATCH] Add device-tests as a dep of JACOCO_REPORT_CLASSES_ALL. Bug: 289380707 Test: CI Change-Id: Id201bda1bd4acfc6cadada982e20dee19d8c703a --- core/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/Makefile b/core/Makefile index 07d705e8d7..74e2488e27 100644 --- a/core/Makefile +++ b/core/Makefile @@ -6889,6 +6889,14 @@ $(JACOCO_REPORT_CLASSES_ALL) : ifeq (,$(TARGET_BUILD_UNBUNDLED)) $(JACOCO_REPORT_CLASSES_ALL): $(INTERNAL_ALLIMAGES_FILES) endif + +# This is not ideal, but it is difficult to correctly figure out the actual jacoco report +# jars we need to add here as dependencies, so we add the device-tests as a dependency when +# the env variable is set and this should guarantee thaat all the jacoco report jars are ready +# when we package the final report jar here. +ifeq ($(JACOCO_PACKAGING_INCLUDE_DEVICE_TESTS),true) + $(JACOCO_REPORT_CLASSES_ALL): $(COMPATIBILITY.device-tests.FILES) +endif endif # EMMA_INSTRUMENT=true