Skip to content

Commit

Permalink
cmd/link/internal/ld: improve messages for testDWARF failures
Browse files Browse the repository at this point in the history
Change-Id: I60af7a6477d1b25c43b311246ae4a79bf691460e
Reviewed-on: https://go-review.googlesource.com/c/go/+/171819
Reviewed-by: Brad Fitzpatrick <[email protected]>
Run-TryBot: Brad Fitzpatrick <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
  • Loading branch information
tmm1 authored and thanm committed May 30, 2019
1 parent 056d360 commit a0c96a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/link/dwarf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
out, err = exec.Command("symbols", exe).CombinedOutput()
if err != nil {
t.Fatal(err)
t.Fatalf("symbols %v: %v: %s", filepath.Base(exe), err, out)
} else {
if bytes.HasPrefix(out, []byte("Unable to find file")) {
// 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))
}
}
}
Expand Down

0 comments on commit a0c96a9

Please sign in to comment.