From f91ca661794a9d3f293d81cb06231fc8ff9918f6 Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Wed, 29 May 2013 11:28:19 -0400 Subject: [PATCH] go.tools/cmd/vet: attempt to fix build Can't reproduce the failure outside the builder, but attempt a fix by changing the criterion for failure: FAIL iff the output contains "BUG". R=golang-dev, rsc CC=golang-dev https://golang.org/cl/9798050 --- cmd/vet/vet_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmd/vet/vet_test.go b/cmd/vet/vet_test.go index 820e60c459..ad6c72cc34 100644 --- a/cmd/vet/vet_test.go +++ b/cmd/vet/vet_test.go @@ -5,6 +5,7 @@ package main_test import ( + "bytes" "os" "os/exec" "path/filepath" @@ -63,5 +64,9 @@ func run(c *exec.Cmd, t *testing.T) bool { t.Fatal(err) } // Errchk delights by not returning non-zero status if it finds errors, so we look at the output. - return c.ProcessState.Success() && len(output) == 0 + // It prints "BUG" if there is a failure. + if !c.ProcessState.Success() { + return false + } + return !bytes.Contains(output, []byte("BUG")) }