#!/usr/bin/env bash # SPDX-License-Identifier: MIT # Rung 0: the decode tables equal the reference's (scripts/gen_tables.py --check), and # cargo test: the reference's bus-schedule test transcribed (tests/bus_schedule.rs: every # class's cycles against the TRM tables of its docs/timing.md), the condition table, the # harness's branch-to-self and BIOS stop, zlib's CRC. set -euo pipefail source "$(dirname "$0")/env.sh" require_reference python3 "$ROOT/scripts/gen_tables.py" --check nice -n 19 cargo test --release -q --manifest-path "$ROOT/Cargo.toml" 2>&1 | grep -E "^test result" | awk '{n += $4; f += $6} END {print "cargo test: " n " passed, " f " failed"; exit f != 0}'