diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/test_unix_installer.py | 1 | ||||
| -rw-r--r-- | scripts/test_vendor_libghostty_vt.py | 4 | ||||
| -rw-r--r-- | scripts/test_vendor_portable_pty.py | 4 | ||||
| -rw-r--r-- | scripts/windows_check.ps1 | 58 | ||||
| -rw-r--r-- | scripts/windows_conpty_enhanced_input_probe.ps1 | 2 | ||||
| -rw-r--r-- | scripts/windows_smoke_conpty_path.ps1 | 2 |
6 files changed, 9 insertions, 62 deletions
diff --git a/scripts/test_unix_installer.py b/scripts/test_unix_installer.py index 4e82f5bd..493a85b3 100644 --- a/scripts/test_unix_installer.py +++ b/scripts/test_unix_installer.py @@ -15,6 +15,7 @@ INSTALLER = REPO_ROOT / "distribution" / "install.sh" REQUIRED_COMMANDS = ("awk", "cat", "chmod", "cp", "mkdir", "mktemp", "mv", "rm") +@unittest.skipUnless(os.name == "posix", "Unix installer requires a POSIX host") class UnixInstallerTests(unittest.TestCase): def setUp(self) -> None: self.temp_dir = tempfile.TemporaryDirectory(prefix="herdr-installer-test-") diff --git a/scripts/test_vendor_libghostty_vt.py b/scripts/test_vendor_libghostty_vt.py index ad5c8d5e..2986af8f 100644 --- a/scripts/test_vendor_libghostty_vt.py +++ b/scripts/test_vendor_libghostty_vt.py @@ -108,9 +108,9 @@ class VendorLibghosttyVtTests(unittest.TestCase): self.assertTrue(index.exists()) text = index.read_text() missing = [ - str(path.relative_to(project_root)) + path.relative_to(project_root).as_posix() for path in patches - if str(path.relative_to(project_root)) not in text + if path.relative_to(project_root).as_posix() not in text ] self.assertEqual(missing, []) diff --git a/scripts/test_vendor_portable_pty.py b/scripts/test_vendor_portable_pty.py index cf3b791a..899b33f8 100644 --- a/scripts/test_vendor_portable_pty.py +++ b/scripts/test_vendor_portable_pty.py @@ -65,9 +65,9 @@ class VendorPortablePtyTests(unittest.TestCase): self.assertTrue(index.exists()) text = index.read_text() missing = [ - str(path.relative_to(project_root)) + path.relative_to(project_root).as_posix() for path in patches - if str(path.relative_to(project_root)) not in text + if path.relative_to(project_root).as_posix() not in text ] self.assertEqual(missing, []) diff --git a/scripts/windows_check.ps1 b/scripts/windows_check.ps1 index 2811c6a2..b61da6c2 100644 --- a/scripts/windows_check.ps1 +++ b/scripts/windows_check.ps1 @@ -29,62 +29,12 @@ function Invoke-CargoWithZigCacheRecovery { Invoke-Checked cargo $Arguments } -function Invoke-CargoTestFilter { - param( - [Parameter(Mandatory)] - [string]$Filter, - [switch]$Exact - ) - - $commonArguments = @( - "test", - "--locked", - "--target", - "x86_64-pc-windows-msvc", - "--bin", - "herdr", - $Filter - ) - $harnessArguments = @("--list") - if ($Exact) { - $harnessArguments += "--exact" - } - - $listArguments = $commonArguments + @("--") + $harnessArguments - $listOutput = @(& cargo @listArguments) - if ($LASTEXITCODE -ne 0) { - throw "could not enumerate tests for filter '$Filter': $($listOutput -join [Environment]::NewLine)" - } - - $testNames = @( - foreach ($line in $listOutput) { - $match = [regex]::Match([string]$line, '^\s*(\S+): test\s*$') - if ($match.Success) { - $match.Groups[1].Value - } - } - ) - if ($testNames.Count -eq 0) { - throw "test filter '$Filter' selected zero tests" - } - - Write-Host "Running $($testNames.Count) test(s) for '$Filter'" - $runArguments = $commonArguments - if ($Exact) { - $runArguments += @("--", "--exact") - } - Invoke-Checked cargo $runArguments -} - -Invoke-Checked rustup @("target", "add", "x86_64-pc-windows-msvc") Invoke-Checked cargo @("fmt", "--check") Invoke-CargoWithZigCacheRecovery @( "clippy", "--bin", "herdr", "--locked", - "--target", - "x86_64-pc-windows-msvc", "--", "-D", "warnings" @@ -94,9 +44,5 @@ if ($Mode -eq "lint") { return } -Invoke-CargoTestFilter "windows_" -Invoke-CargoTestFilter "server::client_transport::tests" -Invoke-CargoTestFilter "input::lease::tests::duplicate_physical_press_normalizes_for_forwarded_and_consumed_leases" -Exact -Invoke-CargoTestFilter "client::shell::tests::input_domain::physical_release_uses_the_leased_press_code_with_current_modifiers" -Exact -Invoke-CargoTestFilter "client::shell::tests::input_domain::pane_key_release_keeps_the_press_target" -Exact -Invoke-Checked cargo @("build", "--locked", "--target", "x86_64-pc-windows-msvc") +Invoke-Checked just @("test") +Invoke-Checked cargo @("build", "--locked") diff --git a/scripts/windows_conpty_enhanced_input_probe.ps1 b/scripts/windows_conpty_enhanced_input_probe.ps1 index 1e452521..559396c4 100644 --- a/scripts/windows_conpty_enhanced_input_probe.ps1 +++ b/scripts/windows_conpty_enhanced_input_probe.ps1 @@ -478,7 +478,7 @@ fn main() { } catch { Write-Host "server stop during cleanup failed: $($_.Exception.Message)" } - Wait-Process -Id $server.Id -Timeout 10 -ErrorAction SilentlyContinue + $null = $server.WaitForExit(10000) $server.Refresh() if (-not $server.HasExited) { & taskkill.exe /PID $server.Id /T /F 2>&1 | Out-Null diff --git a/scripts/windows_smoke_conpty_path.ps1 b/scripts/windows_smoke_conpty_path.ps1 index bec93b66..484f2a1f 100644 --- a/scripts/windows_smoke_conpty_path.ps1 +++ b/scripts/windows_smoke_conpty_path.ps1 @@ -135,7 +135,7 @@ try { } catch { Write-Host "server stop during cleanup failed: $($_.Exception.Message)" } - Wait-Process -Id $server.Id -Timeout 10 -ErrorAction SilentlyContinue + $null = $server.WaitForExit(10000) $server.Refresh() if (-not $server.HasExited) { & taskkill.exe /PID $server.Id /T /F 2>&1 | Out-Null |
