1
0
mirror of https://github.com/golang/go synced 2024-11-16 20:24:54 -07:00

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>
This commit is contained in:
Bryan C. Mills 2023-05-04 17:14:53 -04:00 committed by Gopher Robot
parent 0022bd37a7
commit e335a2665f

View File

@ -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)
}