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 echo "Printing core dump:"
28 gdb
"$test_path/$failing_test" -c "$core_path" \
29 -ex "set pagination off" \
30 -ex "thread apply all bt" \