gotesplit
gotesplit copied to clipboard
Using `-coverprofile` leads to incomplete coverage data
Specifying the -coverprofile flag leads to a coverage output that only contains coverage of the last tested package.
I'd expect to see coverage for all packages included in the tests. It seems like gotesplit runs multiple go test runs under the hood overwriting the coverprofile file.
Command I used:
gotesplit -total=3 -index=1 ./... -- -v -race -covermode=atomic -cover -coverprofile=coverage.tmp > report.tmp
I can clearly see that report.tmp contains tests covering files not part of coverage.tmp.