]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: fix incorrect platform string shared by all tests
authorWei Xiao <wei.xiao@arm.com>
Thu, 13 Apr 2017 06:06:43 +0000 (14:06 +0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 14 Apr 2017 03:15:59 +0000 (03:15 +0000)
all tests currently share the same platform string and fail to
vet expected platforms

Fixes #19958

Change-Id: I2801e1e84958e31975769581e27ea5ca6a0edf5b
Reviewed-on: https://go-review.googlesource.com/40511
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/dist/test.go

index 9ba7798069140c5dc072c8e0e5ee397ef8f003fb..9aa966d14c46a2aea5685119a18f904a372f7f0d 100644 (file)
@@ -340,7 +340,8 @@ var stdOutErrAreTerminals func() bool
 func (t *tester) registerTests() {
        if strings.HasSuffix(os.Getenv("GO_BUILDER_NAME"), "-vetall") {
                // Run vet over std and cmd and call it quits.
-               for osarch := range cgoEnabled {
+               for k := range cgoEnabled {
+                       osarch := k
                        t.tests = append(t.tests, distTest{
                                name:    "vet/" + osarch,
                                heading: "go vet std cmd",