#!/usr/bin/env bash # SPDX-License-Identifier: MIT # Rung 4: save states mid-stream. Rungs 2's and 3's scripts again, this crate's chip saved and # restored (serde_json, then bincode; each restored copy must equal the chip it came from) at # every save, state and take line, the restored copy running on: the traces must still be # ay8910-python's, byte for byte. Writes the reference traces first if they are not there. set -euo pipefail ROOT=$(cd "$(dirname "$0")/.." && pwd) status=0 REUSE=1 ROUNDTRIP=1 OURS="$ROOT/external/lockstep/roundtrip" "$ROOT/scripts/rung2.sh" | tail -2 || status=1 REUSE=1 ROUNDTRIP=1 OURS="$ROOT/external/streams/roundtrip" "$ROOT/scripts/rung3.sh" | tail -2 || status=1 [ $status = 0 ] && echo "rung 4: PASS" || { echo "rung 4: FAIL"; exit 1; }