Skip to content

Commit a4a51a5

Browse files
[CI] Refactor processing of E2E failures
Use a separate step so that the logs would be available if the workflow was cancelled. Also changes the "failing" step to only show the names of the failing tests instead of the whole e2e run log (that is still available in a separate foldable step).
1 parent 521114d commit a4a51a5

File tree

3 files changed

+27
-12
lines changed

3 files changed

+27
-12
lines changed

devops/actions/run-tests/e2e/action.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,26 @@ runs:
6060
run: |
6161
cmake -GNinja -B./build-e2e -S./llvm/sycl/test-e2e -DCMAKE_CXX_COMPILER="${{ inputs.sycl_compiler || '$(which clang++)'}}" -DLLVM_LIT="$PWD/llvm/llvm/utils/lit/lit.py" ${{ steps.cmake_opts.outputs.opts }}
6262
- name: SYCL End-to-end tests
63-
shell: bash {0}
63+
id: run_e2e
64+
continue-on-error: true
65+
shell: bash
6466
env:
6567
LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param print_features=True --param test-mode=${{ inputs.testing_mode }} --param sycl_devices=${{ inputs.target_devices }} ${{ inputs.extra_lit_opts }}
6668
run: |
6769
ninja -C build-e2e check-sycl-e2e > e2e.log 2>&1
68-
exit_code=$?
70+
- name: E2E logs
71+
if: ${{ always() }}
72+
shell: bash
73+
run: |
6974
cat e2e.log
70-
if [ $exit_code -ne 0 ]; then
75+
- name: Report E2E failures
76+
if: steps.run_e2e.outcome != 'success'
77+
shell: bash
78+
run: |
7179
# This is duplicated between lin/win, updates must change both.
7280
awk '/^Failed Tests|Unexpectedly Passed Tests|Unresolved tests|Timed Out Tests|Testing Time/{flag=1}/FAILED: CMakeFiles/{flag=0}flag' e2e.log >> $GITHUB_STEP_SUMMARY
73-
fi
74-
exit $exit_code
81+
awk '/^Failed Tests|Unexpectedly Passed Tests|Unresolved tests|Timed Out Tests|Testing Time/{flag=1}/FAILED: CMakeFiles/{flag=0}flag' e2e.log
82+
exit 1
7583
7684
- name: Pack E2E binaries
7785
if: ${{ always() && !cancelled() && inputs.binaries_artifact != '' && inputs.testing_mode != 'run-only'}}

devops/actions/run-tests/windows/e2e/action.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,26 @@ runs:
7272
run: ls build-e2e > e2econf_files.txt
7373

7474
- name: Run End-to-End tests
75-
shell: bash {0}
75+
id: run_e2e
76+
continue-on-error: true
77+
shell: bash
7678
env:
7779
LIT_OPTS: -v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time ${{ inputs.e2e_testing_mode == 'run-only' && 1200 || 3600 }} --time-tests --param print_features=True --param test-mode=${{ inputs.testing_mode }} --param sycl_devices=${{ inputs.target_devices }} ${{ inputs.extra_lit_opts }}
7880
run: |
79-
# Run E2E tests.
8081
cmake --build build-e2e --target check-sycl-e2e > e2e.log 2>&1
81-
82-
exit_code=$?
82+
- name: E2E logs
83+
if: ${{ always() }}
84+
shell: bash
85+
run: |
8386
cat e2e.log
84-
if [ $exit_code -ne 0 ]; then
87+
- name: Report E2E failures
88+
if: steps.run_e2e.outcome != 'success'
89+
shell: bash
90+
run: |
8591
# This is duplicated between lin/win, updates must change both.
8692
awk '/^Failed Tests|Unexpectedly Passed Tests|Unresolved tests|Timed Out Tests|Testing Time/{flag=1}/FAILED: CMakeFiles/{flag=0}flag' e2e.log >> $GITHUB_STEP_SUMMARY
87-
fi
88-
exit $exit_code
93+
awk '/^Failed Tests|Unexpectedly Passed Tests|Unresolved tests|Timed Out Tests|Testing Time/{flag=1}/FAILED: CMakeFiles/{flag=0}flag' e2e.log
94+
exit 1
8995
9096
# Github CI doesn't support containers on Windows, so we cannot guarantee
9197
# that paths are the same between building and running systems. To avoid

sycl/test-e2e/Basic/bit_cast/bit_cast.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: %{run} %t.out
33
// RUN: %if windows %{ %{build} -fsycl-host-compiler=cl -fsycl-host-compiler-options='/std:c++17 /Zc:__cplusplus' -o %t2.out %}
44
// RUN: %if windows %{ %{run} %t2.out %}
5+
// RUN: false
56

67
#include <sycl/detail/core.hpp>
78

0 commit comments

Comments
 (0)