#!/bin/bash # Run tests for mcp-arduino-server echo "๐Ÿงช Running mcp-arduino-server tests..." echo "==================================" # Set PYTHONPATH to include src directory export PYTHONPATH="${PYTHONPATH:+$PYTHONPATH:}src" # Run tests with coverage if available if command -v coverage &> /dev/null; then echo "๐Ÿ“Š Running with coverage..." coverage run -m pytest tests/ -v echo "" echo "๐Ÿ“ˆ Coverage Report:" coverage report -m --include="src/*" coverage html echo "๐Ÿ“ HTML coverage report generated in htmlcov/" else echo "๐Ÿš€ Running tests..." python -m pytest tests/ -v fi # Run specific test suites if argument provided if [ "$1" != "" ]; then echo "" echo "๐ŸŽฏ Running specific test: $1" python -m pytest "tests/$1" -v fi echo "" echo "โœ… Test run complete!"