1
0
mirror of https://github.com/golang/go synced 2024-11-24 06:00:11 -07:00

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/37572
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
Brad Fitzpatrick 2017-02-28 18:12:32 +00:00
parent 8defd9f708
commit 31f9769c91

20
src/cmd/dist/test.go vendored
View File

@ -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
}