]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist: run vet/all on dedicated builders
authorJosh Bleecher Snyder <josharian@gmail.com>
Sun, 11 Sep 2016 01:53:30 +0000 (18:53 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 14 Sep 2016 23:03:34 +0000 (23:03 +0000)
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 <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/dist/test.go

index accc54eb1a8b2db4962d867b411ace0850146b46..fbb4b40209f55b8de0eb99043e475fae6f93a6ba 100644 (file)
@@ -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).