Skip to content

Commit cda8572

Browse files
authored
[CI] Add PS script to detect hung tests on Windows (intel#16863)
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]>
1 parent 83317bf commit cda8572

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
$exitCode = 0
2+
$hungTests = Get-Process | Where-Object { ($_.Path -match "llvm\\install") -or ($_.Path -match "llvm\\build-e2e") }
3+
$hungTests | Foreach-Object {
4+
$exitCode = 1
5+
echo "Test $($_.Path) hung!"
6+
Stop-Process -Force $_
7+
}
8+
exit $exitCode

0 commit comments

Comments
 (0)