Stage locked Windows binary updates
ci / test (push) Canceled after 0s
ci / fuzz-smoke (push) Canceled after 0s
ci / macos-client (macos-aarch64, macos-14) (push) Canceled after 0s
ci / macos-client (macos-x86_64, macos-13) (push) Canceled after 0s
ci / windows-client (push) Canceled after 0s
ci / package-release (linux-x86_64, ubuntu-latest, , , ) (push) Canceled after 0s
ci / package-release (macos-aarch64, macos-14, , , ) (push) Canceled after 0s
ci / package-release (macos-x86_64, macos-13, , , ) (push) Canceled after 0s
ci / package-release (windows-aarch64, windows-latest, aarch64, windows, aarch64-pc-windows-msvc) (push) Canceled after 0s
ci / package-release (windows-x86_64, windows-latest, , , ) (push) Canceled after 0s
ci / remote-bench (push) Canceled after 0s
ci / publish-gitea-release (push) Canceled after 0s

This commit is contained in:
DuProcess
2026-07-16 22:28:03 -04:00
parent dc34183118
commit 159d1e5bcf
2 changed files with 51 additions and 5 deletions
+18
View File
@@ -298,12 +298,30 @@ fn windows_prebuilt_install_requires_client_but_not_bench() {
assert!(ps1.contains("throw \"prebuilt archive missing dosh-client.exe\""));
assert!(ps1.contains("-Filter \"dosh-bench.exe\""));
assert!(ps1.contains("if ($bench)"));
assert!(ps1.contains("Install-Binary $client.FullName (Join-Path $bindir \"dosh.exe\")"));
assert!(!ps1.contains("Install-Binary (Join-Path $bindir \"dosh-client.exe\")"));
assert!(
!ps1.contains("throw \"prebuilt archive missing dosh-bench.exe\""),
"Windows prebuilt install should not fall back to source just because dosh-bench is absent"
);
}
#[test]
fn windows_installer_stages_locked_binary_replacements() {
let ps1 = include_str!("../install.ps1");
assert!(ps1.contains("function Start-DeferredBinaryReplacement"));
assert!(ps1.contains("$pending = \"$Destination.pending.$PID\""));
assert!(ps1.contains("Move-Item -LiteralPath $tmp -Destination $pending -Force"));
assert!(ps1.contains("Start-DeferredBinaryReplacement $pending $Destination"));
assert!(ps1.contains("binary is in use; staged replacement"));
assert!(ps1.contains("for (`$i = 0; `$i -lt 3600; `$i++)"));
assert!(ps1.contains(
"Move-Item -LiteralPath `$payload.Pending -Destination `$payload.Destination -Force"
));
assert!(ps1.contains("[System.Text.Encoding]::Unicode.GetBytes($script)"));
assert!(ps1.contains("Start-Process -FilePath $ps"));
}
#[test]
fn windows_installer_adds_user_path_idempotently() {
let ps1 = include_str!("../install.ps1");