diff options
| author | Bryan C. Mills <bcmills@google.com> | 2023-05-04 17:14:53 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-05-04 21:30:44 +0000 |
| commit | e335a2665f5e322a7da8baa22fe816b6ef9aaf24 (patch) | |
| tree | d3d6ab38b6500f3e4b16d4ff3e43423503d3a44f /src/internal/testenv | |
| parent | 0022bd37a7f2483312950bcafbb3916ab76635ec (diff) | |
| download | go-e335a2665f5e322a7da8baa22fe816b6ef9aaf24.tar.xz | |
testenv: allow HasGoBuild to be false on -noopt builders
-noopt uses GO_GCFLAGS to disable optimization, and
GO_GCFLAGS has caused HasGoBuild to be false since CL 74470.
Change-Id: Iadcd15d412c05aec11e9a23b86d7b24af79d73bf
Reviewed-on: https://go-review.googlesource.com/c/go/+/492795
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/internal/testenv')
| -rw-r--r-- | src/internal/testenv/testenv_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/internal/testenv/testenv_test.go b/src/internal/testenv/testenv_test.go index be766288e8..d748e41540 100644 --- a/src/internal/testenv/testenv_test.go +++ b/src/internal/testenv/testenv_test.go @@ -96,6 +96,14 @@ func TestHasGoBuild(t *testing.T) { return } } + + if strings.HasSuffix(b, "-noopt") { + // The -noopt builder sets GO_GCFLAGS, which causes tests of 'go build' to + // be skipped. + t.Logf("HasGoBuild is false on %s", b) + return + } + t.Fatalf("HasGoBuild unexpectedly false on %s", b) } |
