Skip to content

Commit

Permalink
test: fix issue53702.go for noopt builder
Browse files Browse the repository at this point in the history
The test requires inlining happens.

Updates #53702

Change-Id: I0d93b5e29e271ace4098307b74c40c0e06d975e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/423834
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Auto-Submit: Cuong Manh Le <[email protected]>
Reviewed-by: Matthew Dempsky <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
Run-TryBot: Cuong Manh Le <[email protected]>
  • Loading branch information
cuonglm authored and gopherbot committed Aug 15, 2022
1 parent e99f285 commit 4a4e206
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4a4e206

Please sign in to comment.