]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/vendor/golang.org/x/arch/ppc64/ppc64asm: skip TestObjdumpPowerManual if not ppc64x
authorLynn Boger <laboger@linux.vnet.ibm.com>
Tue, 1 Nov 2016 15:43:34 +0000 (10:43 -0500)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 1 Nov 2016 17:00:46 +0000 (17:00 +0000)
Skip TestObjdumpPowerManual if the host system is not ppc64 or ppc64le.
This test depends on using the host objdump and comparing output, which
does not work as expected if the test is run on another host.

Orignates from golang.org/x/arch/ppc64/ppc64asm commit 8e2d4898.

Fixes #17698

Change-Id: I956b0fb78c5ec33641db752d46a755008403d269
Reviewed-on: https://go-review.googlesource.com/32531
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/vendor/golang.org/x/arch/ppc64/ppc64asm/objdumpext_test.go

index 55cff31b45e86902edfc2a437d96f58820b9aeba..74835431050e8481206bba209d828716542088b4 100644 (file)
@@ -14,6 +14,7 @@ import (
        "io"
        "log"
        "os"
+       "runtime"
        "strconv"
        "strings"
        "testing"
@@ -25,6 +26,9 @@ func testObjdump(t *testing.T, generate func(func([]byte))) {
        if testing.Short() {
                t.Skip("skipping objdump test in short mode")
        }
+       if runtime.GOARCH != "ppc64le" && runtime.GOARCH != "ppc64" {
+               t.Skip("skipping; test requires host tool objdump for ppc64 or ppc64le")
+       }
        if _, err := os.Stat(objdumpPath); err != nil {
                t.Skip(err)
        }