Record what the Windows box proved, and keep the proof repeatable
`win-tui-capture.sh` drives the real binary over `ssh -tt`, which is the only
way to render the TUI the way a Windows console does: sshd allocates a
pseudoconsole, crossterm takes its Windows backend, and the bytes it emits are
decoded back into a frame locally. The existing smoke script cannot do this
because it forks its own pty, which is POSIX-only.
It now takes a key sequence, so the interesting case — a populated list, not an
empty panel — is the one that gets checked, and it keeps the fullest frame
rather than the last one, because quitting wipes the screen. It reports where a
replacement character appeared, since mid-stream means the console could not
draw the glyph and at the tail only means ssh truncated a frame on disconnect.
`win-hwcheck.ps1` measures the volume before and after a real deletion, counts
entries in the shell's Recycle Bin, and asserts the two agree; that is what
caught the missing undo flag. Its fixtures clean themselves up.
Windows moves from "cross-compile only" to verified on real hardware in the
roadmap. UAC elevation, the long-path manifest, and publishing stay pending.
2026-10-15 10:55:01 +00:00
|
|
|
|
# 在 Windows 真机上跑一整套校验:fmt 之外的 test / clippy / release build。
|
2026-10-15 08:43:41 +00:00
|
|
|
|
# 由 scripts/win-sync.sh 上传并调用;也可以单独在 PowerShell 里直接跑。
|
|
|
|
|
|
$ErrorActionPreference = 'Continue'
|
|
|
|
|
|
# 中文输出必须 UTF-8,否则 SSH 那头看到的全是乱码。
|
|
|
|
|
|
$null = & cmd /c 'chcp 65001 >nul'
|
|
|
|
|
|
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
|
|
|
|
|
|
$env:Path = "$env:USERPROFILE\.cargo\bin;$env:Path"
|
|
|
|
|
|
# 增量构建产物放 D 盘之外无所谓,但统一放 C:\dev\target 以免被 tar 覆盖。
|
|
|
|
|
|
$env:CARGO_TARGET_DIR = 'C:\dev\target'
|
|
|
|
|
|
Set-Location C:\dev\nex_squid
|
|
|
|
|
|
|
|
|
|
|
|
$fail = 0
|
|
|
|
|
|
foreach ($step in @(
|
|
|
|
|
|
@{ n = 'cargo test'; a = @('test') },
|
|
|
|
|
|
@{ n = 'cargo clippy'; a = @('clippy', '--all-targets', '--', '-D', 'warnings') },
|
|
|
|
|
|
@{ n = 'cargo build'; a = @('build', '--release', '-p', 'squid-cli') }
|
|
|
|
|
|
)) {
|
|
|
|
|
|
Write-Output "`n==> $($step.n)"
|
|
|
|
|
|
& cargo @($step.a)
|
|
|
|
|
|
if ($LASTEXITCODE -ne 0) { Write-Output "!!! $($step.n) FAILED (exit $LASTEXITCODE)"; $fail = 1 }
|
|
|
|
|
|
}
|
|
|
|
|
|
if ($fail) { Write-Output "`nRESULT: FAIL" ; exit 1 }
|
|
|
|
|
|
Write-Output "`nRESULT: OK"
|