From 496688b3cf81f92ee55c359cfbd8cd2c9d71c813 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 1 Dec 2017 11:57:57 -0500 Subject: cmd/go: honor -timeout=0 to mean no timeout The test binaries accept -timeout=0 to mean no timeout, but then the backup timer in cmd/go kills the test after 1 minute. Make cmd/go understand this special case and change behavior accordingly. Fixes #14780. Change-Id: I66bf517173a4ad21d53a5ee88d163f04b8929fb6 Reviewed-on: https://go-review.googlesource.com/81499 Run-TryBot: Russ Cox Reviewed-by: Brad Fitzpatrick --- src/testing/testing.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/testing/testing.go') diff --git a/src/testing/testing.go b/src/testing/testing.go index e12b622b03..cddd475fd7 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -265,7 +265,7 @@ var ( mutexProfile = flag.String("test.mutexprofile", "", "write a mutex contention profile to the named file after execution") mutexProfileFraction = flag.Int("test.mutexprofilefraction", 1, "if >= 0, calls runtime.SetMutexProfileFraction()") traceFile = flag.String("test.trace", "", "write an execution trace to `file`") - timeout = flag.Duration("test.timeout", 0, "panic test binary after duration `d` (0 means unlimited)") + timeout = flag.Duration("test.timeout", 0, "panic test binary after duration `d` (default 0, timeout disabled)") cpuListStr = flag.String("test.cpu", "", "comma-separated `list` of cpu counts to run each test with") parallel = flag.Int("test.parallel", runtime.GOMAXPROCS(0), "run at most `n` tests in parallel") -- cgit v1.3-5-g9baa