...
1# go list should not report SWIG-generated C++ files in CompiledGoFiles.
2
3[!exec:swig] skip
4[!exec:g++] skip
5[!cgo] skip
6
7# CompiledGoFiles should contain 4 files:
8# a.go
9# _cgo_import.go [gc only]
10# _cgo_gotypes.go
11# a.cgo1.go
12#
13# These names we see here, other than a.go, will be from the build cache,
14# so we just count them.
15
16go list -f '{{.CompiledGoFiles}}' -compiled=true example/swig
17
18stdout a\.go
19[compiler:gc] stdout -count=3 $GOCACHE
20[compiler:gccgo] stdout -count=2 $GOCACHE
21
22-- go.mod --
23module example
24
25go 1.16
26
27-- swig/a.go --
28package swig
29
30-- swig/a.swigcxx --
View as plain text