]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: fix go test -compiler
authorRuss Cox <rsc@golang.org>
Wed, 7 Mar 2012 17:09:43 +0000 (12:09 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 7 Mar 2012 17:09:43 +0000 (12:09 -0500)
The compiler must be changed with the Set method
so that the buildToolchain gets updated too.

Fixes #3231.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5768044

src/cmd/go/testflag.go

index 8c887ba7507b23b4f5d6c21ea1236fa4ff2a5f6f..ecf5bf456293fd24ce29119570e79c61201f173a 100644 (file)
@@ -142,7 +142,7 @@ func testFlags(args []string) (packageNames, passToTest []string) {
                case "tags":
                        buildContext.BuildTags = strings.Fields(value)
                case "compiler":
-                       buildContext.Compiler = value
+                       buildCompiler{}.Set(value)
                case "file":
                        testFiles = append(testFiles, value)
                case "bench":