Commit 769be04f authored by Alex Brainman's avatar Alex Brainman

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: default avatarAlex Brainman <alex.brainman@gmail.com>
parent c7a7c5a9
...@@ -7,13 +7,30 @@ ...@@ -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)
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment