]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/nm: skip TestInternalLinkerCgoFile if no internal linking is supported
authorAlex Brainman <alex.brainman@gmail.com>
Sat, 4 Feb 2017 06:33:14 +0000 (17:33 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Sat, 4 Feb 2017 06:53:29 +0000 (06:53 +0000)
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>
src/cmd/nm/nm_cgo_test.go

index 633f9c0406945eff77789ddf07312311019da0d2..de16f77ecc09213a13db04013f1ea9526003cafd 100644 (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)
 }