1
0
mirror of https://github.com/golang/go synced 2024-11-12 09:50:21 -07:00

exp/types: better diagnosis for compile failures.

R=gri, dave
CC=golang-dev
https://golang.org/cl/6587046
This commit is contained in:
David Symonds 2012-09-30 15:46:37 +10:00
parent 9a3bc51c81
commit 0b448bdef7

View File

@ -41,10 +41,9 @@ func compile(t *testing.T, dirname, filename string) string {
cmd.Dir = dirname
out, err := cmd.CombinedOutput()
if err != nil {
t.Logf("%s", out)
t.Fatalf("%s %s failed: %s", gcPath, filename, err)
return ""
}
t.Logf("%s", string(out))
archCh, _ := build.ArchChar(runtime.GOARCH)
// filename should end with ".go"
return filepath.Join(dirname, filename[:len(filename)-2]+archCh)