diff options
author | Christian Dywan <christian.dywan@canonical.com> | 2013-10-01 23:35:39 +0200 |
---|---|---|
committer | Christian Dywan <christian.dywan@canonical.com> | 2013-10-01 23:35:39 +0200 |
commit | abd05ff3608d4ccd59225cdc4697ca1b47073129 (patch) | |
tree | 67cb7e7b6697bf646927370e755bf23ed009adef /cmake | |
parent | 34d3c535de3eff48888638c3074c5e1049e1ccc4 (diff) | |
download | midori-git-abd05ff3608d4ccd59225cdc4697ca1b47073129.tar.gz |
Set contained environment on tests running under tools
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/ContainTest.cmake | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/cmake/ContainTest.cmake b/cmake/ContainTest.cmake index 9f0c760b..5572b588 100644 --- a/cmake/ContainTest.cmake +++ b/cmake/ContainTest.cmake @@ -15,4 +15,27 @@ macro(contain_test test_name) TIMEOUT 42 ENVIRONMENT "${TEST_ENV}" ) + + add_custom_target("gdb-${test_name}" + COMMAND env ${TEST_ENV} gdb + --batch -ex 'set print thread-events off' + -ex 'run' -ex 'bt' + ${CMAKE_BINARY_DIR}/tests/${UNIT} + ) + + add_custom_target("valgrind-${test_name}" + COMMAND env ${TEST_ENV} 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-${test_name}" + COMMAND env ${TEST_ENV} valgrind + --tool=callgrind + --callgrind-out-file=${UNIT}.callgrind + ${CMAKE_BINARY_DIR}/tests/${UNIT} + ) endmacro(contain_test) |