I want to track test coverage on a go project using Coveralls, the instructions for the integration reference using https://github.com/mattn/goveralls
cd $GOPA
Has anyone figured out how to get coverage for multiple packages?
Note: with Go 1.10 (Q1 2018), that... will actually be possible.
See CL 76875
cmd/go
: allow-coverprofile
with multiple packages being tested
You can see the implementation of a multiple package code coverage test in commit 283558e
Jeff Martin has since the release of Go 1.10 (Feb. 2018) confirmed in the comments:
go test -v -cover ./pkgA/... ./pkgB/... -coverprofile=cover.out
gets a good profile and go tool cover -func "cover.out"
will get a total: (statements) 52.5%
.So it is working!