mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
CI: Move sanitizer output into a separate CI step
Instead of writing ASAN and UBSAN output into the same stream we use for test logging, direct them to log files, named asan.log.$PID and ubsan.log.$PID, and then output them in a separate CI job that runs afterwards. This should hopefully make it easier to see which tests are failing. The downside is that it's now harder to tell which tests the *SAN errors are related to.
This commit is contained in:
16
.github/workflows/lagom-template.yml
vendored
16
.github/workflows/lagom-template.yml
vendored
@@ -185,6 +185,9 @@ jobs:
|
||||
run: ctest --preset Sanitizer --output-on-failure --test-dir Build --timeout 1800
|
||||
env:
|
||||
TESTS_ONLY: 1
|
||||
# NOTE: These are appended to the preset's options.
|
||||
ASAN_OPTIONS: 'log_path=${{ github.workspace }}/asan.log'
|
||||
UBSAN_OPTIONS: 'log_path=${{ github.workspace }}/ubsan.log'
|
||||
|
||||
- name: Upload LibWeb Test Artifacts
|
||||
if: ${{ always() && inputs.fuzzer == 'NO_FUZZ' }}
|
||||
@@ -195,6 +198,19 @@ jobs:
|
||||
retention-days: 0
|
||||
if-no-files-found: ignore
|
||||
|
||||
- name: Sanitizer Output
|
||||
if: ${{ !cancelled() && inputs.fuzzer == 'NO_FUZZ' }}
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: |
|
||||
log_output=$(find . -maxdepth 1 \( -name 'asan.log.*' -o -name 'ubsan.log.*' \) -exec cat {} \; )
|
||||
if [ -z "$log_output" ]; then
|
||||
echo "No sanitizer issues found."
|
||||
else
|
||||
echo "$log_output"
|
||||
echo "Sanitizer errors happened while running tests; see the Test step above."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Lints
|
||||
if: ${{ inputs.os_name == 'Linux' && inputs.fuzzer == 'NO_FUZZ' }}
|
||||
working-directory: ${{ github.workspace }}
|
||||
|
||||
Reference in New Issue
Block a user