Skip to content

Commit 7025de8

Browse files
authored
[CI] Add more Windows hung test checks (#16859)
Obviously we shouldn't have to do this, but these hang issues are causing serious CI issues and annoying users. If there is a hung test detected, CI will fail after killing the process, so we should still catch the hung tests. I can't add an action instead of downloading the script because you need to do a (cached) checkout to get the action file and that tries to reset the git repo which fails if there's locked files. --------- Signed-off-by: Sarnie, Nick <nick.sarnie@intel.com>
1 parent cd125a4 commit 7025de8

File tree

2 files changed

+35
-9
lines changed

2 files changed

+35
-9
lines changed

.github/workflows/sycl-windows-build.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ jobs:
7676
outputs:
7777
build_conclusion: ${{ steps.build.conclusion }}
7878
steps:
79+
- name: Detect hung tests
80+
if: always()
81+
shell: powershell
82+
continue-on-error: true
83+
run: |
84+
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"
85+
powershell.exe -File windows_detect_hung_tests.ps1
86+
$exitCode = $LASTEXITCODE
87+
Remove-Item -Path "windows_detect_hung_tests.ps1"
88+
exit $exitCode
7989
- uses: actions/checkout@v4
8090
with:
8191
sparse-checkout: |
@@ -182,3 +192,12 @@ jobs:
182192
name: sycl_windows_default
183193
path: ${{ inputs.artifact_archive_name }}
184194
retention-days: ${{ inputs.retention-days }}
195+
- name: Detect hung tests
196+
if: always()
197+
shell: powershell
198+
run: |
199+
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"
200+
powershell.exe -File windows_detect_hung_tests.ps1
201+
$exitCode = $LASTEXITCODE
202+
Remove-Item -Path "windows_detect_hung_tests.ps1"
203+
exit $exitCode

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

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ jobs:
4747
environment: WindowsCILock
4848
env: ${{ fromJSON(inputs.env) }}
4949
steps:
50+
- name: Detect hung tests
51+
if: always()
52+
shell: powershell
53+
continue-on-error: true
54+
run: |
55+
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"
56+
powershell.exe -File windows_detect_hung_tests.ps1
57+
$exitCode = $LASTEXITCODE
58+
Remove-Item -Path "windows_detect_hung_tests.ps1"
59+
exit $exitCode
5060
- uses: actions/checkout@v4
5161
with:
5262
sparse-checkout: |
@@ -101,17 +111,14 @@ jobs:
101111
fi
102112
export LIT_OPTS="-v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests ${{ inputs.extra_lit_opts }}"
103113
cmake --build build-e2e --target check-sycl-e2e
104-
- name: Detect hung tests
105-
shell: powershell
114+
- name: Detect hung tests
106115
if: always()
116+
shell: powershell
107117
run: |
108-
$exitCode = 0
109-
$hungTests = Get-Process | Where-Object { ($_.Path -match "llvm\\install") -or ($_.Path -match "llvm\\build-e2e") }
110-
$hungTests | Foreach-Object {
111-
$exitCode = 1
112-
echo "Test $($_.Path) hung!"
113-
Stop-Process -Force $_
114-
}
118+
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"
119+
powershell.exe -File windows_detect_hung_tests.ps1
120+
$exitCode = $LASTEXITCODE
121+
Remove-Item -Path "windows_detect_hung_tests.ps1"
115122
exit $exitCode
116123
- name: Cleanup
117124
shell: cmd

0 commit comments

Comments
 (0)