aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2017-11-10 13:37:28 -0500
committerRuss Cox <rsc@golang.org>2017-11-10 19:51:51 +0000
commit3af20c06fe206ff92a8111fe230deb0170dac33d (patch)
tree3a5040306ea664f61f286ae43c887aa3b473fd53 /src/cmd
parente33794fbc2067515c7546ab3b35fe229eeec2a0b (diff)
downloadgo-3af20c06fe206ff92a8111fe230deb0170dac33d.tar.xz
cmd/go: document test -json
Added in CL 76873 but forgot to add the flag docs. Change-Id: I448f85cc8cf51399c0d799691226b94f88f327da Reviewed-on: https://go-review.googlesource.com/77030 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Caleb Spare <cespare@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/go/alldocs.go4
-rw-r--r--src/cmd/go/internal/test/test.go4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/cmd/go/alldocs.go b/src/cmd/go/alldocs.go
index ddda393f47..cc2f3cf8d8 100644
--- a/src/cmd/go/alldocs.go
+++ b/src/cmd/go/alldocs.go
@@ -813,6 +813,10 @@
// Install packages that are dependencies of the test.
// Do not run the test.
//
+// -json
+// Convert test output to JSON suitable for automated processing.
+// See 'go doc test2json' for the encoding details.
+//
// -o file
// Compile the test binary to the named file.
// The test still runs (unless -c or -i is specified).
diff --git a/src/cmd/go/internal/test/test.go b/src/cmd/go/internal/test/test.go
index 0a0f149e7d..15c43581e6 100644
--- a/src/cmd/go/internal/test/test.go
+++ b/src/cmd/go/internal/test/test.go
@@ -143,6 +143,10 @@ In addition to the build flags, the flags handled by 'go test' itself are:
Install packages that are dependencies of the test.
Do not run the test.
+ -json
+ Convert test output to JSON suitable for automated processing.
+ See 'go doc test2json' for the encoding details.
+
-o file
Compile the test binary to the named file.
The test still runs (unless -c or -i is specified).