]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: add some test skips for GOEXPERIMENT=nocoverageredesign
authorThan McIntosh <thanm@google.com>
Tue, 16 May 2023 20:56:13 +0000 (16:56 -0400)
committerThan McIntosh <thanm@google.com>
Tue, 23 May 2023 11:36:17 +0000 (11:36 +0000)
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>
src/cmd/go/testdata/script/cover_build_cmdline_pkgs.txt
src/cmd/go/testdata/script/cover_main_import_path.txt
src/cmd/go/testdata/script/cover_sync_atomic_import.txt
src/cmd/internal/cov/read_test.go

index ba382639e9cdf2e82d5f500afa541e2b456fc1bf..e14a0784f2bc9d954a2dd8cd643f6c3d37b347e1 100644 (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
index 3a2f3c3ee28feeaf37bac3821e934fc865c7c975..e8696e27e23baebd49ecbe2d29014ac46fdbc083 100644 (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.
 
index b933cdb4c67fc27704e7fcdcc5d246d436892598..283db3e1a684738f6be5b50e9ae0a767e58343d0 100644 (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
 
index cef03fa323e6e8d4a5394b0bbd5b4fbc6220370f..fa2151a09ed2eddcc0aa220dd6f6e4d98970a3a8 100644 (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.