]> Cypherpunks repositories - gostls13.git/commit
cmd/go: make -coverpkg=all skip test-only packages
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 30 Jan 2021 11:41:29 +0000 (11:41 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Tue, 23 Mar 2021 18:14:47 +0000 (18:14 +0000)
commitc59b17e5a2244f7a99c440a07a1c174344da0ad8
tree341f0db720566a1329f1e68259adc7c2d1daf076
parent05250429ae0e43041c9976a8451426d3ad907e5a
cmd/go: make -coverpkg=all skip test-only packages

Otherwise, the added test would fail in an unnecessary way:

go build example.com/cov/onlytest: no non-test Go files ...

The test script is mimicking other cover_pkgall_*.txt scripts, so it
similarly tests both GOPATH and module modes.

Fixes #27333.

Change-Id: Ie60be569b31d49b173a78556c0669a87ada6799e
Reviewed-on: https://go-review.googlesource.com/c/go/+/288292
Trust: Daniel Martí <mvdan@mvdan.cc>
Trust: Jay Conrod <jayconrod@google.com>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/load/test.go
src/cmd/go/internal/test/test.go
src/cmd/go/testdata/script/cover_pkgall_imports.txt [new file with mode: 0644]