1
0
mirror of https://github.com/golang/go synced 2024-09-30 01:24:33 -06:00

cmd/go: convert TestBenchTimeout to the script framework

Part of converting all tests to script framework to improve
test parallelism.

Updates #36320
Updates #17751

Change-Id: I5dc403726f4960482ed7c267d1a333bbcc260087
Reviewed-on: https://go-review.googlesource.com/c/go/+/213828
Reviewed-by: Jay Conrod <jayconrod@google.com>
This commit is contained in:
Michael Matloob 2020-01-08 14:55:08 -05:00
parent 0119933477
commit acfab6870d
3 changed files with 18 additions and 18 deletions

View File

@ -3173,14 +3173,6 @@ const (
okPattern = `(?m)^ok`
)
// Issue 18845
func TestBenchTimeout(t *testing.T) {
tooSlow(t)
tg := testgo(t)
defer tg.cleanup()
tg.run("test", "-bench", ".", "-timeout", "750ms", "testdata/timeoutbench_test.go")
}
// Issue 19394
func TestWriteProfilesOnTimeout(t *testing.T) {
tooSlow(t)

View File

@ -0,0 +1,18 @@
# Tests issue #18845
[short] skip
go test -bench . -timeout=750ms timeoutbench_test.go
stdout ok
stdout PASS
-- timeoutbench_test.go --
package timeoutbench_test
import (
"testing"
"time"
)
func BenchmarkSleep1s(b *testing.B) {
time.Sleep(1 * time.Second)
}

View File

@ -1,10 +0,0 @@
package timeoutbench_test
import (
"testing"
"time"
)
func BenchmarkSleep1s(b *testing.B) {
time.Sleep(1 * time.Second)
}