mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
64b37339e0
Co-authored-by: Douwe Osinga <douwe@squareup.com>
62 lines
1.6 KiB
Bash
Executable File
62 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
if [ -f .env ]; then
|
|
export $(grep -v '^#' .env | xargs)
|
|
fi
|
|
|
|
echo "Building goose..."
|
|
cargo build --release --bin goose
|
|
echo ""
|
|
|
|
SCRIPT_DIR=$(pwd)
|
|
|
|
PROVIDERS=(
|
|
"openrouter:anthropic/claude-sonnet-4.5:google/gemini-flash-2.5:qwen/qwen3-coder"
|
|
"openai:gpt-4o:gpt-4o-mini:gpt-3.5-turbo"
|
|
"anthropic:claude-sonnet-4-0:claude-3-7-sonnet-latest"
|
|
"google:gemini-2.5-pro:gemini-2.5-pro:gemini-2.5-flash"
|
|
"databricks:databricks-claude-sonnet-4:gemini-2-5-flash:gpt-4o"
|
|
)
|
|
|
|
RESULTS=()
|
|
|
|
for provider_config in "${PROVIDERS[@]}"; do
|
|
IFS=':' read -ra PARTS <<< "$provider_config"
|
|
PROVIDER="${PARTS[0]}"
|
|
for i in $(seq 1 $((${#PARTS[@]} - 1))); do
|
|
MODEL="${PARTS[$i]}"
|
|
export GOOSE_PROVIDER="$PROVIDER"
|
|
export GOOSE_MODEL="$MODEL"
|
|
TESTDIR=$(mktemp -d)
|
|
echo "hello" > "$TESTDIR/hello.txt"
|
|
echo "Provider: ${PROVIDER}"
|
|
echo "Model: ${MODEL}"
|
|
echo ""
|
|
TMPFILE=$(mktemp)
|
|
(cd "$TESTDIR" && "$SCRIPT_DIR/target/release/goose" run --text "please list files in the current directory" --with-builtin developer 2>&1) | tee "$TMPFILE"
|
|
echo ""
|
|
if grep -q "shell | developer" "$TMPFILE"; then
|
|
echo "✓ SUCCESS: Test passed - developer tool called"
|
|
RESULTS+=("✓ ${PROVIDER}/${MODEL}")
|
|
else
|
|
echo "✗ FAILED: Test failed - no developer tools called"
|
|
RESULTS+=("✗ ${PROVIDER}/${MODEL}")
|
|
fi
|
|
rm "$TMPFILE"
|
|
rm -rf "$TESTDIR"
|
|
echo "---"
|
|
done
|
|
done
|
|
echo ""
|
|
echo "=== Test Summary ==="
|
|
for result in "${RESULTS[@]}"; do
|
|
echo "$result"
|
|
done
|
|
if echo "${RESULTS[@]}" | grep -q "✗"; then
|
|
echo ""
|
|
echo "Some tests failed!"
|
|
exit 1
|
|
else
|
|
echo ""
|
|
echo "All tests passed!"
|
|
fi
|