From 004858ccddb2f092d3413e96ba8526a8df8e3906 Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Thu, 11 Sep 2025 23:48:04 +0000 Subject: all: replace os.Getenv("GO_BUILDER_NAME") with testenv.Builder in tests Some tests still reach for GO_BUILDER_NAME directly. This change makes it so that they go through testenv.Builder. There are a couple more, but changing them may also cause tests to start failing. Done in a follow-up. Change-Id: Id2453b7b62f5ebf3594e92fa53724a577a97440f Reviewed-on: https://go-review.googlesource.com/c/go/+/703135 Reviewed-by: Dmitri Shuralyov Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI --- src/cmd/cgo/internal/testplugin/plugin_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cmd/cgo/internal/testplugin/plugin_test.go') diff --git a/src/cmd/cgo/internal/testplugin/plugin_test.go b/src/cmd/cgo/internal/testplugin/plugin_test.go index 5bff81092c..2afb542ec4 100644 --- a/src/cmd/cgo/internal/testplugin/plugin_test.go +++ b/src/cmd/cgo/internal/testplugin/plugin_test.go @@ -46,7 +46,7 @@ func prettyPrintf(format string, args ...interface{}) { } func testMain(m *testing.M) int { - if testing.Short() && os.Getenv("GO_BUILDER_NAME") == "" { + if testing.Short() && testenv.Builder() == "" { globalSkip = func(t *testing.T) { t.Skip("short mode and $GO_BUILDER_NAME not set") } return m.Run() } -- cgit v1.3-5-g9baa