Skip to content

Commit

Permalink
[CI] Add more Windows hung test checks
Browse files Browse the repository at this point in the history
Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
  • Loading branch information
sarnex committed Jan 31, 2025
1 parent cda8572 commit cb9e183
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/sycl-windows-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ jobs:
outputs:
build_conclusion: ${{ steps.build.conclusion }}
steps:
- name: Detect hung tests
if: always()
shell: powershell
run: |
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/intel/llvm/refs/heads/sycl/devops/scripts/windows_detect_hung_tests.ps1" -OutFile "windows_detect_hung_tests.ps1"
powershell.exe -File windows_detect_hung_tests.ps1
exit $LASTEXITCODE
- uses: actions/checkout@v4
with:
sparse-checkout: |
Expand Down Expand Up @@ -182,3 +189,9 @@ jobs:
name: sycl_windows_default
path: ${{ inputs.artifact_archive_name }}
retention-days: ${{ inputs.retention-days }}
- name: Detect hung tests
if: always()
shell: powershell
run: |
powershell.exe -File windows_detect_hung_tests.ps1
exit $LASTEXITCODE
21 changes: 11 additions & 10 deletions .github/workflows/sycl-windows-run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ jobs:
environment: WindowsCILock
env: ${{ fromJSON(inputs.env) }}
steps:
- name: Detect hung tests
if: always()
shell: powershell
run: |
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/intel/llvm/refs/heads/sycl/devops/scripts/windows_detect_hung_tests.ps1" -OutFile "windows_detect_hung_tests.ps1"
powershell.exe -File windows_detect_hung_tests.ps1
exit $LASTEXITCODE
- uses: actions/checkout@v4
with:
sparse-checkout: |
Expand Down Expand Up @@ -101,18 +108,12 @@ jobs:
fi
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
- name: Detect hung tests
if: always()
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
powershell.exe -File windows_detect_hung_tests.ps1
exit $LASTEXITCODE
- name: Cleanup
shell: cmd
if: always()
Expand Down

0 comments on commit cb9e183

Please sign in to comment.