Skip to content

Commit 4fe8fe2

Browse files
dmitshurgopherbot
authored andcommitted
cmd/gorebuild: use expected executable name in TestStripDarwinSig
StripDarwinSig is a Fixer that expects to work only on Mach-O executable files in GOROOT/bin and GOROOT/pkg/tool, and silently returns data as is otherwise. Fix TestStripDarwinSig to give StripDarwinSig an expected name such that it does its job instead of doing nothing. Change-Id: If48897965208c41a9e7ef049b3aafbfb26bfb385 Reviewed-on: https://go-review.googlesource.com/c/build/+/516296 Run-TryBot: Dmitri Shuralyov <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Russ Cox <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]>
1 parent 44fe27b commit 4fe8fe2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/gorebuild/pkg_darwin_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"bytes"
99
"os"
1010
"os/exec"
11+
"path/filepath"
1112
"runtime"
1213
"sort"
1314
"testing"
@@ -24,7 +25,7 @@ func TestStripDarwinSig(t *testing.T) {
2425
}
2526

2627
var log Log
27-
stripped := StripDarwinSig(&log, exe, data)
28+
stripped := StripDarwinSig(&log, "/bin/"+filepath.Base(exe), data)
2829
for _, m := range log.Messages {
2930
t.Log(m.Text)
3031
}

0 commit comments

Comments
 (0)