Merge lp:~dobey/unity-scope-click/check-valgrind into lp:unity-scope-click/devel

Proposed by dobey
Status: Merged
Approved by: Alejandro J. Cura
Approved revision: 256
Merged at revision: 256
Proposed branch: lp:~dobey/unity-scope-click/check-valgrind
Merge into: lp:unity-scope-click/devel
Diff against target: 54 lines (+28/-0)
2 files modified
CMakeLists.txt (+19/-0)
scope/tests/CMakeLists.txt (+9/-0)
To merge this branch: bzr merge lp:~dobey/unity-scope-click/check-valgrind
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+219609@code.launchpad.net

Commit message

Add rules for running the unit tests under valgrind.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alejandro J. Cura (alecu) wrote :

Wonderful

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2014-05-13 19:32:29 +0000
3+++ CMakeLists.txt 2014-05-14 22:01:40 +0000
4@@ -74,6 +74,17 @@
5 DEPENDS test-integration-click-scope
6 )
7
8+# Add a custom target for running the tests under valgrind.
9+add_custom_target (test-valgrind
10+ DEPENDS test-click-scope-valgrind
11+)
12+
13+# Add a custom target for running the tests under valgrind with the
14+# full leak checks enabled.
15+add_custom_target (test-leaks
16+ DEPENDS test-click-scope-leaks
17+)
18+
19 # Also let "make check" and partners work.
20 add_custom_target (check
21 DEPENDS test
22@@ -82,3 +93,11 @@
23 add_custom_target (check-integration
24 DEPENDS test-integration
25 )
26+
27+add_custom_target (check-valgrind
28+ DEPENDS test-valgrind
29+)
30+
31+add_custom_target (check-leaks
32+ DEPENDS test-leaks
33+)
34\ No newline at end of file
35
36=== modified file 'scope/tests/CMakeLists.txt'
37--- scope/tests/CMakeLists.txt 2014-05-13 19:32:29 +0000
38+++ scope/tests/CMakeLists.txt 2014-05-14 22:01:40 +0000
39@@ -61,6 +61,15 @@
40 DEPENDS ${CLICKSCOPE_TESTS_TARGET}
41 )
42
43+add_custom_target(test-click-scope-valgrind
44+ COMMAND valgrind --tool=memcheck ${CMAKE_CURRENT_BINARY_DIR}/${CLICKSCOPE_TESTS_TARGET}
45+ DEPENDS ${CLICKSCOPE_TESTS_TARGET}
46+)
47+
48+add_custom_target(test-click-scope-leaks
49+ COMMAND valgrind --tool=memcheck --track-origins=yes --num-callers=40 --leak-resolution=high --leak-check=full ${CMAKE_CURRENT_BINARY_DIR}/${CLICKSCOPE_TESTS_TARGET}
50+ DEPENDS ${CLICKSCOPE_TESTS_TARGET}
51+)
52 add_custom_target (test-click-scope-disabled
53 COMMAND GTEST_ALSO_RUN_DISABLED_TESTS=1 ${CMAKE_CURRENT_BINARY_DIR}/${CLICKSCOPE_TESTS_TARGET}
54 DEPENDS ${CLICKSCOPE_TESTS_TARGET}

Subscribers

People subscribed via source and target branches

to all changes: