aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/test2json/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/test2json/main.go')
-rw-r--r--src/cmd/test2json/main.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cmd/test2json/main.go b/src/cmd/test2json/main.go
index 57a874193e..fdf681a8ff 100644
--- a/src/cmd/test2json/main.go
+++ b/src/cmd/test2json/main.go
@@ -6,7 +6,7 @@
//
// Usage:
//
-// go tool test2json [-p pkg] [-t] [./pkg.test -test.v]
+// go tool test2json [-p pkg] [-t] [./pkg.test -test.v [-test.paniconexit0]]
//
// Test2json runs the given test command and converts its output to JSON;
// with no command specified, test2json expects test output on standard input.
@@ -18,6 +18,10 @@
//
// The -t flag requests that time stamps be added to each test event.
//
+// The test must be invoked with -test.v. Additionally passing
+// -test.paniconexit0 will cause test2json to exit with a non-zero
+// status if one of the tests being run calls os.Exit(0).
+//
// Note that test2json is only intended for converting a single test
// binary's output. To convert the output of a "go test" command,
// use "go test -json" instead of invoking test2json directly.
@@ -82,9 +86,9 @@ package main
import (
"flag"
"fmt"
+ exec "internal/execabs"
"io"
"os"
- "os/exec"
"cmd/internal/test2json"
)