Blame | Last modification | View Log | Download | RSS feed
#!/bin/bash
# Quick test runner - runs the safest tests first
echo "Running havirt test suite..."
echo ""
# Run safe tests first
if [ -f ./test_havirt_safe.sh ]; then
echo "==> Running safe tests (read-only)..."
./test_havirt_safe.sh
SAFE_RESULT=$?
else
echo "ERROR: test_havirt_safe.sh not found"
exit 1
fi
echo ""
echo "==> Safe test results: $([ $SAFE_RESULT -eq 0 ] && echo 'PASSED' || echo 'FAILED')"
echo ""
# Ask before running integration tests
read -p "Run integration tests (requires Perl modules)? [y/N] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
if [ -f ./test_integration.pl ]; then
echo "==> Running integration tests..."
./test_integration.pl
INTEGRATION_RESULT=$?
echo ""
echo "==> Integration test results: $([ $INTEGRATION_RESULT -eq 0 ] && echo 'PASSED' || echo 'FAILED')"
else
echo "ERROR: test_integration.pl not found"
fi
fi
echo ""
echo "==> Test run complete"
echo ""
echo "Note: For full tests including SSH operations, run: ./test_havirt.sh"
echo " (Only recommended with a configured cluster)"