Skip to content

Commit 09e0e2f

Browse files
committed
filter only quaddtype + separete logs
1 parent 00a4b9f commit 09e0e2f

File tree

1 file changed

+43
-4
lines changed

1 file changed

+43
-4
lines changed

.github/workflows/asan.yml

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,47 @@ jobs:
8282
- name: Run quaddtype tests with ASan
8383
working-directory: quaddtype
8484
run: |
85-
# pass -s to pytest to see ASAN errors and warnings, otherwise pytest captures them
85+
# Create a directory for sanitizer logs
86+
mkdir -p ${{ github.workspace }}/sanitizer_logs
87+
88+
# Run tests with sanitizer output redirected to log files
8689
# Note: UBSAN halt_on_error=0 because NumPy has some UBSAN issues that would abort tests
87-
ASAN_OPTIONS=detect_leaks=0:symbolize=1:strict_init_order=true:allocator_may_return_null=1 \
88-
UBSAN_OPTIONS=halt_on_error=0 \
89-
pytest -vvv -s --color=yes --timeout=600 --durations=10
90+
ASAN_OPTIONS=detect_leaks=0:symbolize=1:strict_init_order=true:allocator_may_return_null=1:log_path=${{ github.workspace }}/sanitizer_logs/asan \
91+
UBSAN_OPTIONS=halt_on_error=0:log_path=${{ github.workspace }}/sanitizer_logs/ubsan \
92+
pytest -vvv --color=yes --timeout=600 --durations=10
93+
94+
- name: Display quaddtype sanitizer warnings
95+
if: always()
96+
run: |
97+
echo "=========================================="
98+
echo "QUADDTYPE SANITIZER WARNINGS SUMMARY"
99+
echo "=========================================="
100+
101+
# Combine all sanitizer logs and filter for quaddtype-related issues
102+
if ls ${{ github.workspace }}/sanitizer_logs/* 1> /dev/null 2>&1; then
103+
cat ${{ github.workspace }}/sanitizer_logs/* 2>/dev/null | \
104+
grep -A2 -B2 "quaddtype\|_quaddtype\|numpy_quaddtype" | \
105+
sort -u || echo "No quaddtype-specific sanitizer warnings found."
106+
else
107+
echo "No sanitizer log files found."
108+
fi
109+
110+
echo ""
111+
echo "=========================================="
112+
echo "ASAN LOGS"
113+
echo "=========================================="
114+
if ls ${{ github.workspace }}/sanitizer_logs/asan* 1> /dev/null 2>&1; then
115+
cat ${{ github.workspace }}/sanitizer_logs/asan* 2>/dev/null || echo "No ASAN logs available."
116+
else
117+
echo "No ASAN log files found."
118+
fi
119+
120+
echo ""
121+
echo "=========================================="
122+
echo "UBSAN LOGS"
123+
echo "=========================================="
124+
if ls ${{ github.workspace }}/sanitizer_logs/ubsan* 1> /dev/null 2>&1; then
125+
cat ${{ github.workspace }}/sanitizer_logs/ubsan* 2>/dev/null || echo "No UBSAN logs available."
126+
else
127+
echo "No UBSAN log files found."
128+
fi

0 commit comments

Comments
 (0)