Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions scripts/client-conformance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,31 @@ done
# Set up the work directory.
if [ -n "$RESULT_DIR" ]; then
mkdir -p "$RESULT_DIR"
# Make the path absolute: the tests run from inside it (see below).
RESULT_DIR=$(cd "$RESULT_DIR" && pwd)
WORKDIR="$RESULT_DIR"
else
WORKDIR=$(mktemp -d)
fi

# Build the conformance server.
go build -o "$WORKDIR/conformance-client" ./conformance/everything-client
# Build the conformance client. GOEXE is ".exe" on Windows, where the
# conformance runner can only launch the client with that extension.
CLIENT="$WORKDIR/conformance-client$(go env GOEXE)"
go build -o "$CLIENT" ./conformance/everything-client

# Run conformance tests from the work directory to avoid writing results to the repo.
echo "Running conformance tests..."
if [ -n "$CONFORMANCE_REPO" ]; then
# Run from local checkout using npm run start.
(cd "$WORKDIR" && \
npm --prefix "$CONFORMANCE_REPO" run start -- \
client --command "$WORKDIR/conformance-client" \
client --command "$CLIENT" \
--suite "$SUITE" \
${RESULT_DIR:+--output-dir "$RESULT_DIR"}) || FINAL_EXIT_CODE=$?
else
(cd "$WORKDIR" && \
npx @modelcontextprotocol/conformance@latest \
client --command "$WORKDIR/conformance-client" \
client --command "$CLIENT" \
--suite "$SUITE" \
${RESULT_DIR:+--output-dir "$RESULT_DIR"}) || FINAL_EXIT_CODE=$?
fi
Expand Down
Loading