Commit f2694534 authored by Russ Cox's avatar Russ Cox

testing: shorten go test -short testing

This cuts the time for 'go test -short testing' from 0.9s to < 0.1s.

Change-Id: Ib8402f80239e1e96ea5221dfd5cd0db08170d85b
Reviewed-on: https://go-review.googlesource.com/c/go/+/177420
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 6ab049b9
......@@ -68,6 +68,9 @@ func TestResultString(t *testing.T) {
}
func TestRunParallel(t *testing.T) {
if testing.Short() {
t.Skip("skipping in short mode")
}
testing.Benchmark(func(b *testing.B) {
procs := uint32(0)
iters := uint64(0)
......
......@@ -756,6 +756,9 @@ func TestLogAfterComplete(t *T) {
}
func TestBenchmark(t *T) {
if Short() {
t.Skip("skipping in short mode")
}
res := Benchmark(func(b *B) {
for i := 0; i < 5; i++ {
b.Run("", func(b *B) {
......
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