#!/usr/bin/env bash # SPDX-License-Identifier: MIT # The gate: every rung of this transcription, in order (docs/status.md has the counts). # # scripts/ladder.sh # rungs 1-4, then the speed report # scripts/ladder.sh --faults # and rung 5, the seeded faults (slow) # # Needs: the reference (scripts/fetch_ay8910python.sh: ay8910-python at the pin, in a PyPy # venv under external/). Rung 3 also runs ay8910-python's board streams when a checkout # beside this repository has them (AY8910_BOARD_STREAMS names another place). Everything # runs under nice; PYPY_GC_NURSERY=1M for the reference. set -euo pipefail ROOT=$(cd "$(dirname "$0")/.." && pwd) step() { printf '\n== %s\n' "$*"; } step "1. format, lint, the reference's tests transcribed, save states" "$ROOT/scripts/rung1.sh" | tail -1 step "2. bus-stream lockstep, every part" "$ROOT/scripts/rung2.sh" | tail -2 step "3. the reference's validation streams" "$ROOT/scripts/rung3.sh" | tail -3 step "4. save states mid-stream, against the same traces" "$ROOT/scripts/rung4.sh" | tail -1 if [ "${1:-}" = "--faults" ]; then step "5. seeded faults (each must be caught)" "$ROOT/scripts/rung5.sh" | tail -10 fi step "speed (reported, not a gate)" "$ROOT/scripts/speed.sh" 10 3 step "ladder passed"