vlc/vlc-3.0 | branch: master | Thomas Guillem <[email protected]> | Tue Nov 27 14:56:15 2018 +0100| [c2e7db0e30e5f3c6b2a11439ee62bf061e218f71] | committer: Konstantin Pavlov
test: add make_check_wrapper.sh This helper will print on the standard input the failing test-suite.log and core dump in case of a failing make check. This script should be used by build bots in order to find the root cause of failing tests. See https://jenkins.videolan.org/job/vlc-continuous/job/vlc-cont-debian-x86_64/5852/console (cherry picked from commit dabb85a3e3db50cb42545f889b82964d90157ac7) Signed-off-by: Konstantin Pavlov <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=c2e7db0e30e5f3c6b2a11439ee62bf061e218f71 --- test/make_check_wrapper.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/test/make_check_wrapper.sh b/test/make_check_wrapper.sh new file mode 100755 index 0000000000..8ac3acf996 --- /dev/null +++ b/test/make_check_wrapper.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +# Helper used to print more information (log + core dump) about a failing test + +ulimit -c unlimited + +make check $* +ret=$? + +if [ $ret -eq 0 ] || ! (which gdb >/dev/null);then + exit $ret +fi + +# test failed + +for i in $(find -name test-suite.log);do + # Search for a failing test + error_cnt=$(sed -n 's/^# FAIL: *\([^ ]\+\)/\1/p' "$i") + if [ $error_cnt -gt 0 ];then + cat "$i" + + test_path=$(dirname "$i") + core_path="$test_path/core" + failing_test=$(sed -n 's/^FAIL \([^ ]\+\) (exit status:.*/\1/p' ${test_path}/test-suite.log) + if [ -f "$core_path" -a ! -z "$failing_test" ];then + echo "Printing core dump:" + echo "" + gdb "$test_path/$failing_test" -c "$core_path" \ + -ex "set pagination off" \ + -ex "thread apply all bt" \ + -ex "quit" + fi + fi +done + +exit $ret _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
