| 47 |
rodolico |
1 |
#!/bin/bash
|
|
|
2 |
# Quick test runner - runs the safest tests first
|
|
|
3 |
|
|
|
4 |
echo "Running havirt test suite..."
|
|
|
5 |
echo ""
|
|
|
6 |
|
|
|
7 |
# Run safe tests first
|
|
|
8 |
if [ -f ./test_havirt_safe.sh ]; then
|
|
|
9 |
echo "==> Running safe tests (read-only)..."
|
|
|
10 |
./test_havirt_safe.sh
|
|
|
11 |
SAFE_RESULT=$?
|
|
|
12 |
else
|
|
|
13 |
echo "ERROR: test_havirt_safe.sh not found"
|
|
|
14 |
exit 1
|
|
|
15 |
fi
|
|
|
16 |
|
|
|
17 |
echo ""
|
|
|
18 |
echo "==> Safe test results: $([ $SAFE_RESULT -eq 0 ] && echo 'PASSED' || echo 'FAILED')"
|
|
|
19 |
echo ""
|
|
|
20 |
|
|
|
21 |
# Ask before running integration tests
|
|
|
22 |
read -p "Run integration tests (requires Perl modules)? [y/N] " -n 1 -r
|
|
|
23 |
echo
|
|
|
24 |
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
|
25 |
if [ -f ./test_integration.pl ]; then
|
|
|
26 |
echo "==> Running integration tests..."
|
|
|
27 |
./test_integration.pl
|
|
|
28 |
INTEGRATION_RESULT=$?
|
|
|
29 |
echo ""
|
|
|
30 |
echo "==> Integration test results: $([ $INTEGRATION_RESULT -eq 0 ] && echo 'PASSED' || echo 'FAILED')"
|
|
|
31 |
else
|
|
|
32 |
echo "ERROR: test_integration.pl not found"
|
|
|
33 |
fi
|
|
|
34 |
fi
|
|
|
35 |
|
|
|
36 |
echo ""
|
|
|
37 |
echo "==> Test run complete"
|
|
|
38 |
echo ""
|
|
|
39 |
echo "Note: For full tests including SSH operations, run: ./test_havirt.sh"
|
|
|
40 |
echo " (Only recommended with a configured cluster)"
|