mirror of
https://github.com/golang/go
synced 2024-11-19 04:14:45 -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
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"runtime"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestInternalLinkerCgoFile(t *testing.T) {
|
func TestInternalLinkerCgoFile(t *testing.T) {
|
||||||
|
if !canInternalLink() {
|
||||||
|
t.Skip("skipping; internal linking is not supported")
|
||||||
|
}
|
||||||
testGoFile(t, true, false)
|
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) {
|
func TestExternalLinkerCgoFile(t *testing.T) {
|
||||||
testGoFile(t, true, true)
|
testGoFile(t, true, true)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user