From: Andrew Gerrand Date: Mon, 11 Apr 2016 01:04:15 +0000 (+1000) Subject: cmd/go: document that -run=^$ skips all tests X-Git-Tag: go1.7beta1~780 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=20375f64b18e9f904302d8f873e23702117bf4f5;p=gostls13.git cmd/go: document that -run=^$ skips all tests Change-Id: I7bbdd9600e0d9a647aeea16f1ae9e42a4e0cf44d Reviewed-on: https://go-review.googlesource.com/21823 Reviewed-by: Rob Pike --- diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go index 1f5981055c..ac975c0ab7 100644 --- a/src/cmd/go/alldocs.go +++ b/src/cmd/go/alldocs.go @@ -1347,8 +1347,8 @@ control the execution of any test: -bench regexp Run benchmarks matching the regular expression. - By default, no benchmarks run. To run all benchmarks, - use '-bench .' or '-bench=.'. + By default, no benchmarks run. + To run all benchmarks, use '-bench=.'. -benchmem Print memory allocation statistics for benchmarks. @@ -1435,7 +1435,9 @@ control the execution of any test: -run regexp Run only those tests and examples matching the regular - expression. + expression. By default, all tests run. + To skip all tests, use a pattern that matches no test names, + such as '-run=^$'. -short Tell long-running tests to shorten their run time. diff --git a/src/cmd/go/test.go b/src/cmd/go/test.go index a17bc4e982..8dbd9e22bf 100644 --- a/src/cmd/go/test.go +++ b/src/cmd/go/test.go @@ -126,8 +126,8 @@ control the execution of any test: const testFlag2 = ` -bench regexp Run benchmarks matching the regular expression. - By default, no benchmarks run. To run all benchmarks, - use '-bench .' or '-bench=.'. + By default, no benchmarks run. + To run all benchmarks, use '-bench=.'. -benchmem Print memory allocation statistics for benchmarks. @@ -214,7 +214,9 @@ const testFlag2 = ` -run regexp Run only those tests and examples matching the regular - expression. + expression. By default, all tests run. + To skip all tests, use a pattern that matches no test names, + such as '-run=^$'. -short Tell long-running tests to shorten their run time.