Skip to content

Commit

Permalink
[CI] Add PS script to detect hung tests on Windows (#16863)
Browse files Browse the repository at this point in the history
This is just the existing code we have in the run-tests yaml moved to a
script.

In a subsequent PR I'm going to expand these checks to fix recent hangs
we've seen, and I can't use an action because that requires a checkout
which will fail if there's a hung test, so we need a normal script.

Signed-off-by: Sarnie, Nick <[email protected]>
  • Loading branch information
sarnex authored Jan 31, 2025
1 parent 83317bf commit cda8572
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions devops/scripts/windows_detect_hung_tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$exitCode = 0
$hungTests = Get-Process | Where-Object { ($_.Path -match "llvm\\install") -or ($_.Path -match "llvm\\build-e2e") }
$hungTests | Foreach-Object {
$exitCode = 1
echo "Test $($_.Path) hung!"
Stop-Process -Force $_
}
exit $exitCode

0 comments on commit cda8572

Please sign in to comment.