1
0
mirror of https://github.com/golang/go synced 2024-10-01 09:28:37 -06:00

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>
This commit is contained in:
Alex Brainman 2017-02-04 17:33:14 +11:00
parent c7a7c5a9b4
commit 769be04feb

View File

@ -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)
}