internal/mcp: add missing testenv.NeedsExec

Unbreak our WASM tests by correctly marking a test as testenv.NeedsExec.

Change-Id: Ib976657e9b09acc6fc563f6fc26d6066fd64acf5
Reviewed-on: https://go-review.googlesource.com/c/tools/+/678035
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Rob Findley 2025-06-02 15:42:28 +00:00 • committed by Gopher Robot
commit e219f323cb

View file

@ -13,6 +13,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/modelcontextprotocol/go-sdk/mcp"
"golang.org/x/tools/internal/testenv"
)
const runAsServer = "_MCP_RUN_AS_SERVER"
@ -38,6 +39,8 @@ func runServer() {
}
func TestCmdTransport(t *testing.T) {
testenv.NeedsExec(t)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()