]> Cypherpunks repositories - gostls13.git/commit
cmd/dist: skip compiling 100 packages without benchmarks in race mode
authorBrad Fitzpatrick <bradfitz@golang.org>
Wed, 14 Sep 2016 16:34:27 +0000 (16:34 +0000)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 14 Sep 2016 17:04:47 +0000 (17:04 +0000)
commit3ead49989ed037bda6009b96b0008ed83fb7d184
treeb33d51f48b3a27ef07565268e1a44e3efea2a2a6
parent059ada596ca5d510d1e1755b3b6dafa036195fb0
cmd/dist: skip compiling 100 packages without benchmarks in race mode

The go_test_bench:* tests run:

    go test -short -race -run=^$ -benchtime=.1s -cpu=4 $PKG

... on each discovered package with any tests. (The same set used for
the "go_test:*" tests)

That set was 168 packages:

$ go tool dist test -list | grep go_test: | wc -l
168

But only 76 of those have a "func Benchmark", and running each
"go_test_bench:" test and compiling it in race mode, just to do
nothing took 1-2 seconds each.

So stop doing that and filter out the useless packages earlier. Now:

$ go tool dist test -list -race | grep go_test_bench:  | wc -l
76

Should save 90-180 seconds. (or maybe 45 seconds for trybots, since
they're sharded)

Updates #17104

Change-Id: I08ccb072a0dc0454ea425540ee8e74b59f83b773
Reviewed-on: https://go-review.googlesource.com/29153
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/dist/test.go