Skip to content

Commit a6a7c7a

Browse files
author
Bryan C. Mills
committed
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 <[email protected]> Run-TryBot: Bryan Mills <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Michael Matloob <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 5522f8c commit a6a7c7a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cmd/go/go_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ func TestMain(m *testing.M) {
133133
}
134134
gotool, err := testenv.GoTool()
135135
if err != nil {
136-
fmt.Fprintln(os.Stderr, err)
136+
fmt.Fprintln(os.Stderr, "locating go tool: ", err)
137137
os.Exit(2)
138138
}
139139

src/cmd/go/script_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ func (ts *testScript) cmdStale(want simpleStatus, args []string) {
902902
tmpl := "{{if .Error}}{{.ImportPath}}: {{.Error.Err}}{{else}}"
903903
switch want {
904904
case failure:
905-
tmpl += "{{if .Stale}}{{.ImportPath}} is unexpectedly stale{{end}}"
905+
tmpl += "{{if .Stale}}{{.ImportPath}} is unexpectedly stale: {{.StaleReason}}{{end}}"
906906
case success:
907907
tmpl += "{{if not .Stale}}{{.ImportPath}} is unexpectedly NOT stale{{end}}"
908908
default:

0 commit comments

Comments
 (0)