// GO386
// For GOARCH=386, the floating point instruction set.
// Valid values are 387, sse2.
-// GOMIPS
-// For GOARCH=mips{,le}, whether to use floating point instructions.
-// Valid values are hardfloat (default), softfloat.
+// GOMIPS
+// For GOARCH=mips{,le}, whether to use floating point instructions.
+// Valid values are hardfloat (default), softfloat.
//
// Special-purpose environment variables:
//
//
// -timeout d
// If a test binary runs longer than duration d, panic.
+// If d is 0, the timeout is disabled.
// The default is 10 minutes (10m).
//
// -v
-timeout d
If a test binary runs longer than duration d, panic.
+ If d is 0, the timeout is disabled.
The default is 10 minutes (10m).
-v
// timer does not get a chance to fire.
if dt, err := time.ParseDuration(testTimeout); err == nil && dt > 0 {
testKillTimeout = dt + 1*time.Minute
+ } else if err == nil && dt == 0 {
+ // An explicit zero disables the test timeout.
+ // Let it have one century (almost) before we kill it.
+ testKillTimeout = 100 * 365 * 24 * time.Hour
}
// show passing test output (after buffering) with -v flag.
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")