]> Cypherpunks repositories - gostls13.git/commitdiff
test: fix issue53702.go for noopt builder
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Mon, 15 Aug 2022 02:58:30 +0000 (09:58 +0700)
committerGopher Robot <gobot@golang.org>
Mon, 15 Aug 2022 17:50:32 +0000 (17:50 +0000)
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>

test/run.go

index a6ee1634bbc18cbbdac305c590b2708717168d75..cdbe15c3890269acfbc36ccb5e67594fc0756d15 100644 (file)
@@ -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,