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>
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)
--- /dev/null
+# 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)
+}
+++ /dev/null
-package timeoutbench_test
-
-import (
- "testing"
- "time"
-)
-
-func BenchmarkSleep1s(b *testing.B) {
- time.Sleep(1 * time.Second)
-}