Skip to content

Commit 62237c2

Browse files
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 <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent efb3cab commit 62237c2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/runtime/crash_test.go

+5
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ func checkStaleRuntime(t *testing.T) {
165165
}
166166
if string(out) != "false\n" {
167167
t.Logf("go list -f {{.Stale}} runtime:\n%s", out)
168+
out, err := testEnv(exec.Command(testenv.GoToolPath(t), "list", "-f", "{{.StaleReason}}", "runtime")).CombinedOutput()
169+
if err != nil {
170+
t.Logf("go list -f {{.StaleReason}} failed: %v", err)
171+
}
172+
t.Logf("go list -f {{.StaleReason}} runtime:\n%s", out)
168173
staleRuntimeErr = fmt.Errorf("Stale runtime.a. Run 'go install runtime'.")
169174
}
170175
})

0 commit comments

Comments
 (0)