Add mode to ingest pre-prepared coverage files
dave opened this issue · comments
Why not accepting coverage report text files instead of wrapping go test and executing tests?
I like the concept but I don't want to replace go command as much as possible.
I didn't add this because it's not quite as straightforward as you might think:
- Unfortunately
go test
can't accept/...
to indicate recursive packages when combined with code coverage:
$ go test -coverprofile=coverage.out ./...
cannot use test profile flag with multiple packages
... so the courtney command has to manually scan the filesystem for sub packages and run one go test
command for each package.
- In order to get coverage logged cross-package, you need to add all the packages you're testing as a comma separated list to the
coverpkg
argument.
You can see the go test
commands that we're running when you add the -v
flag.
However, I can see that this might be of use in certain situations, so I'll look into adding it as an option.
I've added a -l
option that allows you to skip the test step and load pre-prepared coverage files. Let me know what you think: 715958a
the problem is related with golang/go#6909 and I fixed it by creating https://github.com/haya14busa/goverage