3 # Helper used to print more information (log + core dump) about a failing test
10 if [ $ret -eq 0 ] ||
! (which gdb
>/dev
/null
);then
16 for i
in $
(find -name test-suite.log
);do
17 # Search for a failing test
18 error_cnt
=$
(sed -n 's/^# FAIL: *\([^ ]\+\)/\1/p' "$i")
19 if [ $error_cnt -gt 0 ];then
22 test_path
=$
(dirname "$i")
23 core_path
="$test_path/core"
24 failing_test
=$
(sed -n 's/^FAIL \([^ ]\+\) (exit status:.*/\1/p' ${test_path}/test-suite.log
)
25 if [ -f "$core_path" -a ! -z "$failing_test" ];then
26 if [ -x "$test_path/.libs/$failing_test" ];then
27 failing_test_path
="$test_path/.libs/$failing_test"
29 failing_test_path
="$test_path/$failing_test"
31 echo "Printing core dump:"
33 gdb
"$failing_test_path" -c "$core_path" \
34 -ex "set pagination off" \
35 -ex "thread apply all bt" \