-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tests.sh
More file actions
executable file
·56 lines (50 loc) · 1.51 KB
/
Copy pathrun_tests.sh
File metadata and controls
executable file
·56 lines (50 loc) · 1.51 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
#!/bin/bash
# AutoVoice test runner
# Usage: ./run_tests.sh [mode]
# Modes: smoke, fast, all, coverage, coverage_remaining, cuda
set -e
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
cd "$SCRIPT_DIR"
# Activate conda env if available
if command -v conda &>/dev/null; then
eval "$(conda shell.bash hook)"
conda activate autovoice-thor 2>/dev/null || true
fi
export PYTHONPATH="$SCRIPT_DIR/src:$PYTHONPATH"
export PYTHONNOUSERSITE=1
export PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
MODE="${1:-fast}"
case "$MODE" in
smoke)
echo "Running smoke tests..."
python -m pytest tests/ -m smoke -v --tb=short
;;
fast)
echo "Running fast tests (excluding slow)..."
python -m pytest tests/ -m "not slow and not very_slow" -v --tb=short
;;
all)
echo "Running all tests..."
python -m pytest tests/ -v --tb=short
;;
coverage)
echo "Running tests with coverage..."
python -m coverage erase
python -m coverage run -m pytest -p no:cov tests/ -v
python -m coverage report -m
python -m coverage html
echo "Coverage report: htmlcov/index.html"
;;
coverage_remaining)
echo "Running remaining-module coverage gate..."
python scripts/run_remaining_module_coverage.py
;;
cuda)
echo "Running CUDA tests..."
python -m pytest tests/ -m cuda -v --tb=short
;;
*)
echo "Usage: $0 {smoke|fast|all|coverage|coverage_remaining|cuda}"
exit 1
;;
esac