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>
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