From e76befa5704e07ae3ca874bebad9a3ac69fa4337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paolo=20Chil=C3=A0?= Date: Fri, 12 Sep 2025 17:14:35 +0200 Subject: [PATCH] Add -coverpkg option when running unit test to calculate coverage across packages (#9913) (cherry picked from commit 7c3157bc5ccec6580415eed1e5cad54e322501f5) --- dev-tools/mage/gotest.go | 1 + 1 file changed, 1 insertion(+) diff --git a/dev-tools/mage/gotest.go b/dev-tools/mage/gotest.go index 332b9ff6f9f..0ed6701f212 100644 --- a/dev-tools/mage/gotest.go +++ b/dev-tools/mage/gotest.go @@ -256,6 +256,7 @@ func GoTest(ctx context.Context, params GoTestArgs) error { testArgs = append(testArgs, "-covermode=atomic", "-coverprofile="+params.CoverageProfileFile, + "-coverpkg=./...", // needed to calculate the coverage across the elastic-agent packages ) }