mirror of
https://github.com/golang/go
synced 2024-11-19 02:04:42 -07: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:
parent
c7a7c5a9b4
commit
769be04feb
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user