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: default avatarJosh Bleecher Snyder <josharian@gmail.com>
parent 8defd9f7
...@@ -338,16 +338,16 @@ var stdOutErrAreTerminals func() bool ...@@ -338,16 +338,16 @@ var stdOutErrAreTerminals func() bool
func (t *tester) registerTests() { func (t *tester) registerTests() {
if strings.HasSuffix(os.Getenv("GO_BUILDER_NAME"), "-vetall") { if strings.HasSuffix(os.Getenv("GO_BUILDER_NAME"), "-vetall") {
// Run vet over std and cmd and call it quits. // Run vet over std and cmd and call it quits.
t.tests = append(t.tests, distTest{ for osarch := range cgoEnabled {
name: "vet/all", t.tests = append(t.tests, distTest{
heading: "go vet std cmd", name: "vet/" + osarch,
fn: func(dt *distTest) error { heading: "go vet std cmd",
// This runs vet/all for the current platform. fn: func(dt *distTest) error {
// TODO: on a fast builder or builders, run over all platforms. t.addCmd(dt, "src/cmd/vet/all", "go", "run", "main.go", "-p="+osarch)
t.addCmd(dt, "src/cmd/vet/all", "go", "run", "main.go", "-all") return nil
return nil },
}, })
}) }
return 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