Merge lp:~compiz-team/compiz/compiz.compiz_discover_tests into lp:compiz/0.9.8
- compiz.compiz_discover_tests
- Merge into 0.9.8
Status: | Superseded |
---|---|
Proposed branch: | lp:~compiz-team/compiz/compiz.compiz_discover_tests |
Merge into: | lp:compiz/0.9.8 |
Diff against target: |
427 lines (+163/-33) 29 files modified
cmake/CMakeLists.txt (+9/-0) cmake/CompizCommon.cmake (+15/-0) cmake/src/CMakeLists.txt (+1/-0) cmake/src/compiz/CMakeLists.txt (+6/-0) cmake/src/compiz/compiz_discover_gtest_tests.cpp (+99/-0) compizconfig/libcompizconfig/tests/CMakeLists.txt (+4/-4) plugins/composite/src/pixmapbinding/tests/CMakeLists.txt (+1/-1) plugins/decor/src/clip-groups/tests/CMakeLists.txt (+1/-1) plugins/decor/src/pixmap-requests/tests/CMakeLists.txt (+1/-1) plugins/grid/src/grabhandler/tests/CMakeLists.txt (+1/-1) plugins/place/src/constrain-to-workarea/tests/CMakeLists.txt (+1/-1) plugins/place/src/screen-size-change/tests/CMakeLists.txt (+1/-1) plugins/place/src/smart/tests/CMakeLists.txt (+1/-1) plugins/wall/src/offset_movement/tests/CMakeLists.txt (+1/-1) src/option/tests/CMakeLists.txt (+1/-1) src/plugin/tests/CMakeLists.txt (+1/-1) src/pluginclasshandler/tests/CMakeLists.txt (+3/-3) src/point/tests/CMakeLists.txt (+1/-1) src/privatescreen/tests/CMakeLists.txt (+1/-1) src/rect/tests/CMakeLists.txt (+2/-2) src/region/tests/CMakeLists.txt (+1/-1) src/servergrab/tests/CMakeLists.txt (+1/-1) src/string/tests/CMakeLists.txt (+1/-1) src/timer/tests/CMakeLists.txt (+4/-4) src/window/constrainment/tests/CMakeLists.txt (+1/-1) src/window/extents/tests/CMakeLists.txt (+1/-1) src/window/geometry-saver/tests/CMakeLists.txt (+1/-1) src/window/geometry/tests/CMakeLists.txt (+1/-1) src/wrapsystem/tests/CMakeLists.txt (+1/-1) |
To merge this branch: | bzr merge lp:~compiz-team/compiz/compiz.compiz_discover_tests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel van Vugt | Needs Fixing | ||
Review via email: mp+113324@code.launchpad.net |
This proposal supersedes a proposal from 2012-07-03.
This proposal has been superseded by a proposal from 2012-07-05.
Commit message
Description of the change
Added compiz_
gtest_add_tests is good for the basic Google Test usage, but its source
based scanning falls short in a couple of areas - namely it requires that
there be no space between TEST* and ( and it also does not work for templated
tests.
compiz_
of --gtest_list_tests and adds those at make-time to the CTestTestfile.cmake
in the current binary directory. This allows us to correctly introspect the test
binary and get /all/ the tests regardless of the source file.
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal | # |
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal | # |
CMake Error: Error in cmake code at
/home/dan/
Parse error. Expected a newline, got identifier with text "INCLUDE".
CMake Error at /home/dan/
subdirs Could not find include file:
/home/
Call Stack (most recent call first):
/home/
CTestTestfile
CMake Error: Error in cmake code at
/home/dan/
Parse error. Expected a newline, got identifier with text "INCLUDE".
CMake Error at /home/dan/
subdirs Could not find include file:
/home/
Call Stack (most recent call first):
/home/
CTestTestfile
CMake Error: Error in cmake code at
/home/dan/
Parse error. Expected a newline, got identifier with text "INCLUDE".
CMake Error at /home/dan/
subdirs Could not find include file:
/home/
Call Stack (most recent call first):
/home/
CTestTestfile
CMake Error: Error in cmake code at
/home/dan/
Parse error. Expected a newline, got identifier with text "INCLUDE".
CMake Error at /home/dan/
subdirs Could not find include file:
/home/
Call Stack (most recent call first):
/home/
CTestTestfile
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal | # |
Okay, thanks I'll look into that.
(Strangely ctest -D ExperimentalMem
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal | # |
Fixed the small error when handling more than two tests defined in one CMakeLists.txt . thanks for spotting that.
Daniel van Vugt (vanvugt) : Posted in a previous version of this proposal | # |
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal | # |
This file gets installed:
src/
I would suggest not installing it while it's new, possibly subject to change and not used outside of lp:compiz.
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal | # |
Ah. The reason im installing it is so that external plugins can use it (sinilar to gtest)
Sent from Samsung Mobile
Daniel van Vugt <email address hidden> wrote:
Review: Needs Fixing
This file gets installed:
src/
I would suggest not installing it while it's new, possibly subject to change and not used outside of lp:compiz.
--
https:/
Your team Compiz Maintainers is subscribed to branch lp:compiz.
Daniel van Vugt (vanvugt) wrote : Posted in a previous version of this proposal | # |
Nice idea, but while it's new I think it should be private. So we can change it at will, for a while.
Sam Spilsbury (smspillaz) wrote : Posted in a previous version of this proposal | # |
Okay, I've made it not install to anywhere for now. When its ready, we can still freely make changes - other projects that build it locally will just rebuild it when it changes.
- 3277. By Sam Spilsbury
-
Remove the wrappers. They are not necessary like I originally thought
Sam Spilsbury (smspillaz) wrote : | # |
The wrappers weren't necessary, so I removed them (thanks Alan for spotting that!)
Daniel van Vugt (vanvugt) wrote : | # |
'make test' now passes so quickly that it can't possibly be running tests (0.8 sec for 119 tests).
- 3278. By Sam Spilsbury
-
Format the "" correctly so that the tests actually run
Sam Spilsbury (smspillaz) wrote : | # |
thanks, was a bug in the formatting code. fixed.
Unmerged revisions
Preview Diff
1 | === modified file 'cmake/CMakeLists.txt' | |||
2 | --- cmake/CMakeLists.txt 2012-05-24 00:55:17 +0000 | |||
3 | +++ cmake/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
4 | @@ -32,3 +32,12 @@ | |||
5 | 32 | FILES ${_PluginExtensionFiles} | 32 | FILES ${_PluginExtensionFiles} |
6 | 33 | DESTINATION ${CMAKE_INSTALL_PREFIX}/share/compiz/cmake/plugin_extensions | 33 | DESTINATION ${CMAKE_INSTALL_PREFIX}/share/compiz/cmake/plugin_extensions |
7 | 34 | ) | 34 | ) |
8 | 35 | |||
9 | 36 | # Do not install src/compiz for a while until we've polished it up | ||
10 | 37 | |||
11 | 38 | #install (DIRECTORY src/compiz | ||
12 | 39 | # DESTINATION ${CMAKE_INSTALL_PREFIX}/src) | ||
13 | 40 | |||
14 | 41 | if (COMPIZ_BUILD_TESTING) | ||
15 | 42 | add_subdirectory (src) | ||
16 | 43 | endif (COMPIZ_BUILD_TESTING) | ||
17 | 35 | 44 | ||
18 | === modified file 'cmake/CompizCommon.cmake' | |||
19 | --- cmake/CompizCommon.cmake 2012-05-24 06:48:55 +0000 | |||
20 | +++ cmake/CompizCommon.cmake 2012-07-05 05:37:21 +0000 | |||
21 | @@ -70,6 +70,21 @@ | |||
22 | 70 | set(IS_BZR_REPO 0) | 70 | set(IS_BZR_REPO 0) |
23 | 71 | endif (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.bzr) | 71 | endif (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.bzr) |
24 | 72 | 72 | ||
25 | 73 | # Create target to discover tests | ||
26 | 74 | function (compiz_discover_tests EXECUTABLE) | ||
27 | 75 | |||
28 | 76 | add_dependencies (${EXECUTABLE} | ||
29 | 77 | compiz_discover_gtest_tests) | ||
30 | 78 | |||
31 | 79 | add_custom_command (TARGET ${EXECUTABLE} | ||
32 | 80 | POST_BUILD | ||
33 | 81 | COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE} --gtest_list_tests | ${CMAKE_BINARY_DIR}/compiz_gtest/compiz_discover_gtest_tests ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE} | ||
34 | 82 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
35 | 83 | COMMENT "Discovering Tests in ${EXECUTABLE}" | ||
36 | 84 | DEPENDS | ||
37 | 85 | VERBATIM) | ||
38 | 86 | endfunction () | ||
39 | 87 | |||
40 | 73 | function (compiz_ensure_linkage) | 88 | function (compiz_ensure_linkage) |
41 | 74 | find_program (LDCONFIG_EXECUTABLE ldconfig) | 89 | find_program (LDCONFIG_EXECUTABLE ldconfig) |
42 | 75 | mark_as_advanced (FORCE LDCONFIG_EXECUTABLE) | 90 | mark_as_advanced (FORCE LDCONFIG_EXECUTABLE) |
43 | 76 | 91 | ||
44 | === added directory 'cmake/src' | |||
45 | === added file 'cmake/src/CMakeLists.txt' | |||
46 | --- cmake/src/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
47 | +++ cmake/src/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
48 | @@ -0,0 +1,1 @@ | |||
49 | 1 | add_subdirectory (compiz) | ||
50 | 0 | 2 | ||
51 | === added directory 'cmake/src/compiz' | |||
52 | === added file 'cmake/src/compiz/CMakeLists.txt' | |||
53 | --- cmake/src/compiz/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
54 | +++ cmake/src/compiz/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
55 | @@ -0,0 +1,6 @@ | |||
56 | 1 | add_executable (compiz_discover_gtest_tests | ||
57 | 2 | EXCLUDE_FROM_ALL | ||
58 | 3 | ${CMAKE_CURRENT_SOURCE_DIR}/compiz_discover_gtest_tests.cpp) | ||
59 | 4 | |||
60 | 5 | set_target_properties (compiz_discover_gtest_tests PROPERTIES | ||
61 | 6 | RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/compiz_gtest) | ||
62 | 0 | 7 | ||
63 | === added file 'cmake/src/compiz/compiz_discover_gtest_tests.cpp' | |||
64 | --- cmake/src/compiz/compiz_discover_gtest_tests.cpp 1970-01-01 00:00:00 +0000 | |||
65 | +++ cmake/src/compiz/compiz_discover_gtest_tests.cpp 2012-07-05 05:37:21 +0000 | |||
66 | @@ -0,0 +1,99 @@ | |||
67 | 1 | #include <map> | ||
68 | 2 | #include <vector> | ||
69 | 3 | #include <string> | ||
70 | 4 | #include <istream> | ||
71 | 5 | #include <ostream> | ||
72 | 6 | #include <fstream> | ||
73 | 7 | #include <iterator> | ||
74 | 8 | #include <iostream> | ||
75 | 9 | #include <libgen.h> | ||
76 | 10 | |||
77 | 11 | using namespace std; | ||
78 | 12 | |||
79 | 13 | int main (int argc, char **argv) | ||
80 | 14 | { | ||
81 | 15 | cin >> noskipws; | ||
82 | 16 | |||
83 | 17 | if (argc < 2) | ||
84 | 18 | { | ||
85 | 19 | cout << "Usage: PATH_TO_TEST_BINARY --gtest_list_tests | ./build_test_cases PATH_TO_TEST_BINARY"; | ||
86 | 20 | return 1; | ||
87 | 21 | } | ||
88 | 22 | |||
89 | 23 | map<string, vector<string> > testCases; | ||
90 | 24 | string line; | ||
91 | 25 | string currentTestCase; | ||
92 | 26 | |||
93 | 27 | while (getline (cin, line)) | ||
94 | 28 | { | ||
95 | 29 | /* Is test case */ | ||
96 | 30 | if (line.find (" ") == 0) | ||
97 | 31 | testCases[currentTestCase].push_back (currentTestCase + line.substr (2)); | ||
98 | 32 | else | ||
99 | 33 | currentTestCase = line; | ||
100 | 34 | |||
101 | 35 | } | ||
102 | 36 | |||
103 | 37 | ofstream testfilecmake; | ||
104 | 38 | char *base = basename (argv[1]); | ||
105 | 39 | string gtestName (base); | ||
106 | 40 | |||
107 | 41 | testfilecmake.open (string (gtestName + "_test.cmake").c_str (), ios::out | ios::trunc); | ||
108 | 42 | |||
109 | 43 | if (testfilecmake.is_open ()) | ||
110 | 44 | { | ||
111 | 45 | for (map <string, vector<string> >::iterator it = testCases.begin (); | ||
112 | 46 | it != testCases.end (); it++) | ||
113 | 47 | { | ||
114 | 48 | for (vector <string>::iterator jt = it->second.begin (); | ||
115 | 49 | jt != it->second.end (); jt++) | ||
116 | 50 | { | ||
117 | 51 | if (testfilecmake.good ()) | ||
118 | 52 | { | ||
119 | 53 | string addTest ("ADD_TEST ("); | ||
120 | 54 | string testExec (" \"" + string (argv[1]) + "\""); | ||
121 | 55 | string gTestFilter ("\"--gtest_filter="); | ||
122 | 56 | string endParen ("\")"); | ||
123 | 57 | |||
124 | 58 | testfilecmake << addTest << *jt << testExec << gTestFilter << *jt << endParen << endl; | ||
125 | 59 | } | ||
126 | 60 | } | ||
127 | 61 | } | ||
128 | 62 | |||
129 | 63 | testfilecmake.close (); | ||
130 | 64 | } | ||
131 | 65 | |||
132 | 66 | ifstream CTestTestfile ("CTestTestfile.cmake", ifstream::in); | ||
133 | 67 | bool needsInclude = true; | ||
134 | 68 | line.clear (); | ||
135 | 69 | |||
136 | 70 | string includeLine = string ("INCLUDE (") + | ||
137 | 71 | gtestName + | ||
138 | 72 | string ("_test.cmake)"); | ||
139 | 73 | |||
140 | 74 | if (CTestTestfile.is_open ()) | ||
141 | 75 | { | ||
142 | 76 | while (CTestTestfile.good ()) | ||
143 | 77 | { | ||
144 | 78 | getline (CTestTestfile, line); | ||
145 | 79 | |||
146 | 80 | if (line == includeLine) | ||
147 | 81 | needsInclude = false; | ||
148 | 82 | } | ||
149 | 83 | |||
150 | 84 | CTestTestfile.close (); | ||
151 | 85 | } | ||
152 | 86 | |||
153 | 87 | if (needsInclude) | ||
154 | 88 | { | ||
155 | 89 | ofstream CTestTestfileW ("CTestTestfile.cmake", ofstream::app | ofstream::out); | ||
156 | 90 | |||
157 | 91 | if (CTestTestfileW.is_open ()) | ||
158 | 92 | { | ||
159 | 93 | CTestTestfileW << includeLine << endl; | ||
160 | 94 | CTestTestfileW.close (); | ||
161 | 95 | } | ||
162 | 96 | } | ||
163 | 97 | |||
164 | 98 | return 0; | ||
165 | 99 | } | ||
166 | 0 | 100 | ||
167 | === modified file 'compizconfig/libcompizconfig/tests/CMakeLists.txt' | |||
168 | --- compizconfig/libcompizconfig/tests/CMakeLists.txt 2012-06-26 12:22:35 +0000 | |||
169 | +++ compizconfig/libcompizconfig/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
170 | @@ -94,7 +94,7 @@ | |||
171 | 94 | plugin-mock | 94 | plugin-mock |
172 | 95 | setting-mock) | 95 | setting-mock) |
173 | 96 | 96 | ||
178 | 97 | gtest_add_tests (test-ccs-object "" ${CMAKE_CURRENT_SOURCE_DIR}/test-ccs-object.cpp) | 97 | compiz_discover_tests (test-ccs-object) |
179 | 98 | gtest_add_tests (test-context "" ${CMAKE_CURRENT_SOURCE_DIR}/test-context.cpp) | 98 | compiz_discover_tests (test-context) |
180 | 99 | gtest_add_tests (test-plugin "" ${CMAKE_CURRENT_SOURCE_DIR}/test-plugin.cpp) | 99 | compiz_discover_tests (test-plugin) |
181 | 100 | gtest_add_tests (test-setting "" ${CMAKE_CURRENT_SOURCE_DIR}/test-setting.cpp) | 100 | compiz_discover_tests (test-setting) |
182 | 101 | 101 | ||
183 | === modified file 'plugins/composite/src/pixmapbinding/tests/CMakeLists.txt' | |||
184 | --- plugins/composite/src/pixmapbinding/tests/CMakeLists.txt 2012-05-31 07:15:37 +0000 | |||
185 | +++ plugins/composite/src/pixmapbinding/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
186 | @@ -21,4 +21,4 @@ | |||
187 | 21 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 21 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
188 | 22 | ) | 22 | ) |
189 | 23 | 23 | ||
191 | 24 | gtest_add_tests (compiz_test_composite_pixmapbinding "" ${CMAKE_CURRENT_SOURCE_DIR}/test-composite-pixmapbinding.cpp) | 24 | compiz_discover_tests (compiz_test_composite_pixmapbinding) |
192 | 25 | 25 | ||
193 | === modified file 'plugins/decor/src/clip-groups/tests/CMakeLists.txt' | |||
194 | --- plugins/decor/src/clip-groups/tests/CMakeLists.txt 2012-03-30 16:06:07 +0000 | |||
195 | +++ plugins/decor/src/clip-groups/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
196 | @@ -11,4 +11,4 @@ | |||
197 | 11 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 11 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
198 | 12 | ) | 12 | ) |
199 | 13 | 13 | ||
201 | 14 | gtest_add_tests (compiz_test_decor_clip_groups "" ${CMAKE_CURRENT_SOURCE_DIR}/clip-groups/src/test-decor-clip-groups.cpp) | 14 | compiz_discover_tests (compiz_test_decor_clip_groups) |
202 | 15 | 15 | ||
203 | === modified file 'plugins/decor/src/pixmap-requests/tests/CMakeLists.txt' | |||
204 | --- plugins/decor/src/pixmap-requests/tests/CMakeLists.txt 2012-05-10 15:40:25 +0000 | |||
205 | +++ plugins/decor/src/pixmap-requests/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
206 | @@ -12,4 +12,4 @@ | |||
207 | 12 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 12 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
208 | 13 | ) | 13 | ) |
209 | 14 | 14 | ||
211 | 15 | gtest_add_tests (compiz_test_decor_pixmap_requests "" ${CMAKE_CURRENT_SOURCE_DIR}/pixmap-requests/src/test-decor-pixmap-requests.cpp) | 15 | compiz_discover_tests (compiz_test_decor_pixmap_requests) |
212 | 16 | 16 | ||
213 | === modified file 'plugins/grid/src/grabhandler/tests/CMakeLists.txt' | |||
214 | --- plugins/grid/src/grabhandler/tests/CMakeLists.txt 2012-05-28 06:48:42 +0000 | |||
215 | +++ plugins/grid/src/grabhandler/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
216 | @@ -21,4 +21,4 @@ | |||
217 | 21 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 21 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
218 | 22 | ) | 22 | ) |
219 | 23 | 23 | ||
221 | 24 | gtest_add_tests (compiz_test_grid_grabhandler "" ${CMAKE_CURRENT_SOURCE_DIR}/test-grid-grab-handler.cpp) | 24 | compiz_discover_tests (compiz_test_grid_grabhandler) |
222 | 25 | 25 | ||
223 | === modified file 'plugins/place/src/constrain-to-workarea/tests/CMakeLists.txt' | |||
224 | --- plugins/place/src/constrain-to-workarea/tests/CMakeLists.txt 2012-03-30 16:30:13 +0000 | |||
225 | +++ plugins/place/src/constrain-to-workarea/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
226 | @@ -15,4 +15,4 @@ | |||
227 | 15 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 15 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
228 | 16 | ) | 16 | ) |
229 | 17 | 17 | ||
231 | 18 | gtest_add_tests (compiz_test_place_constrain_to_workarea "" ${CMAKE_CURRENT_SOURCE_DIR}/constrain-to-workarea/src/test-place-constrain-to-workarea.cpp) | 18 | compiz_discover_tests (compiz_test_place_constrain_to_workarea) |
232 | 19 | 19 | ||
233 | === modified file 'plugins/place/src/screen-size-change/tests/CMakeLists.txt' | |||
234 | --- plugins/place/src/screen-size-change/tests/CMakeLists.txt 2012-03-30 16:30:13 +0000 | |||
235 | +++ plugins/place/src/screen-size-change/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
236 | @@ -15,4 +15,4 @@ | |||
237 | 15 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 15 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
238 | 16 | ) | 16 | ) |
239 | 17 | 17 | ||
241 | 18 | gtest_add_tests (compiz_test_place_screen_size_change "" ${CMAKE_CURRENT_SOURCE_DIR}/screen-size-change/src/test-place-screen-size-change.cpp) | 18 | compiz_discover_tests (compiz_test_place_screen_size_change) |
242 | 19 | 19 | ||
243 | === modified file 'plugins/place/src/smart/tests/CMakeLists.txt' | |||
244 | --- plugins/place/src/smart/tests/CMakeLists.txt 2012-03-30 16:30:13 +0000 | |||
245 | +++ plugins/place/src/smart/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
246 | @@ -11,4 +11,4 @@ | |||
247 | 11 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 11 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
248 | 12 | ) | 12 | ) |
249 | 13 | 13 | ||
251 | 14 | gtest_add_tests (compiz_test_place_smart_on_screen "" ${CMAKE_CURRENT_SOURCE_DIR}/offscreen/src/test-place-smart-on-screen.cpp) | 14 | compiz_discover_tests (compiz_test_place_smart_on_screen) |
252 | 15 | 15 | ||
253 | === modified file 'plugins/wall/src/offset_movement/tests/CMakeLists.txt' | |||
254 | --- plugins/wall/src/offset_movement/tests/CMakeLists.txt 2012-05-21 06:43:20 +0000 | |||
255 | +++ plugins/wall/src/offset_movement/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
256 | @@ -21,4 +21,4 @@ | |||
257 | 21 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 21 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
258 | 22 | ) | 22 | ) |
259 | 23 | 23 | ||
261 | 24 | gtest_add_tests (compiz_test_wall_offset_movement "" ${CMAKE_CURRENT_SOURCE_DIR}/test-wall-offset-movement.cpp) | 24 | compiz_discover_tests (compiz_test_wall_offset_movement) |
262 | 25 | 25 | ||
263 | === modified file 'src/option/tests/CMakeLists.txt' | |||
264 | --- src/option/tests/CMakeLists.txt 2012-05-21 06:43:20 +0000 | |||
265 | +++ src/option/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
266 | @@ -28,4 +28,4 @@ | |||
267 | 28 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 28 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
268 | 29 | ) | 29 | ) |
269 | 30 | 30 | ||
271 | 31 | gtest_add_tests( compiz_option_test "" ${CMAKE_CURRENT_SOURCE_DIR}/option.cpp ) | 31 | compiz_discover_tests ( compiz_option_test ) |
272 | 32 | 32 | ||
273 | === modified file 'src/plugin/tests/CMakeLists.txt' | |||
274 | --- src/plugin/tests/CMakeLists.txt 2012-06-24 09:00:27 +0000 | |||
275 | +++ src/plugin/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
276 | @@ -32,5 +32,5 @@ | |||
277 | 32 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 32 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
278 | 33 | ) | 33 | ) |
279 | 34 | 34 | ||
281 | 35 | env_gtest_add_tests( compiz_plugin_test "" ${CMAKE_CURRENT_SOURCE_DIR}/test-plugin.cpp ) | 35 | compiz_discover_tests ( compiz_plugin_test ) |
282 | 36 | 36 | ||
283 | 37 | 37 | ||
284 | === modified file 'src/pluginclasshandler/tests/CMakeLists.txt' | |||
285 | --- src/pluginclasshandler/tests/CMakeLists.txt 2012-03-30 16:30:13 +0000 | |||
286 | +++ src/pluginclasshandler/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
287 | @@ -74,8 +74,8 @@ | |||
288 | 74 | # gtest_main | 74 | # gtest_main |
289 | 75 | #) | 75 | #) |
290 | 76 | 76 | ||
293 | 77 | gtest_add_tests( compiz_pch_construct "" ${CMAKE_CURRENT_SOURCE_DIR}/construct/src/test-pch-construct.cpp ) | 77 | compiz_discover_tests (compiz_pch_construct) |
294 | 78 | gtest_add_tests( compiz_pch_get "" ${CMAKE_CURRENT_SOURCE_DIR}/get/src/test-pch-get.cpp ) | 78 | compiz_discover_tests (compiz_pch_get) |
295 | 79 | #add_test( compiz_pch_indexes compiz_pch_indexes ) | 79 | #add_test( compiz_pch_indexes compiz_pch_indexes ) |
297 | 80 | gtest_add_tests( compiz_pch_typenames "" ${CMAKE_CURRENT_SOURCE_DIR}/typenames/src/test-pch-typenames.cpp ) | 80 | compiz_discover_tests (compiz_pch_typenames) |
298 | 81 | 81 | ||
299 | 82 | 82 | ||
300 | === modified file 'src/point/tests/CMakeLists.txt' | |||
301 | --- src/point/tests/CMakeLists.txt 2012-03-30 16:30:13 +0000 | |||
302 | +++ src/point/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
303 | @@ -15,4 +15,4 @@ | |||
304 | 15 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 15 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
305 | 16 | ) | 16 | ) |
306 | 17 | 17 | ||
308 | 18 | gtest_add_tests (compiz_test_point "" ${CMAKE_CURRENT_SOURCE_DIR}/point/src/test-point.cpp) | 18 | compiz_discover_tests (compiz_test_point) |
309 | 19 | 19 | ||
310 | === modified file 'src/privatescreen/tests/CMakeLists.txt' | |||
311 | --- src/privatescreen/tests/CMakeLists.txt 2012-06-24 09:00:27 +0000 | |||
312 | +++ src/privatescreen/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
313 | @@ -53,4 +53,4 @@ | |||
314 | 53 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 53 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
315 | 54 | ) | 54 | ) |
316 | 55 | 55 | ||
318 | 56 | env_gtest_add_tests( compiz_privatescreen_test "" ${CMAKE_CURRENT_SOURCE_DIR}/test-privatescreen.cpp ) | 56 | compiz_discover_tests (compiz_privatescreen_test) |
319 | 57 | 57 | ||
320 | === modified file 'src/rect/tests/CMakeLists.txt' | |||
321 | --- src/rect/tests/CMakeLists.txt 2012-03-30 16:30:13 +0000 | |||
322 | +++ src/rect/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
323 | @@ -27,5 +27,5 @@ | |||
324 | 27 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 27 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
325 | 28 | ) | 28 | ) |
326 | 29 | 29 | ||
329 | 30 | gtest_add_tests (compiz_test_rect "" ${CMAKE_CURRENT_SOURCE_DIR}/rect/src/test-rect.cpp) | 30 | compiz_discover_tests (compiz_test_rect) |
330 | 31 | gtest_add_tests (compiz_test_rect_wraparound_point "" ${CMAKE_CURRENT_SOURCE_DIR}/wraparound_point/src/test-rect-wraparound-point.cpp) | 31 | compiz_discover_tests (compiz_test_rect_wraparound_point) |
331 | 32 | 32 | ||
332 | === modified file 'src/region/tests/CMakeLists.txt' | |||
333 | --- src/region/tests/CMakeLists.txt 2012-05-21 06:43:20 +0000 | |||
334 | +++ src/region/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
335 | @@ -33,4 +33,4 @@ | |||
336 | 33 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 33 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
337 | 34 | ) | 34 | ) |
338 | 35 | 35 | ||
340 | 36 | gtest_add_tests( compiz_region_test "" ${CMAKE_CURRENT_SOURCE_DIR}/test-region.cpp ) | 36 | compiz_discover_tests (compiz_region_test) |
341 | 37 | 37 | ||
342 | === modified file 'src/servergrab/tests/CMakeLists.txt' | |||
343 | --- src/servergrab/tests/CMakeLists.txt 2012-05-28 07:53:38 +0000 | |||
344 | +++ src/servergrab/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
345 | @@ -11,4 +11,4 @@ | |||
346 | 11 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 11 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
347 | 12 | ) | 12 | ) |
348 | 13 | 13 | ||
350 | 14 | gtest_add_tests (compiz_test_servergrab "" ${CMAKE_CURRENT_SOURCE_DIR}/test-servergrab.cpp) | 14 | compiz_discover_tests (compiz_test_servergrab) |
351 | 15 | 15 | ||
352 | === modified file 'src/string/tests/CMakeLists.txt' | |||
353 | --- src/string/tests/CMakeLists.txt 2012-03-30 16:30:13 +0000 | |||
354 | +++ src/string/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
355 | @@ -17,4 +17,4 @@ | |||
356 | 17 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 17 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
357 | 18 | ) | 18 | ) |
358 | 19 | 19 | ||
360 | 20 | gtest_add_tests( compiz_string_test "" ${CMAKE_CURRENT_SOURCE_DIR}/printf/src/test-string-printf.cpp ) | 20 | compiz_discover_tests (compiz_string_test) |
361 | 21 | 21 | ||
362 | === modified file 'src/timer/tests/CMakeLists.txt' | |||
363 | --- src/timer/tests/CMakeLists.txt 2012-03-30 16:30:13 +0000 | |||
364 | +++ src/timer/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
365 | @@ -51,7 +51,7 @@ | |||
366 | 51 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 51 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
367 | 52 | ) | 52 | ) |
368 | 53 | 53 | ||
373 | 54 | gtest_add_tests (compiz_timer_callbacks "" ${CMAKE_CURRENT_SOURCE_DIR}/callbacks/src/test-timer-callbacks.cpp) | 54 | compiz_discover_tests (compiz_timer_callbacks) |
374 | 55 | gtest_add_tests (compiz_timer_diffs "" ${CMAKE_CURRENT_SOURCE_DIR}/diffs/src/test-timer-diffs.cpp) | 55 | compiz_discover_tests (compiz_timer_diffs) |
375 | 56 | gtest_add_tests (compiz_timer_set-values "" ${CMAKE_CURRENT_SOURCE_DIR}/set-values/src/test-timer-set-values.cpp) | 56 | compiz_discover_tests (compiz_timer_set-values) |
376 | 57 | gtest_add_tests (compiz_timer_while-calling "" ${CMAKE_CURRENT_SOURCE_DIR}/while-calling/src/test-timer-set-times-while-calling.cpp) | 57 | compiz_discover_tests (compiz_timer_while-calling) |
377 | 58 | 58 | ||
378 | === modified file 'src/window/constrainment/tests/CMakeLists.txt' | |||
379 | --- src/window/constrainment/tests/CMakeLists.txt 2012-03-30 16:30:13 +0000 | |||
380 | +++ src/window/constrainment/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
381 | @@ -16,4 +16,4 @@ | |||
382 | 16 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 16 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
383 | 17 | ) | 17 | ) |
384 | 18 | 18 | ||
386 | 19 | gtest_add_tests ( compiz_test_window_constrainment_to_hints "" ${CMAKE_CURRENT_SOURCE_DIR}/to-hints/src/test-window-constrainment-to-hints.cpp) | 19 | compiz_discover_tests (compiz_test_window_constrainment_to_hints) |
387 | 20 | 20 | ||
388 | === modified file 'src/window/extents/tests/CMakeLists.txt' | |||
389 | --- src/window/extents/tests/CMakeLists.txt 2012-03-30 16:30:13 +0000 | |||
390 | +++ src/window/extents/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
391 | @@ -15,4 +15,4 @@ | |||
392 | 15 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 15 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
393 | 16 | ) | 16 | ) |
394 | 17 | 17 | ||
396 | 18 | gtest_add_tests (compiz_test_window_extents_shift "" ${CMAKE_CURRENT_SOURCE_DIR}/shift/src/test-window-extents-shift.cpp) | 18 | compiz_discover_tests (compiz_test_window_extents_shift) |
397 | 19 | 19 | ||
398 | === modified file 'src/window/geometry-saver/tests/CMakeLists.txt' | |||
399 | --- src/window/geometry-saver/tests/CMakeLists.txt 2012-03-30 16:30:13 +0000 | |||
400 | +++ src/window/geometry-saver/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
401 | @@ -15,4 +15,4 @@ | |||
402 | 15 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 15 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
403 | 16 | ) | 16 | ) |
404 | 17 | 17 | ||
406 | 18 | gtest_add_tests (compiz_test_window_geometry_saver "" ${CMAKE_CURRENT_SOURCE_DIR}/window-geometry-saver/src/test-window-geometry-saver.cpp) | 18 | compiz_discover_tests (compiz_test_window_geometry_saver) |
407 | 19 | 19 | ||
408 | === modified file 'src/window/geometry/tests/CMakeLists.txt' | |||
409 | --- src/window/geometry/tests/CMakeLists.txt 2012-03-30 16:30:13 +0000 | |||
410 | +++ src/window/geometry/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
411 | @@ -15,4 +15,4 @@ | |||
412 | 15 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 15 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
413 | 16 | ) | 16 | ) |
414 | 17 | 17 | ||
416 | 18 | gtest_add_tests (compiz_test_window_geometry "" ${CMAKE_CURRENT_SOURCE_DIR}/window-geometry/src/test-window-geometry.cpp) | 18 | compiz_discover_tests (compiz_test_window_geometry) |
417 | 19 | 19 | ||
418 | === modified file 'src/wrapsystem/tests/CMakeLists.txt' | |||
419 | --- src/wrapsystem/tests/CMakeLists.txt 2012-05-21 08:58:41 +0000 | |||
420 | +++ src/wrapsystem/tests/CMakeLists.txt 2012-07-05 05:37:21 +0000 | |||
421 | @@ -15,4 +15,4 @@ | |||
422 | 15 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. | 15 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
423 | 16 | ) | 16 | ) |
424 | 17 | 17 | ||
426 | 18 | gtest_add_tests (${CMAKE_CURRENT_BINARY_DIR}/compiz_wrapsystem_test "" "test-wrapsystem.cpp") | 18 | compiz_discover_tests (compiz_wrapsystem_test) |
427 | 19 | \ No newline at end of file | 19 | \ No newline at end of file |
'make ExperimentalMem Check' now spits out cmake errors before running test cases.
Also, compiz_ discover_ gtest_tests. cpp seems to over-use 'std::'. Maybe put 'using namespace std' at the top and then remove 'std::' everywhere.