Merge lp:~kalikiana/midori/cmake-debug-targets into lp:~tuxator/midori/cmake-debug-targets

Proposed by Cris Dywan
Status: Merged
Approved by: Paweł Forysiuk
Approved revision: 6424
Merged at revision: 6424
Proposed branch: lp:~kalikiana/midori/cmake-debug-targets
Merge into: lp:~tuxator/midori/cmake-debug-targets
Diff against target: 62 lines (+23/-20)
2 files modified
cmake/ContainTest.cmake (+23/-0)
tests/CMakeLists.txt (+0/-20)
To merge this branch: bzr merge lp:~kalikiana/midori/cmake-debug-targets
Reviewer Review Type Date Requested Status
Paweł Forysiuk Approve
Review via email: mp+188724@code.launchpad.net

Commit message

Set contained environment on tests running under tools

To post a comment you must log in.
Revision history for this message
Paweł Forysiuk (tuxator) wrote :

Very nice! Thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cmake/ContainTest.cmake'
2--- cmake/ContainTest.cmake 2013-08-19 00:10:08 +0000
3+++ cmake/ContainTest.cmake 2013-10-01 21:41:13 +0000
4@@ -15,4 +15,27 @@
5 TIMEOUT 42
6 ENVIRONMENT "${TEST_ENV}"
7 )
8+
9+ add_custom_target("gdb-${test_name}"
10+ COMMAND env ${TEST_ENV} gdb
11+ --batch -ex 'set print thread-events off'
12+ -ex 'run' -ex 'bt'
13+ ${CMAKE_BINARY_DIR}/tests/${UNIT}
14+ )
15+
16+ add_custom_target("valgrind-${test_name}"
17+ COMMAND env ${TEST_ENV} valgrind
18+ -q --leak-check=no --num-callers=4
19+ --show-possibly-lost=no
20+ --undef-value-errors=yes
21+ --track-origins=yes
22+ ${CMAKE_BINARY_DIR}/tests/${UNIT}
23+ )
24+
25+ add_custom_target("callgrind-${test_name}"
26+ COMMAND env ${TEST_ENV} valgrind
27+ --tool=callgrind
28+ --callgrind-out-file=${UNIT}.callgrind
29+ ${CMAKE_BINARY_DIR}/tests/${UNIT}
30+ )
31 endmacro(contain_test)
32
33=== modified file 'tests/CMakeLists.txt'
34--- tests/CMakeLists.txt 2013-09-30 21:14:58 +0000
35+++ tests/CMakeLists.txt 2013-10-01 21:41:13 +0000
36@@ -47,26 +47,6 @@
37 )
38 add_test(NAME ${UNIT} COMMAND ${UNIT})
39 contain_test (${UNIT})
40-
41- add_custom_target(gdb-${UNIT}
42- COMMAND gdb
43- --batch -ex 'set print thread-events off'
44- -ex 'run' -ex 'bt'
45- ${CMAKE_BINARY_DIR}/tests/${UNIT}
46- )
47- add_custom_target(valgrind-${UNIT}
48- COMMAND valgrind
49- -q --leak-check=no --num-callers=4
50- --show-possibly-lost=no
51- --undef-value-errors=yes
52- --track-origins=yes
53- ${CMAKE_BINARY_DIR}/tests/${UNIT}
54- )
55- add_custom_target(callgrind-${UNIT}
56- COMMAND valgrind --tool=callgrind
57- --callgrind-out-file=${UNIT}.callgrind
58- ${CMAKE_BINARY_DIR}/tests/${UNIT}
59- )
60 endforeach ()
61
62 file(GLOB TESTS *.sh)

Subscribers

People subscribed via source and target branches

to all changes: