]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix a couple of bugs in coverage tooling
authorRob Pike <r@golang.org>
Tue, 9 Jul 2013 23:52:36 +0000 (09:52 +1000)
committerRob Pike <r@golang.org>
Tue, 9 Jul 2013 23:52:36 +0000 (09:52 +1000)
commit6d86c14efab9bdd9d071ac081fa6f8ea62f956c9
tree116997df689133dd55fb5e5fa12d65ac8a80bc5c
parentc7065e927d1e8bbee6365bc8acfdf0b58ffdce8a
cmd/go: fix a couple of bugs in coverage tooling
Merging a couple of CLs into one, since they collided in my client
and I'm lazy.

1) Fix up output in "go test -cover" case.
We need to tell the testing package the name of the package being tested
and the name of the package being covered. It can then sort out the report.

2) Filter out the _test.go files from coverage processing. We want to measure
what the tests cover, not what's covered in the tests,
The coverage for encoding/gob goes from 82.2% to 88.4%.
There may be a cleaner way to do this - suggestions welcome - but ça suffit.

Fixes #5810.

R=rsc
CC=golang-dev
https://golang.org/cl/10868047
src/cmd/go/build.go
src/cmd/go/test.go
src/pkg/testing/cover.go