Skip to content

Commit 1602103

Browse files
committed
internal/refactor/inline: skip cgo tests on non-cgo builders
Change-Id: I23beaea36053df131b4f6b13c32cba4fe1d89bc6 Reviewed-on: https://go-review.googlesource.com/c/tools/+/530978 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Robert Findley <rfindley@google.com>
1 parent 1c8e684 commit 1602103

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal/refactor/inline/inline_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ func TestData(t *testing.T) {
4545
t.Run(filepath.Base(file), func(t *testing.T) {
4646
t.Parallel()
4747

48+
// The few tests that use cgo should be in
49+
// files whose name includes "cgo".
50+
if strings.Contains(t.Name(), "cgo") {
51+
testenv.NeedsTool(t, "cgo")
52+
}
53+
4854
// Extract archive to temporary tree.
4955
ar, err := txtar.ParseFile(file)
5056
if err != nil {

0 commit comments

Comments
 (0)