Skip to content

Commit a4334da

Browse files
[CI] Create Github Job Summary for failing E2E tasks (#13069)
Unfortunately, our E2E tests use custom LIT format so I wasn't able to make `llvm-lit` generate the results into a JSON file. That meant that I have to redirect the entire output into a log file and Github Actions won't be able to show intermediate progress until `llvm-lit` finishes execution. Another thing worth mentioning is that these summaries aren't "searchable" via Github's search queries (unlike comments), but I think it's still a usability improvement because it would allow to see all the failures on a single page.
1 parent 5cfbc73 commit a4334da

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,19 @@ jobs:
268268
run: |
269269
cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DSYCL_TEST_E2E_TARGETS="${{ inputs.target_devices }}" -DCMAKE_CXX_COMPILER="$(which clang++)" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }}
270270
- name: SYCL End-to-end tests
271+
shell: bash {0}
271272
if: inputs.tests_selector == 'e2e'
272273
env:
273274
LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests ${{ inputs.extra_lit_opts }}
274275
run: |
275-
ninja -C build-e2e check-sycl-e2e
276-
276+
ninja -C build-e2e check-sycl-e2e > e2e.log 2>&1
277+
exit_code=$?
278+
cat e2e.log
279+
if [ $exit_code -ne 0 ]; then
280+
# TODO: XPASS/UNRESOLVED
281+
awk '/^Failed Tests|Testing Time/{flag=1}/FAILED: CMakeFiles/{flag=0}flag' e2e.log >> $GITHUB_STEP_SUMMARY
282+
fi
283+
exit $exit_code
277284
- name: Build SYCL CTS tests
278285
if: inputs.tests_selector == 'cts'
279286
env:

0 commit comments

Comments
 (0)