aboutsummaryrefslogtreecommitdiff
path: root/scripts/windows_check.ps1
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-08-01 04:27:50 +0300
committerGitHub <noreply@github.com>2026-08-01 04:27:50 +0300
commitb76adc155d979705a353fd6dc87c702f9dfc6c22 (patch)
treef613254e0cfbfd2b4450a6a5f3ee7c0ba8136976 /scripts/windows_check.ps1
parent8d190eddda2c74afa3dc043f8ec8020ffd7b5a94 (diff)
fix(input): preserve native key lifecycle across routing (#2142)
refs #2077 Co-authored-by: Jonathan Liebig <jonathan.liebig@gmail.com>
Diffstat (limited to 'scripts/windows_check.ps1')
-rw-r--r--scripts/windows_check.ps168
1 files changed, 50 insertions, 18 deletions
diff --git a/scripts/windows_check.ps1 b/scripts/windows_check.ps1
index 7c225301..1907d66b 100644
--- a/scripts/windows_check.ps1
+++ b/scripts/windows_check.ps1
@@ -29,6 +29,53 @@ 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 @(
@@ -47,22 +94,7 @@ if ($Mode -eq "lint") {
return
}
-Invoke-Checked cargo @(
- "test",
- "--locked",
- "--target",
- "x86_64-pc-windows-msvc",
- "--bin",
- "herdr",
- "windows_"
-)
-Invoke-Checked cargo @(
- "test",
- "--locked",
- "--target",
- "x86_64-pc-windows-msvc",
- "--bin",
- "herdr",
- "server::client_transport::tests"
-)
+Invoke-CargoTestFilter "windows_"
+Invoke-CargoTestFilter "server::client_transport::tests"
+Invoke-CargoTestFilter "app::tests::native_repeats_and_releases_follow_the_pressed_pane" -Exact
Invoke-Checked cargo @("build", "--locked", "--target", "x86_64-pc-windows-msvc")