-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests.sh
More file actions
executable file
·78 lines (67 loc) · 2.15 KB
/
run_tests.sh
File metadata and controls
executable file
·78 lines (67 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
# Script to run StackWise tests
echo "🧪 Running StackWise Tests"
echo "========================="
# Navigate to project directory
cd "$(dirname "$0")"
# Activate virtual environment
echo "📦 Activating virtual environment..."
if [ -f ".venv/bin/activate" ]; then
source .venv/bin/activate
elif [ -f "venv/bin/activate" ]; then
source venv/bin/activate
else
echo "⚠️ No virtual environment found. Using system Python."
echo "💡 Run './setup.sh' to create and configure your environment."
fi
# Check if pytest is available
echo "🔍 Checking pytest availability..."
python -c "import pytest; print(f'✅ pytest version: {pytest.__version__}')" 2>/dev/null || {
echo "❌ pytest not found in virtual environment"
echo "💡 Installing pytest..."
pip install pytest --no-cache-dir
}
echo ""
echo "🚀 Running all tests..."
echo "======================"
# Run all tests with verbose output
echo "🔍 Running unit tests..."
python -m pytest tests/unit/ -v
echo ""
echo "🔍 Running integration tests..."
python -m pytest tests/integration/ -v
echo ""
echo "🔍 Running attention tests..."
python -m pytest src/model/attention/test/ -v
echo ""
echo "🔍 Running example tests..."
python -m pytest tests/examples/ -v
echo ""
echo "🔍 Running checkpointing tests..."
python examples/simple_checkpointing_test.py
echo ""
echo "📊 Test Summary"
echo "==============="
echo "✅ All tests completed!"
echo ""
echo "💡 Additional test commands:"
echo " # Run specific test file:"
echo " python -m pytest tests/unit/test_config_validation.py -v"
echo ""
echo " # Run tests with coverage:"
echo " python -m pytest tests/ --cov=src --cov-report=html"
echo ""
echo " # Run tests in parallel:"
echo " python -m pytest tests/ -n auto"
echo ""
echo " # Run only failed tests:"
echo " python -m pytest tests/ --lf"
echo ""
echo " # Run tests with detailed output:"
echo " python -m pytest tests/ -v -s"
echo ""
echo " # Run checkpointing tests only:"
echo " python examples/simple_checkpointing_test.py"
echo ""
echo " # Run progressive training example:"
echo " python examples/progressive_training_system_example.py"