]> Cypherpunks repositories - gostls13.git/commitdiff
test: always run test in unified IR mode regardless of explicit -G flag
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Thu, 2 Sep 2021 04:06:27 +0000 (11:06 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Thu, 2 Sep 2021 06:44:04 +0000 (06:44 +0000)
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 #48094

Change-Id: I959ecaff6aca07844f0ffcf36caa60cf0747e8ce
Reviewed-on: https://go-review.googlesource.com/c/go/+/347271
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
test/run.go

index 3759059c95cf9c9f541c1b5a5e5f4609b21dd3ad..ddce94d7cc25482e546bd7af126ce58eb70f08a3 100644 (file)
@@ -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())