From 62237c2c8ef26767d61c9fb35adbf6a82de2b312 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 13 Feb 2017 15:30:42 -0800 Subject: [PATCH] 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 Reviewed-by: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/runtime/crash_test.go | 5 +++++ 1 file changed, 5 insertions(+) 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'.") } }) -- 2.50.0