Add new --backtrace option to tests script.
authorCarl Hetherington <cth@carlh.net>
Thu, 28 Jul 2016 12:18:25 +0000 (13:18 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 28 Jul 2016 12:18:25 +0000 (13:18 +0100)
run/tests

index 714733bcf6bf5bfa6bf95c02f90de4eaaa273f61..77db5d52bbfd15662596a2364fdd00e18fe6c38b 100755 (executable)
--- a/run/tests
+++ b/run/tests
@@ -7,6 +7,9 @@ export DCPOMATIC_LINUX_SHARE_PREFIX=`pwd`
 if [ "$1" == "--debug" ]; then
     shift;
     gdb --args build/test/unit-tests --catch_system_errors=no $*
+elif [ "$1" == "--backtrace" ]; then
+    shift;
+    gdb -batch -ex "run" -ex "thread apply all bt" --args build/test/unit-tests --catch_system_errors=no $*
 elif [ "$1" == "--valgrind" ]; then
     shift;
     valgrind --tool="memcheck" --leak-check=full build/test/unit-tests $*