From d4ddfd9e7e2f373da4620709fc762addf30e250e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Wed, 8 Jul 2026 00:48:04 -0300 Subject: [PATCH] Try to recover stack trace from unit-tests in macOS CI. --- .github/workflows/eepp-macos-build-check.yml | 30 ++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/eepp-macos-build-check.yml b/.github/workflows/eepp-macos-build-check.yml index eb0504241..8fc72ae59 100644 --- a/.github/workflows/eepp-macos-build-check.yml +++ b/.github/workflows/eepp-macos-build-check.yml @@ -25,9 +25,39 @@ jobs: run: | set +e cd bin/unit_tests + mkdir -p output + crash_report_marker="$PWD/output/.unit-test-started" + touch "$crash_report_marker" ./eepp-unit_tests status=$? if [ "$status" -ne 0 ]; then + echo "::group::macOS crash reports" + mkdir -p output/crash-reports + crash_report_list="output/crash-reports/reports.txt" + for attempt in 1 2 3 4 5; do + : > "$crash_report_list" + for dir in "$HOME/Library/Logs/DiagnosticReports" "/Library/Logs/DiagnosticReports"; do + if [ -d "$dir" ]; then + find "$dir" -maxdepth 1 \( -name 'eepp-unit_tests*.crash' -o -name 'eepp-unit_tests*.ips' \) \ + -newer "$crash_report_marker" -print >> "$crash_report_list" 2>/dev/null || true + fi + done + if [ -s "$crash_report_list" ]; then + break + fi + sleep 2 + done + if [ -s "$crash_report_list" ]; then + while IFS= read -r report; do + [ -n "$report" ] || continue + echo "$report" + cp "$report" output/crash-reports/ || true + cat "$report" || true + done < "$crash_report_list" + else + echo "No eepp-unit_tests crash report found in DiagnosticReports." + fi + echo "::endgroup::" echo "::group::lldb crash backtrace rerun" lldb --batch \ -o "run" \