aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/dist/test.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2023-05-17 16:02:06 -0400
committerAustin Clements <austin@google.com>2023-05-19 01:37:38 +0000
commit3ebbaf3a4dbde6f0298978f502f5058fb0e9e948 (patch)
treed76ae2dfaf80b4acdc68e9c5f7c32b2ee7da970f /src/cmd/dist/test.go
parentcbd3305f8c7452963b7a1b4db001776b76370ae4 (diff)
downloadgo-3ebbaf3a4dbde6f0298978f502f5058fb0e9e948.tar.gz
go-3ebbaf3a4dbde6f0298978f502f5058fb0e9e948.zip
cmd/dist: drop remaining conditions on default cgo tests
Currently, dist registers cmd/cgo/internal{test,testtls,testnocgo} specially, so they're opted out of "go test std cmd". It has to register these test packages to run in various non-default build configurations, but at this point they can also run with the default build configuration (and for test and testtls, we intentionally want to test them in the default configuration; this is pointless but harmless for testnocgo). Hence, this CL drops the special registration of their default build configurations from registerCgoTests and lets them be registered as part of registerStdTests. Change-Id: Id283f3cdcdb202955a854648c0ed1e3c4aa554d1 Reviewed-on: https://go-review.googlesource.com/c/go/+/496179 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/dist/test.go')
-rw-r--r--src/cmd/dist/test.go11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index 2a3028aa7e..65e4515e9a 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -575,11 +575,6 @@ func (t *tester) registerTests() {
// whose test registration happens in a special way.
registerStdTestSpecially := map[string]bool{
"cmd/internal/testdir": true, // Registered at the bottom with sharding.
- // cgo tests are registered specially because they involve unusual build
- // conditions and flags.
- "cmd/cgo/internal/test": true,
- "cmd/cgo/internal/testnocgo": true,
- "cmd/cgo/internal/testtls": true,
}
// Fast path to avoid the ~1 second of `go list std cmd` when
@@ -1128,9 +1123,9 @@ func (t *tester) registerCgoTests(heading string) {
return gt
}
- cgoTest("auto", "test", "auto", "")
- cgoTest("auto", "testtls", "auto", "")
- cgoTest("auto", "testnocgo", "auto", "")
+ // test, testtls, and testnocgo are run with linkmode="auto", buildmode=""
+ // as part of go test cmd. Here we only have to register the non-default
+ // build modes of these tests.
// Stub out various buildmode=pie tests on alpine until 54354 resolved.
builderName := os.Getenv("GO_BUILDER_NAME")