devbox/scripts/mcp-smoke.sh

18 lines
550 B
Bash
Executable file

#!/usr/bin/env bash
# Run the real SDK stdio integration checks against a native packaged binary.
# Requires the repository's Go toolchain; never uses the caller's devbox config.
set -euo pipefail
if [[ $# -ne 1 ]]; then
echo "usage: $0 /absolute/path/to/devbox" >&2
exit 2
fi
case "$1" in
/*) ;;
*) echo "binary path must be absolute" >&2; exit 2 ;;
esac
if [[ ! -x "$1" ]]; then
echo "binary is not executable: $1" >&2
exit 2
fi
cd "$(dirname "$0")/.."
DEVBOX_MCP_TEST_BINARY="$1" go test ./cmd/devbox -run '^TestMCPStdio$' -count=1 -v