]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/testdir: print stderr if go list fails while gathering stdlib import...
authorthepudds <thepudds1460@gmail.com>
Wed, 21 Jun 2023 18:42:03 +0000 (14:42 -0400)
committerGopher Robot <gobot@golang.org>
Wed, 20 Nov 2024 13:07:35 +0000 (13:07 +0000)
commita311754d5411c742211a4b56ae3eed00d20898c9
tree20fa2acdb199f68007ffd1b01ca5d211d34fdfd6
parent5d2cc5662027f6464db2781c88b4f3bb64f58136
cmd/internal/testdir: print stderr if go list fails while gathering stdlib import config

If cmd/compile is in an unhappy state, the testdir test can
fail with an unhelpful 'exit code 1' log message if
'go list' fails while gathering stdlib import config
When running individual files, such as:

 go test cmd/internal/testdir -run='Test/escape.*.go'

This might also happen in other uses, or it might be
that a more expansive set of tests such as run.bash
might first trigger a more useful error.

This change prints stderr and states that it is 'go list'
that is having problems to help someone track down the
proper issue.

Change-Id: Iba658ea139bb9087ab8adb00c9f65080a1b6ee76
Reviewed-on: https://go-review.googlesource.com/c/go/+/524941
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/cmd/internal/testdir/testdir_test.go