aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/crash_test.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2017-02-13 15:30:42 -0800
committerIan Lance Taylor <iant@golang.org>2017-02-13 23:46:12 +0000
commit62237c2c8ef26767d61c9fb35adbf6a82de2b312 (patch)
tree61eee5cbd0aeb32f6a564e1fedf45054350916ef /src/runtime/crash_test.go
parentefb3cab960e7cec3262f41705ec5b69431815411 (diff)
downloadgo-62237c2c8ef26767d61c9fb35adbf6a82de2b312.tar.gz
go-62237c2c8ef26767d61c9fb35adbf6a82de2b312.zip
runtime: if runtime is stale while testing, show StaleReason
Update #19062. Change-Id: I7397b573389145b56e73d2150ce0fc9aa75b3caa Reviewed-on: https://go-review.googlesource.com/36934 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/crash_test.go')
-rw-r--r--src/runtime/crash_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/crash_test.go b/src/runtime/crash_test.go
index 7c7532b4e6..8a48c351f6 100644
--- a/src/runtime/crash_test.go
+++ b/src/runtime/crash_test.go
@@ -165,6 +165,11 @@ func checkStaleRuntime(t *testing.T) {
}
if string(out) != "false\n" {
t.Logf("go list -f {{.Stale}} runtime:\n%s", out)
+ out, err := testEnv(exec.Command(testenv.GoToolPath(t), "list", "-f", "{{.StaleReason}}", "runtime")).CombinedOutput()
+ if err != nil {
+ t.Logf("go list -f {{.StaleReason}} failed: %v", err)
+ }
+ t.Logf("go list -f {{.StaleReason}} runtime:\n%s", out)
staleRuntimeErr = fmt.Errorf("Stale runtime.a. Run 'go install runtime'.")
}
})