]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/link: skip c-archive tests if c-archive mode is not supported
authorIan Lance Taylor <iant@golang.org>
Sun, 29 Jan 2023 03:56:41 +0000 (19:56 -0800)
committerGopher Robot <gobot@golang.org>
Tue, 31 Jan 2023 16:53:11 +0000 (16:53 +0000)
Change-Id: If0e034d9ebf2baeb89cb52b22aedbe923cc703ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/463983
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/link/dwarf_test.go

index 53dc686a4b512a4478d1b9c9e1c52b4565f6e1f7..2ff35e489710fbdf9c872460caa52a01f3b33ddb 100644 (file)
@@ -10,6 +10,7 @@ import (
        "cmd/internal/objfile"
        "cmd/internal/quoted"
        "debug/dwarf"
+       "internal/platform"
        "internal/testenv"
        "os"
        "os/exec"
@@ -192,6 +193,9 @@ func TestDWARF(t *testing.T) {
                if runtime.GOOS == "windows" {
                        t.Skip("skipping Windows/c-archive; see Issue 35512 for more.")
                }
+               if !platform.BuildModeSupported(runtime.Compiler, "c-archive", runtime.GOOS, runtime.GOARCH) {
+                       t.Skipf("skipping c-archive test on unsupported platform %s-%s", runtime.GOOS, runtime.GOARCH)
+               }
                t.Run("c-archive", func(t *testing.T) {
                        testDWARF(t, "c-archive", true)
                })