1
0
mirror of https://github.com/golang/go synced 2024-09-29 19:34:38 -06:00

cmd/link: skip c-archive tests if c-archive mode is not supported

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>
This commit is contained in:
Ian Lance Taylor 2023-01-28 19:56:41 -08:00 committed by Gopher Robot
parent 47e205c344
commit 5c6d732200

View 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)
})