From 4a4e206884c64397c0b62e58be876f457b4cd477 Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Mon, 15 Aug 2022 09:58:30 +0700 Subject: [PATCH] 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 Reviewed-by: Keith Randall Auto-Submit: Cuong Manh Le Reviewed-by: Matthew Dempsky Reviewed-by: Keith Randall Run-TryBot: Cuong Manh Le --- test/run.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/run.go b/test/run.go index a6ee1634bb..cdbe15c389 100644 --- a/test/run.go +++ b/test/run.go @@ -92,6 +92,10 @@ func defaultAllCodeGen() bool { return os.Getenv("GO_BUILDER_NAME") == "linux-amd64" } +func optimizationOff() bool { + return strings.HasSuffix(os.Getenv("GO_BUILDER_NAME"), "-noopt") +} + var ( goos = env.GOOS goarch = env.GOARCH @@ -529,7 +533,13 @@ func (ctxt *context) match(name string) bool { 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. // This must match the flags used for building the standard library,