summaryrefslogtreecommitdiff
path: root/src/cmd/go/testflag.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2012-02-27 12:49:10 +1100
committerRob Pike <r@golang.org>2012-02-27 12:49:10 +1100
commit48be068b8541dccdd30f316f2b1054a8b3ae14b4 (patch)
tree0f47ecc435a62165f6f91087adb1428a56f7d796 /src/cmd/go/testflag.go
parent2bfd7f3bb8fb9ea1789b02ac752e39edb6855739 (diff)
downloadgo-48be068b8541dccdd30f316f2b1054a8b3ae14b4.tar.gz
testing: add -test.example flag to control execution of examples
Also, don't run examples if -test.run is set. R=golang-dev, dsymonds CC=golang-dev http://codereview.appspot.com/5697069
Diffstat (limited to 'src/cmd/go/testflag.go')
-rw-r--r--src/cmd/go/testflag.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cmd/go/testflag.go b/src/cmd/go/testflag.go
index 7c9b7f16d..916e34649 100644
--- a/src/cmd/go/testflag.go
+++ b/src/cmd/go/testflag.go
@@ -28,6 +28,7 @@ var usageMessage = `Usage of go test:
-benchtime=1: passes -test.benchtime to test
-cpu="": passes -test.cpu to test
-cpuprofile="": passes -test.cpuprofile to test
+ -example="": passes -test.example to test
-memprofile="": passes -test.memprofile to test
-memprofilerate=0: passes -test.memprofilerate to test
-parallel=0: passes -test.parallel to test
@@ -67,6 +68,7 @@ var testFlagDefn = []*testFlagSpec{
{name: "benchtime", passToTest: true},
{name: "cpu", passToTest: true},
{name: "cpuprofile", passToTest: true},
+ {name: "example", passToTest: true},
{name: "memprofile", passToTest: true},
{name: "memprofilerate", passToTest: true},
{name: "parallel", passToTest: true},