go/packages: enable TestIssue37098 for Go 1.17 and later

For golang/go#37098

Change-Id: I6edf1b4efca38fe9837ed944bc45c05c37099b4a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/313591
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
This commit is contained in:
Ian Lance Taylor 2021-04-26 12:55:09 -07:00
parent 16b25d25b9
commit 800adbe2e8
1 changed files with 10 additions and 1 deletions

View File

@ -2355,7 +2355,16 @@ func testIssue37098(t *testing.T, exporter packagestest.Exporter) {
// (*Package).CompiledGoFiles. This tests #37098, where using SWIG to
// causes C++ sources to be inadvertently included in
// (*Package).CompiledGoFiles.
t.Skip("Issue #37098: SWIG causes generated C++ sources in CompiledGoFiles")
// This is fixed in Go 1.17, but not earlier.
testenv.NeedsGo1Point(t, 17)
if _, err := exec.LookPath("swig"); err != nil {
t.Skip("skipping test: swig not available")
}
if _, err := exec.LookPath("g++"); err != nil {
t.Skip("skipping test: g++ not available")
}
// Create a fake package with an empty Go source, and a SWIG interface
// file.