#!/usr/bin/env bash # Full test suite. Exits non-zero if anything fails. # # bash tests/run_all.sh # everything except the real-model test # bash tests/run_all.sh --slow # including the 100-step Chronos smoke test set -euo pipefail cd "$(dirname "$0")/.." PY="${PYTHON:-python}" [ -x "../.venv/bin/python" ] && PY="../.venv/bin/python" MARK=(-m "not slow") if [ "${1:-}" = "--slow" ]; then MARK=(); fi echo "== Backtest Lab test suite ==" # The ${arr[@]+"${arr[@]}"} form keeps an empty array safe under `set -u` # on the bash 3.2 that ships with macOS. "$PY" -m pytest tests/ -q ${MARK[@]+"${MARK[@]}"} -W "error::FutureWarning" echo echo "== Known-answer tests (Phase 1 gate) ==" "$PY" -m pytest tests/test_engine.py -q -k "ka1 or ka2 or ka3 or ka4 or ka5 or ka6" echo echo "All green."