diff options
| author | Cherry Mui <cherryyz@google.com> | 2023-07-20 14:21:07 -0400 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2023-07-21 15:03:06 +0000 |
| commit | 3437ff0d7ad9b556b534871dec14bf4ac4e603fe (patch) | |
| tree | dd488802d006a301669e77c3c53df421ff7d6a33 /src/cmd/cgo/internal/testshared | |
| parent | 14adf4fb21935061e0f1425030f2f4a003800e54 (diff) | |
| download | go-3437ff0d7ad9b556b534871dec14bf4ac4e603fe.tar.xz | |
cmd/cgo/internal/testshared: skip in short mode and not on builders
We already skip testcarchive, testcshared, and testplugin in short
mode and not on builders. The shared build mode is not more
supported than the c-archive, c-shared, and plugin build modes. No
need to run it everywhere by default.
Updates #61025.
Change-Id: I6a06e04c1a1dc78f0f85456320d128bd67277915
Reviewed-on: https://go-review.googlesource.com/c/go/+/511696
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/cmd/cgo/internal/testshared')
| -rw-r--r-- | src/cmd/cgo/internal/testshared/shared_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cmd/cgo/internal/testshared/shared_test.go b/src/cmd/cgo/internal/testshared/shared_test.go index 796c46b9bf..2eab33f919 100644 --- a/src/cmd/cgo/internal/testshared/shared_test.go +++ b/src/cmd/cgo/internal/testshared/shared_test.go @@ -96,6 +96,10 @@ func goCmd(t *testing.T, args ...string) string { // TestMain calls testMain so that the latter can use defer (TestMain exits with os.Exit). func testMain(m *testing.M) (int, error) { + if testing.Short() && os.Getenv("GO_BUILDER_NAME") == "" { + globalSkip = func(t testing.TB) { t.Skip("short mode and $GO_BUILDER_NAME not set") } + return m.Run(), nil + } if !platform.BuildModeSupported(runtime.Compiler, "shared", runtime.GOOS, runtime.GOARCH) { globalSkip = func(t testing.TB) { t.Skip("shared build mode not supported") } return m.Run(), nil |
