Commit 31f9769c authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

cmd/dist: make the vetall builder have test shards per os/arch

This makes the vetall builder friendly to auto-sharding by the build
coordinator.

Change-Id: I0893f5051ec90e7a6adcb89904ba08cd2d590549
Reviewed-on: https://go-review.googlesource.com/37572Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
parent 8defd9f7
......@@ -338,16 +338,16 @@ 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.
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
},
})
for osarch := range cgoEnabled {
t.tests = append(t.tests, distTest{
name: "vet/" + osarch,
heading: "go vet std cmd",
fn: func(dt *distTest) error {
t.addCmd(dt, "src/cmd/vet/all", "go", "run", "main.go", "-p="+osarch)
return nil
},
})
}
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment