1
0
mirror of https://github.com/golang/go synced 2024-09-29 01:34:32 -06:00

cmd/go: add some test skips for GOEXPERIMENT=nocoverageredesign

Couple of test need to be skipped for GOEXPERIMENT=nocoverageredesign,
since they use "go build -cover". [This is a test-only CL].

Change-Id: I48c0855e2d8f042f9bc293e4cf48f326682112c9
Reviewed-on: https://go-review.googlesource.com/c/go/+/495597
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
This commit is contained in:
Than McIntosh 2023-05-16 16:56:13 -04:00
parent e4e8f9b8ff
commit 0cd04724aa
4 changed files with 7 additions and 0 deletions

View File

@ -5,6 +5,7 @@
# inside and outside the standard library.
[short] skip
[!GOEXPERIMENT:coverageredesign] skip
# Compile an object.
go tool compile -p tiny tiny/tiny.go tiny/tiny2.go

View File

@ -4,6 +4,7 @@
# the "main" package is handled. See issue 57169 for details.
[short] skip
[!GOEXPERIMENT:coverageredesign] skip
# Build this program with -cover and run to collect a profile.

View File

@ -1,5 +1,6 @@
[short] skip
[compiler:gccgo] skip # gccgo has no cover tool
[!GOEXPERIMENT:coverageredesign] skip
go test -short -cover -covermode=atomic -coverpkg=coverdep/p1 coverdep

View File

@ -11,6 +11,7 @@ import (
"internal/coverage/decodecounter"
"internal/coverage/decodemeta"
"internal/coverage/pods"
"internal/goexperiment"
"internal/testenv"
"os"
"path/filepath"
@ -44,6 +45,9 @@ func (v *visitor) Finish()
func TestIssue58411(t *testing.T) {
testenv.MustHaveGoBuild(t)
if !goexperiment.CoverageRedesign {
t.Skipf("skipping since this test requires 'go build -cover'")
}
// Build a tiny test program with -cover. Smallness is important;
// it is one of the factors that triggers issue 58411.