From: Russ Cox Date: Wed, 7 Mar 2012 17:09:43 +0000 (-0500) Subject: cmd/go: fix go test -compiler X-Git-Tag: weekly.2012-03-13~132 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=807aadcd3e148110d0e7d4dc251d831c35af30b6;p=gostls13.git cmd/go: fix go test -compiler 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 --- diff --git a/src/cmd/go/testflag.go b/src/cmd/go/testflag.go index 8c887ba750..ecf5bf4562 100644 --- a/src/cmd/go/testflag.go +++ b/src/cmd/go/testflag.go @@ -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":