Commit a0c96a92 authored by Aman Gupta's avatar Aman Gupta Committed by Than McIntosh

cmd/link/internal/ld: improve messages for testDWARF failures

Change-Id: I60af7a6477d1b25c43b311246ae4a79bf691460e
Reviewed-on: https://go-review.googlesource.com/c/go/+/171819Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 056d360f
...@@ -93,11 +93,11 @@ func testDWARF(t *testing.T, buildmode string, expectDWARF bool, env ...string) ...@@ -93,11 +93,11 @@ func testDWARF(t *testing.T, buildmode string, expectDWARF bool, env ...string)
// Ensure Apple's tooling can parse our object for symbols. // Ensure Apple's tooling can parse our object for symbols.
out, err = exec.Command("symbols", exe).CombinedOutput() out, err = exec.Command("symbols", exe).CombinedOutput()
if err != nil { if err != nil {
t.Fatal(err) t.Fatalf("symbols %v: %v: %s", filepath.Base(exe), err, out)
} else { } else {
if bytes.HasPrefix(out, []byte("Unable to find file")) { if bytes.HasPrefix(out, []byte("Unable to find file")) {
// This failure will cause the App Store to reject our binaries. // This failure will cause the App Store to reject our binaries.
t.Fatalf("/usr/bin/symbols %v: failed to parse file", filepath.Base(exe)) t.Fatalf("symbols %v: failed to parse file", filepath.Base(exe))
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment