Skip to content

Commit

Permalink
test: always run test in unified IR mode regardless of explicit -G flag
Browse files Browse the repository at this point in the history
Currently, if a test explicitly specify -G flag, if that flag conflict
with compiler default -G flag, the test will be skipped. That's the
reason CL 346469 haven't fixed the unified IR stuff, but still make the
unified builder passed.

This CL makes run.go always run the test in unified IR mode, regardless
of the explicit -G flag specified.

Updates golang#48094

Change-Id: I959ecaff6aca07844f0ffcf36caa60cf0747e8ce
Reviewed-on: https://go-review.googlesource.com/c/go/+/347271
Trust: Cuong Manh Le <[email protected]>
Trust: Keith Randall <[email protected]>
Run-TryBot: Cuong Manh Le <[email protected]>
TryBot-Result: Go Bot <[email protected]>
Reviewed-by: Matthew Dempsky <[email protected]>
  • Loading branch information
cuonglm committed Sep 2, 2021
1 parent 3db4888 commit 1ae7ddc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,8 @@ func (t *test) run() {
}
}

if hasGFlag && t.glevel != CompilerDefaultGLevel {
// In unified IR mode, run the test regardless of explicit -G flag.
if !unifiedEnabled && hasGFlag && t.glevel != CompilerDefaultGLevel {
// test provides explicit -G flag already; don't run again
if *verbose {
fmt.Printf("excl\t%s\n", t.goFileName())
Expand Down

0 comments on commit 1ae7ddc

Please sign in to comment.