mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
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
This commit is contained in:
parent
2b48cfca08
commit
f91ca66179
@ -5,6 +5,7 @@
|
|||||||
package main_test
|
package main_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -63,5 +64,9 @@ func run(c *exec.Cmd, t *testing.T) bool {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
// Errchk delights by not returning non-zero status if it finds errors, so we look at the output.
|
// 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"))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user