From: Josh Bleecher Snyder Date: Sun, 11 Sep 2016 01:53:30 +0000 (-0700) Subject: cmd/dist: run vet/all on dedicated builders X-Git-Tag: go1.8beta1~1315 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f9e9412ce26ca208c1d25a6b854259c94aa54030;p=gostls13.git cmd/dist: run vet/all on dedicated builders We will soon add dedicated builders for running vet/all. Their name will end with "-vetall". On those builders, run vet/all and nothing else. On all other builders, including local all.bash, don't run vet/all at all, because it is slow. This will probably be refined more over time. Change-Id: Ib1d0337adda84353931a325515c132068d4320cd Reviewed-on: https://go-review.googlesource.com/28962 Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index accc54eb1a..fbb4b40209 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -329,6 +329,21 @@ func (t *tester) registerRaceBenchTest(pkg string) { } func (t *tester) registerTests() { + if strings.HasSuffix(os.Getenv("GO_BUILDER_NAME"), "-vetall") { + // Run vet over std and cmd and call it quits. + t.tests = append(t.tests, distTest{ + name: "vet/all", + heading: "go vet std cmd", + fn: func(dt *distTest) error { + // This runs vet/all for the current platform. + // TODO: on a fast builder or builders, run over all platforms. + t.addCmd(dt, "src/cmd/vet/all", "go", "run", "main.go", "-all") + return nil + }, + }) + return + } + // Fast path to avoid the ~1 second of `go list std cmd` when // the caller lists specific tests to run. (as the continuous // build coordinator does).