#!/usr/bin/env bash # SPDX-License-Identifier: MIT # Rung 2: SingleStepTests 65x02, the three CMOS sets each on its row, judged as # the reference's rung 1 judges them (tests/single_step.py): 0 fail, and every # per-set count (full passes, each named contradiction) equal to the # reference's at e49aceb, unchanged since 9ca4a2f (conformance/expected/sst.txt, from its # docs/validation.md). LIMIT=N runs the first N cases of each file and checks # only that none fails. The corpus is read in place ($SST_65X02). set -euo pipefail source "$(dirname "$0")/env.sh" nice -n 19 cargo build --release -q --manifest-path "$ROOT/Cargo.toml" mkdir -p "$ROOT/external" out="$ROOT/external/rung2-sst.txt" status=0 nice -n 19 "$ROOT/target/release/sst" "$SST_65X02" ${LIMIT:+--limit "$LIMIT"} --jobs "${JOBS:-4}" | tee "$out" || status=$? if [ "$status" != 0 ]; then echo "rung 2: FAILED (a case failed outside the named classes)" exit 1 fi if [ -z "${LIMIT:-}" ]; then if diff <(grep ' on ' "$out" | grep 'cases,') "$ROOT/conformance/expected/sst.txt"; then echo "rung 2: passed, every count equal to the reference's" else echo "rung 2: FAILED (the counts differ from the reference's, above)" exit 1 fi else echo "rung 2: passed on the first $LIMIT cases of each file (counts not compared)" fi