diff options
author | Christian Dywan <christian.dywan@canonical.com> | 2014-04-04 23:49:33 +0200 |
---|---|---|
committer | Christian Dywan <christian.dywan@canonical.com> | 2014-04-04 23:49:33 +0200 |
commit | 3007d024541dd63d52de35cfa2a6c863c7ee6afe (patch) | |
tree | 5a7e35d00f80b0df79d84ad4e1bb636f30f44570 /cmake | |
parent | 1485d8a3b841bbcd7fbc703e1de46d2196736958 (diff) | |
download | midori-git-3007d024541dd63d52de35cfa2a6c863c7ee6afe.tar.gz |
Execute extension tests separately from CMake
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/ContainTest.cmake | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cmake/ContainTest.cmake b/cmake/ContainTest.cmake index c671fd28..49bad07e 100644 --- a/cmake/ContainTest.cmake +++ b/cmake/ContainTest.cmake @@ -2,8 +2,8 @@ include(ParseArguments) -macro(contain_test test_name) - parse_arguments(ARGS "TEST" "" ${ARGN}) +macro(contain_test test_name executable) + parse_arguments(ARGS "test_name;executable" "" ${ARGN}) set(TEST_ENV "") foreach(VARIABLE XDG_CONFIG_HOME XDG_CACHE_HOME XDG_DATA_HOME XDG_RUNTIME_DIR TMPDIR) set(CONTAINER "${CMAKE_CURRENT_BINARY_DIR}/${test_name}-folders/${VARIABLE}") @@ -26,11 +26,12 @@ macro(contain_test test_name) COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/${test_name}-folders/TMPDIR ) + string(REPLACE ${executable} ";" " " executable) 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} + --args ${executable} DEPENDS "contain-${test_name}" ) @@ -40,7 +41,7 @@ macro(contain_test test_name) --show-possibly-lost=no --undef-value-errors=yes --track-origins=yes - ${CMAKE_BINARY_DIR}/tests/${UNIT} + ${executable} DEPENDS "contain-${test_name}" ) @@ -48,7 +49,7 @@ macro(contain_test test_name) COMMAND env ${TEST_ENV} valgrind --tool=callgrind --callgrind-out-file=${UNIT}.callgrind - ${CMAKE_BINARY_DIR}/tests/${UNIT} + ${executable} DEPENDS "contain-${test_name}" ) endmacro(contain_test) |