#!/usr/bin/env bash # SPDX-License-Identifier: MIT # Rung 1: every test in sn76489-python's tests/ that exercises the core, transcribed # (tests/contract.rs, capture.rs, manuals.rs, community.rs, provisional.rs). set -euo pipefail ROOT=$(cd "$(dirname "$0")/.." && pwd) cd "$ROOT" total=0 for t in contract capture manuals community provisional; do out=$(nice cargo test --release -q --test "$t" 2>&1) || { echo "$out"; echo "rung 1: FAIL ($t)"; exit 1; } n=$(echo "$out" | grep -oE '[0-9]+ passed' | grep -oE '[0-9]+') echo "tests/$t.rs: $n passed" total=$((total + n)) done echo "rung 1: PASS ($total transcribed tests)"