From: Michael Wetherell Date: Sun, 18 Apr 2010 17:19:06 +0000 (+0000) Subject: Try to provide backtraces on unix buildbots if the test program crashes. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9c0e333ce19b9c3778badab75ead275a4b25dfbc?ds=sidebyside Try to provide backtraces on unix buildbots if the test program crashes. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/build/buildbot/config/include/defs.xml b/build/buildbot/config/include/defs.xml index 5b854d5aee..fc251c3122 100644 --- a/build/buildbot/config/include/defs.xml +++ b/build/buildbot/config/include/defs.xml @@ -335,7 +335,8 @@ --> - + + @@ -347,10 +348,10 @@ - + - + @@ -360,6 +361,7 @@ + cd tests && runtests.bat @@ -367,10 +369,31 @@ cd tests && runtests.bat + ERR=0 cd tests || exit 0 -./test || ERR=$? -if [ -n "$DISPLAY" -a -x test_gui ]; then ./test_gui || ERR=$?; fi +ulimit -c unlimited + +try() +{ + rm -f core + echo Running: "$@" + "$@" || ERR=$? + + if [ -f core -a -x "`which gdb`" ]; then + echo Crashed, attempting to display backtrace: + gdb -batch -c core -ex 'set pagination off' -ex bt "$1" + fi + + echo +} + +try ./test + +if [ -n "$DISPLAY" -a -x test_gui ]; then + try ./test_gui +fi + exit $ERR