Skip to content

Commit

Permalink
[CI] Detect hung tests on Windows (#15560)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
sarnex authored Oct 2, 2024
1 parent 51cead2 commit 48a95e4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/sycl-windows-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,17 @@ jobs:
# Run E2E tests.
export LIT_OPTS="-v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests ${{ inputs.extra_lit_opts }}"
cmake --build build-e2e --target check-sycl-e2e
- name: Detect hung tests
shell: powershell
run: |
$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
- name: Cleanup
shell: cmd
if: always()
Expand Down

0 comments on commit 48a95e4

Please sign in to comment.