Files
Gitea-Tools/run-tests.sh
T
sysadminandClaude Opus 4.8 b15494deb9 feat: add root-level run-tests.sh full-validation runner (Closes #473)
Adds a canonical, discoverable full-validation entry point so sessions stop
guessing between pytest invocations.

- run-tests.sh: executable root runner; runs `venv/bin/python -m pytest "$@"`;
  forwards args; fails closed with a clear setup message when the venv Python
  is missing (no silent wrong-interpreter fallback); set -euo pipefail; no
  network, no Gitea, no lock files.
- docs/developer-testing-guidelines.md: name ./run-tests.sh as the canonical
  full/focused validation command.
- tests/test_run_tests_script.py: contract checks (exists, executable, strict
  bash flags, venv pytest + arg forwarding, fail-closed guard, repo-local, and
  the guide naming the runner).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-07 17:44:22 -04:00

14 lines
335 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PYTHON="$ROOT_DIR/venv/bin/python"
if [[ ! -x "$PYTHON" ]]; then
echo "ERROR: expected virtualenv Python at $PYTHON" >&2
echo "Create the venv first, then run: venv/bin/python -m pytest" >&2
exit 1
fi
exec "$PYTHON" -m pytest "$@"