]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: if runtime is stale while testing, show StaleReason
authorIan Lance Taylor <iant@golang.org>
Mon, 13 Feb 2017 23:30:42 +0000 (15:30 -0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 13 Feb 2017 23:46:12 +0000 (23:46 +0000)
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>

src/runtime/crash_test.go

index 7c7532b4e6abb2025b24f4f1e7ca4485038879fc..8a48c351f6e65377c7e987bb4a9fc38c78924040 100644 (file)
@@ -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'.")
                }
        })