GOCOVERDIR=coverage go test -timeout 10m -cover -covermode atomic -args -test.gocoverdir=coverage ./...
to collect coverage data into coverage dir and then I ran:
go tool covdata percent -i=coverage -pkg=./...
What did you see happen?
No output was made.
What did you expect to see?
To get the coverage matching the ./... package(s). Same as what was reported during a test run.
The use case here is that I have also some additional e2e main programs calling into the library I am testing and I want those to not be reported. But to report everything under the ./... pattern.
Note, help text says:
-pkg string
Restrict output to package(s) matching specified package pattern.
Which makes me think that ./... should already be supported.
Go version
go version go1.22.1 linux/amd64
Output of
go env
in your module/workspace:What did you do?
I ran:
to collect coverage data into
coverage
dir and then I ran:What did you see happen?
No output was made.
What did you expect to see?
To get the coverage matching the
./...
package(s). Same as what was reported during a test run.The use case here is that I have also some additional e2e main programs calling into the library I am testing and I want those to not be reported. But to report everything under the
./...
pattern.Note, help text says:
Which makes me think that
./...
should already be supported.