feat(diagnostic): 阶段 0A 输入链路被动探测与线程归属复现

This commit is contained in:
Codex
2026-10-05 01:10:02 +08:00
parent c0eca1d4bd
commit c218c25310
12 changed files with 2417 additions and 11 deletions
+33
View File
@@ -0,0 +1,33 @@
param(
[ValidateSet('Debug', 'Release')]
[string]$Configuration = 'Debug',
[ValidateSet('x64', 'Win32')]
[string]$Platform = 'x64'
)
$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $PSScriptRoot
$probe = Join-Path $root "build\$Platform\$Configuration\EasyX.ThreadProbe.exe"
if (-not (Test-Path -LiteralPath $probe)) {
throw "Thread probe not built: $probe"
}
$resultRoot = Join-Path $root 'TestResults\easyx-thread-probe'
New-Item -ItemType Directory -Force -Path $resultRoot | Out-Null
$resultPath = Join-Path $resultRoot ((Get-Date -Format 'yyyyMMdd-HHmmss-fff') + "-$PID.json")
& $probe $resultPath
if ($LASTEXITCODE -ne 0) {
throw "EasyX thread probe failed with exit code $LASTEXITCODE"
}
if (-not (Test-Path -LiteralPath $resultPath)) {
throw "Thread probe result not found: $resultPath"
}
$result = Get-Content -Raw -LiteralPath $resultPath | ConvertFrom-Json
if (-not $result.completed) {
throw "Thread probe did not complete: $resultPath"
}
$result | Add-Member -NotePropertyName resultPath -NotePropertyValue $resultPath
$result