Skip to content

Commit 0aa19a2

Browse files
ci(profiling): collect PHP language test core dumps (#4064)
1 parent b2d669e commit 0aa19a2

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.gitlab/generate-profiler.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,24 @@
164164
- cat "${XFAIL_LIST}" profiling/tests/php-language-xfail.list > /tmp/profiler-php-language-xfail.list
165165
- "if php -r 'exit(PHP_VERSION_ID < 80400 ? 0 : 1);'; then cat profiling/tests/php-language-xfail-pre84.list >> /tmp/profiler-php-language-xfail.list; fi"
166166
- export XFAIL_LIST=/tmp/profiler-php-language-xfail.list
167+
- ulimit -c unlimited
167168
- .gitlab/run_php_language_tests.sh
169+
after_script:
170+
- |
171+
core=/usr/local/src/php/core
172+
if [ -f "${core}" ]; then
173+
output="${CI_PROJECT_DIR}/artifacts/php-language-tests"
174+
mkdir -p "${output}"
175+
gdb --batch \
176+
-ex "set pagination off" \
177+
-ex "info threads" \
178+
-ex "thread apply all bt full" \
179+
-ex "thread apply all info registers" \
180+
-ex "info sharedlibrary" \
181+
/usr/local/bin/php "${core}" > "${output}/gdb-backtrace.txt" 2>&1 || true
182+
mv "${core}" "${output}/core"
183+
fi
184+
artifacts:
185+
when: on_failure
186+
paths:
187+
- artifacts/php-language-tests/

0 commit comments

Comments
 (0)