mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-04 11:55:51 +00:00
ci: Save full logs for failed sanitized tests (#2715)
This commit is contained in:
@@ -31,15 +31,16 @@ TESTS=$($TEST_BINARY --gtest_list_tests | awk '/^ / {print suite $1} !/^ / {su
|
|||||||
OUTPUT_DIR="./.sanitizer-report"
|
OUTPUT_DIR="./.sanitizer-report"
|
||||||
mkdir -p "$OUTPUT_DIR"
|
mkdir -p "$OUTPUT_DIR"
|
||||||
|
|
||||||
|
export TSAN_OPTIONS="die_after_fork=0"
|
||||||
|
export MallocNanoZone='0' # for MacOSX
|
||||||
|
|
||||||
for TEST in $TESTS; do
|
for TEST in $TESTS; do
|
||||||
OUTPUT_FILE="$OUTPUT_DIR/${TEST//\//_}"
|
OUTPUT_FILE="$OUTPUT_DIR/${TEST//\//_}.log"
|
||||||
export TSAN_OPTIONS="log_path=\"$OUTPUT_FILE\" die_after_fork=0"
|
$TEST_BINARY --gtest_filter="$TEST" > "$OUTPUT_FILE" 2>&1
|
||||||
export ASAN_OPTIONS="log_path=\"$OUTPUT_FILE\""
|
|
||||||
export UBSAN_OPTIONS="log_path=\"$OUTPUT_FILE\""
|
|
||||||
export MallocNanoZone='0' # for MacOSX
|
|
||||||
$TEST_BINARY --gtest_filter="$TEST" > /dev/null 2>&1
|
|
||||||
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "'$TEST' failed a sanitizer check."
|
echo "'$TEST' failed a sanitizer check."
|
||||||
|
else
|
||||||
|
rm "$OUTPUT_FILE"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
2
.github/workflows/reusable-test.yml
vendored
2
.github/workflows/reusable-test.yml
vendored
@@ -68,7 +68,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Run clio_tests (sanitizer errors ignored)
|
- name: Run clio_tests (sanitizer errors ignored)
|
||||||
if: ${{ env.SANITIZER_IGNORE_ERRORS == 'true' }}
|
if: ${{ env.SANITIZER_IGNORE_ERRORS == 'true' }}
|
||||||
run: ./.github/scripts/execute-tests-under-sanitizer ./clio_tests
|
run: ./.github/scripts/execute-tests-under-sanitizer.sh ./clio_tests
|
||||||
|
|
||||||
- name: Check for sanitizer report
|
- name: Check for sanitizer report
|
||||||
if: ${{ env.SANITIZER_IGNORE_ERRORS == 'true' }}
|
if: ${{ env.SANITIZER_IGNORE_ERRORS == 'true' }}
|
||||||
|
|||||||
2
.github/workflows/sanitizers.yml
vendored
2
.github/workflows/sanitizers.yml
vendored
@@ -15,7 +15,7 @@ on:
|
|||||||
- ".github/actions/**"
|
- ".github/actions/**"
|
||||||
- "!.github/actions/build-docker-image/**"
|
- "!.github/actions/build-docker-image/**"
|
||||||
- "!.github/actions/create-issue/**"
|
- "!.github/actions/create-issue/**"
|
||||||
- .github/scripts/execute-tests-under-sanitizer
|
- .github/scripts/execute-tests-under-sanitizer.sh
|
||||||
|
|
||||||
- CMakeLists.txt
|
- CMakeLists.txt
|
||||||
- conanfile.py
|
- conanfile.py
|
||||||
|
|||||||
Reference in New Issue
Block a user