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>