You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> ginkgo run -race -r --cover --coverprofile coverage.txt "./submodule-1"
...
PASS
coverage: 47.3% of statements
...
PASS
coverage: 81.8% of statements
...
ginkgo run failed
could not finalize profiles:
Could not process Coverprofile coverage.txt: exit status 1
Results in a coverage.txt file in the project root like:
hey sorry for the delay. ginkgo is running go tool cover -func coverage.txt but not showing you the output if it exists with a non-zero exit code. i've fixed that now so you'll at least get the output (will cut a release soon) - but you can also run the command yourself to see what it returns and try to debug this further. it may be that how Ginkgo is merging the coverage files is causing issues.
So when go tool cover runs it tries to resolve code.ops.wombat.org/api/mod/v2 in the base module which naturally fails because for me that module has no dependency on the v2 version
go tool cover -func cover.coverprofile code.ops.wombat.org/api/mod/pkg/test/print.go:5: Print 0.0% cover: no required module provides package code.ops.wombat.org/api/mod/v2/pkg/test; to add it: go get code.ops.wombat.org/api/mod/v2/pkg/test
I'm getting an error when trying to run tests with coverage for a module that exists in a monorepo with many other modules.
Ginkgo version: v2.13.2
go version go1.21.0 darwin/arm64
The project structure looks like this:
Project root
go.mod
submodule-1
go.mod
From the project root directory:
Results in a
coverage.txt
file in the project root like:Is there anything I can do to get more information on why the cover profile could not be processed?
The text was updated successfully, but these errors were encountered: