mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
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>
This commit is contained in:
parent
936bb82ddb
commit
2bf57a3534
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user