Datasets:
File size: 640 Bytes
28adce7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #!/usr/bin/env python3
"""Run the pure T2 unit tests (no Docker, no model, no real benchmark task) with a time cap.
Opt-in container tests in tests/test_e2e_container.py run only when PVBENCH_IMAGE is set.
"""
import subprocess
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
try:
result = subprocess.run([sys.executable, "-B", "-m", "unittest",
*(sys.argv[1:] or ["discover", "-s", "tests", "-v"])], cwd=ROOT, timeout=600)
except subprocess.TimeoutExpired:
print("unit tests exceeded 600 s", file=sys.stderr)
raise SystemExit(1)
raise SystemExit(result.returncode)
|