From 807aadcd3e148110d0e7d4dc251d831c35af30b6 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 7 Mar 2012 12:09:43 -0500 Subject: [PATCH] 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 --- src/cmd/go/testflag.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/go/testflag.go b/src/cmd/go/testflag.go index 8c887ba7507..ecf5bf45629 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":