diff options
| author | Alex Brainman <alex.brainman@gmail.com> | 2017-02-04 17:33:14 +1100 |
|---|---|---|
| committer | Alex Brainman <alex.brainman@gmail.com> | 2017-02-04 06:53:29 +0000 |
| commit | 769be04feb724e03c1f2b757fc19326a1486896c (patch) | |
| tree | 69b7c2197072be37d19f33019dfbebdb92cbdf38 /src/cmd/nm/nm_cgo_test.go | |
| parent | c7a7c5a9b425259e17976b978b60651b636b8979 (diff) | |
| download | go-769be04feb724e03c1f2b757fc19326a1486896c.tar.xz | |
cmd/nm: skip TestInternalLinkerCgoFile if no internal linking is supported
Fixes build.
Change-Id: I2fee624c8a4b228bb9f2889e241ea016a317bb11
Reviewed-on: https://go-review.googlesource.com/36373
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Diffstat (limited to 'src/cmd/nm/nm_cgo_test.go')
| -rw-r--r-- | src/cmd/nm/nm_cgo_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/cmd/nm/nm_cgo_test.go b/src/cmd/nm/nm_cgo_test.go index 633f9c0406..de16f77ecc 100644 --- a/src/cmd/nm/nm_cgo_test.go +++ b/src/cmd/nm/nm_cgo_test.go @@ -7,13 +7,30 @@ package main import ( + "runtime" "testing" ) func TestInternalLinkerCgoFile(t *testing.T) { + if !canInternalLink() { + t.Skip("skipping; internal linking is not supported") + } testGoFile(t, true, false) } +func canInternalLink() bool { + switch runtime.GOOS { + case "dragonfly": + return false + case "linux": + switch runtime.GOARCH { + case "arm64", "mips64", "mips64le", "mips", "mipsle": + return false + } + } + return true +} + func TestExternalLinkerCgoFile(t *testing.T) { testGoFile(t, true, true) } |
