test: fix issue53702.go for noopt builder

The test requires inlining happens.

Updates #53702

Change-Id: I0d93b5e29e271ace4098307b74c40c0e06d975e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/423834
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
This commit is contained in:
Cuong Manh Le 2022-08-15 09:58:30 +07:00 committed by Gopher Robot
parent e99f285d52
commit 4a4e206884

View file

@ -92,6 +92,10 @@ func defaultAllCodeGen() bool {
return os.Getenv("GO_BUILDER_NAME") == "linux-amd64" return os.Getenv("GO_BUILDER_NAME") == "linux-amd64"
} }
func optimizationOff() bool {
return strings.HasSuffix(os.Getenv("GO_BUILDER_NAME"), "-noopt")
}
var ( var (
goos = env.GOOS goos = env.GOOS
goarch = env.GOARCH goarch = env.GOARCH
@ -529,7 +533,13 @@ func (ctxt *context) match(name string) bool {
return false return false
} }
func init() { checkShouldTest() } func init() {
checkShouldTest()
// TODO(cuonglm): remove once we fix non-unified frontend or when it gone.
if optimizationOff() {
delete(go118Failures, "fixedbugs/issue53702.go")
}
}
// goGcflags returns the -gcflags argument to use with go build / go run. // goGcflags returns the -gcflags argument to use with go build / go run.
// This must match the flags used for building the standard library, // This must match the flags used for building the standard library,