1
0
mirror of https://github.com/golang/go synced 2024-11-14 08:10:22 -07:00

cmd/pack: dump output of command of "go env" command in test

Get more information to help understand build failure on Plan 9.
Also Windows.
(TestHello is failing because GOCHAR does not appear in output.
What does?)

Update #7362

LGTM=bradfitz
R=rsc, bradfitz
CC=golang-codereviews
https://golang.org/cl/66070044
This commit is contained in:
Rob Pike 2014-02-19 15:01:50 -08:00
parent 53061193f1
commit 8ac499916e

View File

@ -195,7 +195,7 @@ func TestHello(t *testing.T) {
out := run("go", "env") out := run("go", "env")
i := strings.Index(out, "GOCHAR=\"") i := strings.Index(out, "GOCHAR=\"")
if i < 0 { if i < 0 {
t.Fatal("cannot find GOCHAR in 'go env' output") t.Fatal("cannot find GOCHAR in 'go env' output:\n", out)
} }
char := out[i+8 : i+9] char := out[i+8 : i+9]
run("go", "build", "cmd/pack") // writes pack binary to dir run("go", "build", "cmd/pack") // writes pack binary to dir