From 350da65c033fdf25537ad69a5af9ecd0f0ccb86d 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 a5ab60e41d6..a259aa5fbd2 100644 --- a/dev-tools/mage/gotest.go +++ b/dev-tools/mage/gotest.go @@ -261,6 +261,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 ) }