From 485474d204297ce9ff2b7f6c2a2b0e048c61fb8e Mon Sep 17 00:00:00 2001 From: Manlio Perillo Date: Wed, 12 May 2021 15:16:20 +0200 Subject: [PATCH] cmd/go/testdata/script: fix test failing on nocgo builders The regression test introduced in https://golang.org/cl/318770 broke the the nocgo builders. Update the cgo package used in the test to ensure that it can be build both with cgo enabled and disabled. Change-Id: Iab0486f0b85ac5e5a22fdf8a1998edd50cbb4d96 Reviewed-on: https://go-review.googlesource.com/c/go/+/319210 Trust: Bryan C. Mills Trust: Jay Conrod Reviewed-by: Bryan C. Mills Reviewed-by: Jay Conrod Run-TryBot: Bryan C. Mills TryBot-Result: Go Bot --- src/cmd/go/testdata/script/list_find_nodeps.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/cmd/go/testdata/script/list_find_nodeps.txt b/src/cmd/go/testdata/script/list_find_nodeps.txt index 55f98f6c6c..e08ce78950 100644 --- a/src/cmd/go/testdata/script/list_find_nodeps.txt +++ b/src/cmd/go/testdata/script/list_find_nodeps.txt @@ -33,6 +33,16 @@ func F() { println(C.INT_MAX) } +-- cgo/pkg_notcgo.go -- +//go:build !cgo +// +build !cgo + +package cgopkg + +func F() { + println(0) +} + -- swig/pkg.go -- package swigpkg -- 2.50.0