aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/nm/nm_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/nm/nm_test.go')
-rw-r--r--src/cmd/nm/nm_test.go15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/cmd/nm/nm_test.go b/src/cmd/nm/nm_test.go
index 1b5bd21ad5..1748a153d0 100644
--- a/src/cmd/nm/nm_test.go
+++ b/src/cmd/nm/nm_test.go
@@ -6,6 +6,7 @@ package main
import (
"fmt"
+ "internal/obscuretestdata"
"internal/testenv"
"io/ioutil"
"os"
@@ -57,8 +58,8 @@ func TestNonGoExecs(t *testing.T) {
testfiles := []string{
"debug/elf/testdata/gcc-386-freebsd-exec",
"debug/elf/testdata/gcc-amd64-linux-exec",
- "debug/macho/testdata/gcc-386-darwin-exec",
- "debug/macho/testdata/gcc-amd64-darwin-exec",
+ "debug/macho/testdata/gcc-386-darwin-exec.base64", // golang.org/issue/34986
+ "debug/macho/testdata/gcc-amd64-darwin-exec.base64", // golang.org/issue/34986
// "debug/pe/testdata/gcc-amd64-mingw-exec", // no symbols!
"debug/pe/testdata/gcc-386-mingw-exec",
"debug/plan9obj/testdata/amd64-plan9-exec",
@@ -67,6 +68,16 @@ func TestNonGoExecs(t *testing.T) {
}
for _, f := range testfiles {
exepath := filepath.Join(runtime.GOROOT(), "src", f)
+ if strings.HasSuffix(f, ".base64") {
+ tf, err := obscuretestdata.DecodeToTempFile(exepath)
+ if err != nil {
+ t.Errorf("obscuretestdata.DecodeToTempFile(%s): %v", exepath, err)
+ continue
+ }
+ defer os.Remove(tf)
+ exepath = tf
+ }
+
cmd := exec.Command(testnmpath, exepath)
out, err := cmd.CombinedOutput()
if err != nil {