net-kingdom/tools/contract-tests/run.sh

24 lines
999 B
Bash
Raw Normal View History

#!/usr/bin/env bash
# Bounded-execution contract suite (NK-WP-0058-T02). One list, used by `make contract-test` and by CI.
# The owners must sit next to net-kingdom (locally the sibling checkouts; in CI tools/contract-tests/fetch_owners.py).
# A skipped test fails the run: a contract that was not checked must not look green.
set -euo pipefail
cd "$(dirname "$0")/../.."
out=$(mktemp)
trap 'rm -f "$out"' EXIT
PYTHONDONTWRITEBYTECODE=1 python3 -m pytest -q -rs -p no:cacheprovider \
tests/test_executor_lanes.py \
tests/test_write_role_audit.py \
bounded-executor/tests/test_approval_request.py \
tools/bounded-execution-readiness/tests \
tools/bounded-execution-run/tests \
tools/execution-attribution-receipt/tests \
sso-mfa/k8s/bounded-executor \
tools/contract-tests/tests \
tools/conventions/tests \
"$@" | tee "$out"
if grep -q '^SKIPPED' "$out"; then
echo "contract-test: skipped tests above; every contract must run (are the owner checkouts present?)" >&2
exit 1
fi