diff --git a/tools/podium-repro/loop.ps1 b/tools/podium-repro/loop.ps1 index bf2ff87..d7e1457 100644 --- a/tools/podium-repro/loop.ps1 +++ b/tools/podium-repro/loop.ps1 @@ -28,6 +28,7 @@ param( # play. cdbrun.txt's PEB trick is dead on Windows 26200 (see README). [string]$CdbScript = 'cdbrun-gflags.txt', [int]$RaceSeconds = 45, + [string]$ReleaseExe = 'C:\VWE\RP412\Release\rpl4opt.exe', # Run without the heap instrument on purpose. Says so in the tally. [switch]$AllowNoPageHeap ) @@ -88,6 +89,34 @@ if (-not $pageHeapOn) { Log 'page heap ON (IFEO GlobalFlag has FLG_HEAP_PAGE_ALLOCS)' } +#----------------------------------------------------------------- +# Put THIS build in the sandboxes. +# +# Each pod dir keeps its own copy of the exe, planted by setup.ps1. Run a +# batch without refreshing it and you test whatever was built whenever +# setup.ps1 last ran - so a freshly fixed bug reproduces perfectly, on the +# binary that still has it, and reads as the fix having failed. That +# happened: the fix went in at 11:20 and a 20-launch batch trapped at the +# same address on the 09:33 exe. +#----------------------------------------------------------------- +if (-not (Test-Path $ReleaseExe)) { + Log "ReleaseExe missing: $ReleaseExe - build Release first" + exit 1 +} +$relHash = (Get-FileHash $ReleaseExe -Algorithm MD5).Hash +$refreshed = 0 +for ($i = 0; $i -lt $PodCount; $i++) { + $podDir = Join-Path $Scratch ('pod' + [char](65 + $i)) + if (Test-Path $podDir) { + Copy-Item $ReleaseExe (Join-Path $podDir 'rpl4opt.exe') -Force + $refreshed++ + } else { + Log "pod dir missing: $podDir - run setup.ps1 -PodCount $PodCount first" + exit 1 + } +} +Log "exe: $($relHash.Substring(0,12)) built $((Get-Item $ReleaseExe).LastWriteTime.ToString('MM-dd HH:mm:ss')) -> $refreshed pod(s)" + #----------------------------------------------------------------- # A quiet machine before each launch. #