From d8aa20062aad83b170b0945b71db79e48daa9fe8 Mon Sep 17 00:00:00 2001 From: Yu Liu Date: Thu, 5 Oct 2023 11:40:06 -0700 Subject: [PATCH] Change java_test_host to support cov variant. Bug: 279960392 Test: CI and m --skip-soong-tests TARGET_PRODUCT=aosp_x86_64 EMMA_INSTRUMENT=true CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS="external/cronet" mts Change-Id: I4489ed725aee6097e6e340f5f6d06ecaf1c64222 --- java/java.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/java.go b/java/java.go index cac49a2c5..2a3da93d2 100644 --- a/java/java.go +++ b/java/java.go @@ -1087,6 +1087,10 @@ func (j *JavaTestImport) InstallInTestcases() bool { return true } +func (j *TestHost) IsNativeCoverageNeeded(ctx android.BaseModuleContext) bool { + return ctx.DeviceConfig().NativeCoverageEnabled() +} + func (j *TestHost) addDataDeviceBinsDeps(ctx android.BottomUpMutatorContext) { if len(j.testHostProperties.Data_device_bins_first) > 0 { deviceVariations := ctx.Config().AndroidFirstDeviceTarget.Variations()