]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go/testdata/script: fix test failing on nocgo builders
authorManlio Perillo <manlio.perillo@gmail.com>
Wed, 12 May 2021 13:16:20 +0000 (15:16 +0200)
committerBryan C. Mills <bcmills@google.com>
Wed, 12 May 2021 14:43:27 +0000 (14:43 +0000)
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 <bcmills@google.com>
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>

src/cmd/go/testdata/script/list_find_nodeps.txt

index 55f98f6c6c37ad2f41cb90358c658820af805456..e08ce7895093c890355418fa6afa3b7c188ebbe0 100644 (file)
@@ -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