Test suite: richer diagnostics, headless accessibility audit, perf/leak sanity
Andre's three "bigger ideas" from RemSound-smoke-test-agent-brief.md: - Richer diagnostics: --diagnostics now includes a live localhost audio self-check (PCM + Opus, with packet/underrun/drop/buffer/latency counters), the most recent session snapshot parsed from the log (codec, send/receive state, buffer, drops, heartbeat), and a recent-warnings/errors digest from the log. BuildDiagnosticsReport gained a runLiveAudioProbe flag so the self-test's privacy check stays fast. - Headless accessibility audit: new --selftest step constructs the dialogs that can be built without hardware (Startup behaviour, Recording settings, Preferences) and checks every actionable control announces a name and that Alt-key mnemonics are unique within a container. MainForm is out of scope (its constructor opens audio/hotkeys/sockets). Dialogs that won't construct are skipped, not failed. Currently audits 3, no violations. - Perf/leak sanity: new --perftest command runs several audio-loopback cycles and reports whether handle/memory/thread counts stay bounded (handles ratcheting up cycle-on-cycle is the leak fingerprint, given RemSound's handle-leak history). Lenient thresholds; logs the numbers for build-to-build comparison. Wired into run-tests.ps1. - Shared AudioLoopback helper (used by the self-test, diagnostics and perf test) so all three exercise the identical real capture/encode/network/decode path on test port 47929. - csproj: the four previously-unconditional cue Content items are now Exists-guarded like the rest, so a mid-edit sounds\ folder doesn't break the dev build; the gate still enforces the required cues before release. Help + manual updated (--perftest, --smoke-test, --config-dir, richer --selftest). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
832ed40bf7
commit
ad66fe5364
@@ -113,6 +113,14 @@ foreach ($line in ($st.Text -split "`r?`n")) {
|
||||
}
|
||||
if ($st.Code -eq 0) { Pass "self-test passed (exit 0)" } else { Fail "self-test failed (exit $($st.Code))" }
|
||||
|
||||
Write-Host "`nResource sanity (handle/memory leak check):" -ForegroundColor Cyan
|
||||
$pf = Invoke-RsCli @('--perftest', '--seconds', '12')
|
||||
foreach ($line in ($pf.Text -split "`r?`n")) {
|
||||
if ($line -match 'baseline:|cycle \d|net change|^\s*RESULT:') { Write-Host " $($line.Trim())" }
|
||||
}
|
||||
if ($pf.Code -eq 0) { Pass "resources stayed bounded across cycles (or skipped - no audio device)" }
|
||||
else { Fail "perf sanity flagged possible runaway (exit $($pf.Code))" }
|
||||
|
||||
# ---- 5. COLD START + CLEAN CLOSE, against an isolated --config-dir so the real settings are never
|
||||
# touched (smoke-test brief, safety rule 1 + baseline steps 3-4) ----
|
||||
Write-Host "`nCold start and clean close (isolated config):" -ForegroundColor Cyan
|
||||
|
||||
Reference in New Issue
Block a user