gopls: skip failing tests on wasm/wasip1 Add skips as appropriate to TestFreeRefs and TestDriverConformance. Also add a skip for a preexisting failure on wasip1: golang/go#64725. Fixes golang/go#68163 Updates golang/go#64725 Change-Id: I2827160bad6627755f213e4b8b54d53333d2d98d Reviewed-on: https://go-review.googlesource.com/c/tools/+/594895 Auto-Submit: Robert Findley <rfindley@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
diff --git a/go/loader/loader_test.go b/go/loader/loader_test.go index 1e0b16e..4729ba3 100644 --- a/go/loader/loader_test.go +++ b/go/loader/loader_test.go
@@ -118,6 +118,10 @@ } func TestLoad_MissingInitialPackage(t *testing.T) { + if runtime.GOOS == "wasip1" { + t.Skip("Skipping due to golang/go#64725: fails with EBADF errors") + } + var conf loader.Config conf.Import("nosuchpkg") conf.Import("errors")
diff --git a/gopls/internal/golang/freesymbols_test.go b/gopls/internal/golang/freesymbols_test.go index dd6d947..9ad8ca3 100644 --- a/gopls/internal/golang/freesymbols_test.go +++ b/gopls/internal/golang/freesymbols_test.go
@@ -21,8 +21,8 @@ // TestFreeRefs is a unit test of the free-references algorithm. func TestFreeRefs(t *testing.T) { - if runtime.GOOS == "js" { - t.Skip("some test imports are unsupported on js") + if runtime.GOOS == "js" || runtime.GOARCH == "wasm" { + t.Skip("some test imports are unsupported on js or wasm") } for i, test := range []struct {
diff --git a/internal/drivertest/driver_test.go b/internal/drivertest/driver_test.go index a9865d7..be5cd78 100644 --- a/internal/drivertest/driver_test.go +++ b/internal/drivertest/driver_test.go
@@ -17,6 +17,7 @@ "golang.org/x/tools/internal/diff/myers" "golang.org/x/tools/internal/drivertest" "golang.org/x/tools/internal/packagesinternal" + "golang.org/x/tools/internal/testenv" "golang.org/x/tools/internal/testfiles" "golang.org/x/tools/txtar" ) @@ -28,6 +29,8 @@ } func TestDriverConformance(t *testing.T) { + testenv.NeedsExec(t) + const workspace = ` -- go.mod -- module example.com/m