]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: drop wasitest from special list
authorAustin Clements <austin@google.com>
Thu, 25 May 2023 13:25:05 +0000 (09:25 -0400)
committerGopher Robot <gobot@golang.org>
Thu, 25 May 2023 15:34:13 +0000 (15:34 +0000)
CL 498255 made runtime/internal/wasitest compatible with all platforms
so that "go test std" works again. This means it no longer has to be
in the special dist test list.

While we're here explain the purpose of this list better and implore
people to please not expand it, since almost any addition is a sign
that "go test std cmd" no longer works.

Change-Id: I31c7fb767787fa587f65c2697aed9ed43e95fb18
Reviewed-on: https://go-review.googlesource.com/c/go/+/498256
Reviewed-by: Russ Cox <rsc@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Austin Clements <austin@google.com>

src/cmd/dist/test.go

index f16bf32bbf426353c977e1d5c7551ca8f8d4c21a..f148fb97b5f62dddfb375ab8eb205ce8d74bafa2 100644 (file)
@@ -573,9 +573,17 @@ func (t *tester) registerRaceBenchTest(pkg string) {
 func (t *tester) registerTests() {
        // registerStdTestSpecially tracks import paths in the standard library
        // whose test registration happens in a special way.
+       //
+       // These tests *must* be able to run normally as part of "go test std cmd",
+       // even if they are also registered separately by dist, because users often
+       // run go test directly. Use skips or build tags in preference to expanding
+       // this list.
        registerStdTestSpecially := map[string]bool{
-               "runtime/internal/wasitest": true, // Registered at the bottom as a host test.
-               "cmd/internal/testdir":      true, // Registered at the bottom with sharding.
+               // testdir can run normally as part of "go test std cmd", but because
+               // it's a very large test, we register is specially as several shards to
+               // enable better load balancing on sharded builders. Ideally the build
+               // system would know how to shard any large test package.
+               "cmd/internal/testdir": true,
        }
 
        // Fast path to avoid the ~1 second of `go list std cmd` when