$ErrorActionPreference = 'Continue' Set-Location D:\dev\alewman-probe $run = 'D:\dev\pin2\target-megadrive-rust-fast\release\md-run.exe' python build.py 2>&1 | Select-Object -Last 1 python build.py --hang 2>&1 | Select-Object -Last 1 foreach ($f in 'a.sav', 'h.sav') { if (Test-Path "out\$f") { [IO.File]::Delete("D:\dev\alewman-probe\out\$f") } } '== normal: three boots on one save' 1..3 | ForEach-Object { & $run out\alewman-probe.bin --machine genesis --frames 700 --save out\a.sav 2>&1 | Out-Null } python tools\decode.py out\a.sav --run 2 2>&1 | Select-Object -First 5 python tools\decode.py out\a.sav 2>&1 | Select-Object -First 2 '== hang: stopped mid-test, then booted again' & $run out\alewman-probe-hang.bin --machine genesis --frames 200 --save out\h.sav 2>&1 | Out-Null python tools\decode.py out\h.sav 2>&1 | Select-Object -First 7 '-- second boot' & $run out\alewman-probe-hang.bin --machine genesis --frames 700 --png out\hang.png --save out\h.sav 2>&1 | Out-Null python tools\decode.py out\h.sav 2>&1 | Select-Object -First 8