diff options
| author | Sean Liao <sean@liao.dev> | 2025-03-22 00:48:16 +0000 |
|---|---|---|
| committer | Sean Liao <sean@liao.dev> | 2025-03-25 11:52:07 -0700 |
| commit | 2bf57a3534f478d9c072391b1deba1d211545661 (patch) | |
| tree | 13e12dda96f14a34fde6f7b55e0f46cc4241bda0 /src/testing/testing.go | |
| parent | 936bb82ddb7f6456e3008b26f0398880d11ce3c0 (diff) | |
| download | go-2bf57a3534f478d9c072391b1deba1d211545661.tar.xz | |
testing: document exit codes
Fixes #25989
Change-Id: I2e2a2a17854034ff68e69b8973018b1b2e7d59f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/660076
Reviewed-by: Thanyalak Detkhong (Palm’my) <pmy4416@gmail.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/testing/testing.go')
| -rw-r--r-- | src/testing/testing.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/testing/testing.go b/src/testing/testing.go index 5b0a33f28d..b03e6fdeda 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -2043,6 +2043,9 @@ var testingTesting bool var realStderr *os.File // Run runs the tests. It returns an exit code to pass to os.Exit. +// The exit code is zero when all tests pass, and non-zero for any kind +// of failure. For machine readable test results, parse the output of +// 'go test -json'. func (m *M) Run() (code int) { defer func() { code = m.exitCode |
