diff options
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 662661a4..d0ebef01 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -48,6 +48,25 @@ foreach(UNIT_SRC ${TESTS}) add_test(NAME ${UNIT} COMMAND ${UNIT}) contain_test (${UNIT}) + add_custom_target(gdb-${UNIT} + COMMAND gdb + --batch -ex 'set print thread-events off' + -ex 'run' -ex 'bt' + ${CMAKE_BINARY_DIR}/tests/${UNIT} + ) + add_custom_target(valgrind-${UNIT} + COMMAND valgrind + -q --leak-check=no --num-callers=4 + --show-possibly-lost=no + --undef-value-errors=yes + --track-origins=yes + ${CMAKE_BINARY_DIR}/tests/${UNIT} + ) + add_custom_target(callgrind-${UNIT} + COMMAND valgrind --tool=callgrind + --callgrind-out-file=${UNIT}.callgrind + ${CMAKE_BINARY_DIR}/tests/${UNIT} + ) endforeach () file(GLOB TESTS *.sh) |