]> Cypherpunks repositories - gostls13.git/commitdiff
testing: clarify -timeout flag
authorKale Blankenship <kale@lemnisys.com>
Thu, 15 Jun 2017 03:11:21 +0000 (20:11 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 15 Jun 2017 05:57:29 +0000 (05:57 +0000)
Fixes #20090

Change-Id: I881607e55cd946a703e74a7d8ae2bbde67546510
Reviewed-on: https://go-review.googlesource.com/45816
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>

src/cmd/go/alldocs.go
src/cmd/go/internal/test/test.go
src/testing/testing.go

index 745ee31d99ed5abff63111c8623730268c345589..8a5aa5bf4feb094ee64656e41a567332b1c7e2e5 100644 (file)
 //         the Go tree can run a sanity check but not spend time running
 //         exhaustive tests.
 //
-//     -timeout t
-//         If a test runs longer than t, panic.
+//     -timeout d
+//         If the cumulative test time for a package runs longer than
+//         duration d, panic. Timeout is disabled if set to 0.
 //         The default is 10 minutes (10m).
 //
 //     -v
index 8cffa14a1c7b6ac3208b36d53a5918926b9e9707..3575cad20461fa54736147a970fbbe874ce3a379 100644 (file)
@@ -214,8 +214,9 @@ const testFlag2 = `
            the Go tree can run a sanity check but not spend time running
            exhaustive tests.
 
-       -timeout t
-           If a test runs longer than t, panic.
+       -timeout d
+           If the cumulative test time for a package runs longer than
+           duration d, panic. Timeout is disabled if set to 0.
            The default is 10 minutes (10m).
 
        -v
index dbe9089fb53663690a2b7d595fa918c220c57c0b..fa6c36c6d3ff66bfbc527f7e705dda68be6a13a7 100644 (file)
@@ -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, "fail test binary execution after duration `d` (0 means unlimited)")
+       timeout              = flag.Duration("test.timeout", 0, "panic test binary after duration `d` (0 means unlimited)")
        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")