From: Bryan C. Mills Date: Fri, 28 Jan 2022 21:18:22 +0000 (-0500) Subject: cmd/go: add detail to test failures X-Git-Tag: go1.18rc1~129 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a6a7c7a1fd6a2450cfec11e54217e04dce843a54;p=gostls13.git cmd/go: add detail to test failures For #50892 Change-Id: I14ff1c43b39687a0ba5e668ee962cecfb49e4beb Reviewed-on: https://go-review.googlesource.com/c/go/+/381836 Trust: Bryan Mills Run-TryBot: Bryan Mills Reviewed-by: Dmitri Shuralyov Reviewed-by: Michael Matloob TryBot-Result: Gopher Robot --- diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go index 7aaec4eb98..1ea347ca6e 100644 --- a/src/cmd/go/go_test.go +++ b/src/cmd/go/go_test.go @@ -133,7 +133,7 @@ func TestMain(m *testing.M) { } gotool, err := testenv.GoTool() if err != nil { - fmt.Fprintln(os.Stderr, err) + fmt.Fprintln(os.Stderr, "locating go tool: ", err) os.Exit(2) } diff --git a/src/cmd/go/script_test.go b/src/cmd/go/script_test.go index 165d3308a8..722921f74c 100644 --- a/src/cmd/go/script_test.go +++ b/src/cmd/go/script_test.go @@ -902,7 +902,7 @@ func (ts *testScript) cmdStale(want simpleStatus, args []string) { tmpl := "{{if .Error}}{{.ImportPath}}: {{.Error.Err}}{{else}}" switch want { case failure: - tmpl += "{{if .Stale}}{{.ImportPath}} is unexpectedly stale{{end}}" + tmpl += "{{if .Stale}}{{.ImportPath}} is unexpectedly stale: {{.StaleReason}}{{end}}" case success: tmpl += "{{if not .Stale}}{{.ImportPath}} is unexpectedly NOT stale{{end}}" default: