Skip to content

Commit 48a95e4

Browse files
authored
[CI] Detect hung tests on Windows (#15560)
Look for any open processes inside the folders we extract to. I tried a few ideas but this one was the simplest and most stable. The command only shows processes by the current user by default, and the account isn't an administrator so we can't do anything weird. Signed-off-by: Sarnie, Nick <[email protected]>
1 parent 51cead2 commit 48a95e4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/sycl-windows-run-tests.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,17 @@ jobs:
8686
# Run E2E tests.
8787
export LIT_OPTS="-v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests ${{ inputs.extra_lit_opts }}"
8888
cmake --build build-e2e --target check-sycl-e2e
89+
- name: Detect hung tests
90+
shell: powershell
91+
run: |
92+
$exitCode = 0
93+
$hungTests = Get-Process | Where-Object { ($_.Path -match "llvm\\install") -or ($_.Path -match "llvm\\build-e2e") }
94+
$hungTests | Foreach-Object {
95+
$exitCode = 1
96+
echo "Test $($_.Path) hung!"
97+
Stop-Process -Force $_
98+
}
99+
exit $exitCode
89100
- name: Cleanup
90101
shell: cmd
91102
if: always()

0 commit comments

Comments
 (0)