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:
|
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 | FILES ${_PluginExtensionFiles} |
6 | DESTINATION ${CMAKE_INSTALL_PREFIX}/share/compiz/cmake/plugin_extensions |
7 | ) |
8 | + |
9 | +# Do not install src/compiz for a while until we've polished it up |
10 | + |
11 | +#install (DIRECTORY src/compiz |
12 | +# DESTINATION ${CMAKE_INSTALL_PREFIX}/src) |
13 | + |
14 | +if (COMPIZ_BUILD_TESTING) |
15 | + add_subdirectory (src) |
16 | +endif (COMPIZ_BUILD_TESTING) |
17 | |
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 | set(IS_BZR_REPO 0) |
23 | endif (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.bzr) |
24 | |
25 | +# Create target to discover tests |
26 | +function (compiz_discover_tests EXECUTABLE) |
27 | + |
28 | + add_dependencies (${EXECUTABLE} |
29 | + compiz_discover_gtest_tests) |
30 | + |
31 | + add_custom_command (TARGET ${EXECUTABLE} |
32 | + POST_BUILD |
33 | + COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE} --gtest_list_tests | ${CMAKE_BINARY_DIR}/compiz_gtest/compiz_discover_gtest_tests ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE} |
34 | + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} |
35 | + COMMENT "Discovering Tests in ${EXECUTABLE}" |
36 | + DEPENDS |
37 | + VERBATIM) |
38 | +endfunction () |
39 | + |
40 | function (compiz_ensure_linkage) |
41 | find_program (LDCONFIG_EXECUTABLE ldconfig) |
42 | mark_as_advanced (FORCE LDCONFIG_EXECUTABLE) |
43 | |
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 | +add_subdirectory (compiz) |
50 | |
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 | +add_executable (compiz_discover_gtest_tests |
57 | + EXCLUDE_FROM_ALL |
58 | + ${CMAKE_CURRENT_SOURCE_DIR}/compiz_discover_gtest_tests.cpp) |
59 | + |
60 | +set_target_properties (compiz_discover_gtest_tests PROPERTIES |
61 | + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/compiz_gtest) |
62 | |
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 | +#include <map> |
68 | +#include <vector> |
69 | +#include <string> |
70 | +#include <istream> |
71 | +#include <ostream> |
72 | +#include <fstream> |
73 | +#include <iterator> |
74 | +#include <iostream> |
75 | +#include <libgen.h> |
76 | + |
77 | +using namespace std; |
78 | + |
79 | +int main (int argc, char **argv) |
80 | +{ |
81 | + cin >> noskipws; |
82 | + |
83 | + if (argc < 2) |
84 | + { |
85 | + cout << "Usage: PATH_TO_TEST_BINARY --gtest_list_tests | ./build_test_cases PATH_TO_TEST_BINARY"; |
86 | + return 1; |
87 | + } |
88 | + |
89 | + map<string, vector<string> > testCases; |
90 | + string line; |
91 | + string currentTestCase; |
92 | + |
93 | + while (getline (cin, line)) |
94 | + { |
95 | + /* Is test case */ |
96 | + if (line.find (" ") == 0) |
97 | + testCases[currentTestCase].push_back (currentTestCase + line.substr (2)); |
98 | + else |
99 | + currentTestCase = line; |
100 | + |
101 | + } |
102 | + |
103 | + ofstream testfilecmake; |
104 | + char *base = basename (argv[1]); |
105 | + string gtestName (base); |
106 | + |
107 | + testfilecmake.open (string (gtestName + "_test.cmake").c_str (), ios::out | ios::trunc); |
108 | + |
109 | + if (testfilecmake.is_open ()) |
110 | + { |
111 | + for (map <string, vector<string> >::iterator it = testCases.begin (); |
112 | + it != testCases.end (); it++) |
113 | + { |
114 | + for (vector <string>::iterator jt = it->second.begin (); |
115 | + jt != it->second.end (); jt++) |
116 | + { |
117 | + if (testfilecmake.good ()) |
118 | + { |
119 | + string addTest ("ADD_TEST ("); |
120 | + string testExec (" \"" + string (argv[1]) + "\""); |
121 | + string gTestFilter ("\"--gtest_filter="); |
122 | + string endParen ("\")"); |
123 | + |
124 | + testfilecmake << addTest << *jt << testExec << gTestFilter << *jt << endParen << endl; |
125 | + } |
126 | + } |
127 | + } |
128 | + |
129 | + testfilecmake.close (); |
130 | + } |
131 | + |
132 | + ifstream CTestTestfile ("CTestTestfile.cmake", ifstream::in); |
133 | + bool needsInclude = true; |
134 | + line.clear (); |
135 | + |
136 | + string includeLine = string ("INCLUDE (") + |
137 | + gtestName + |
138 | + string ("_test.cmake)"); |
139 | + |
140 | + if (CTestTestfile.is_open ()) |
141 | + { |
142 | + while (CTestTestfile.good ()) |
143 | + { |
144 | + getline (CTestTestfile, line); |
145 | + |
146 | + if (line == includeLine) |
147 | + needsInclude = false; |
148 | + } |
149 | + |
150 | + CTestTestfile.close (); |
151 | + } |
152 | + |
153 | + if (needsInclude) |
154 | + { |
155 | + ofstream CTestTestfileW ("CTestTestfile.cmake", ofstream::app | ofstream::out); |
156 | + |
157 | + if (CTestTestfileW.is_open ()) |
158 | + { |
159 | + CTestTestfileW << includeLine << endl; |
160 | + CTestTestfileW.close (); |
161 | + } |
162 | + } |
163 | + |
164 | + return 0; |
165 | +} |
166 | |
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 | plugin-mock |
172 | setting-mock) |
173 | |
174 | -gtest_add_tests (test-ccs-object "" ${CMAKE_CURRENT_SOURCE_DIR}/test-ccs-object.cpp) |
175 | -gtest_add_tests (test-context "" ${CMAKE_CURRENT_SOURCE_DIR}/test-context.cpp) |
176 | -gtest_add_tests (test-plugin "" ${CMAKE_CURRENT_SOURCE_DIR}/test-plugin.cpp) |
177 | -gtest_add_tests (test-setting "" ${CMAKE_CURRENT_SOURCE_DIR}/test-setting.cpp) |
178 | +compiz_discover_tests (test-ccs-object) |
179 | +compiz_discover_tests (test-context) |
180 | +compiz_discover_tests (test-plugin) |
181 | +compiz_discover_tests (test-setting) |
182 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
188 | ) |
189 | |
190 | -gtest_add_tests (compiz_test_composite_pixmapbinding "" ${CMAKE_CURRENT_SOURCE_DIR}/test-composite-pixmapbinding.cpp) |
191 | +compiz_discover_tests (compiz_test_composite_pixmapbinding) |
192 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
198 | ) |
199 | |
200 | -gtest_add_tests (compiz_test_decor_clip_groups "" ${CMAKE_CURRENT_SOURCE_DIR}/clip-groups/src/test-decor-clip-groups.cpp) |
201 | +compiz_discover_tests (compiz_test_decor_clip_groups) |
202 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
208 | ) |
209 | |
210 | -gtest_add_tests (compiz_test_decor_pixmap_requests "" ${CMAKE_CURRENT_SOURCE_DIR}/pixmap-requests/src/test-decor-pixmap-requests.cpp) |
211 | +compiz_discover_tests (compiz_test_decor_pixmap_requests) |
212 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
218 | ) |
219 | |
220 | -gtest_add_tests (compiz_test_grid_grabhandler "" ${CMAKE_CURRENT_SOURCE_DIR}/test-grid-grab-handler.cpp) |
221 | +compiz_discover_tests (compiz_test_grid_grabhandler) |
222 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
228 | ) |
229 | |
230 | -gtest_add_tests (compiz_test_place_constrain_to_workarea "" ${CMAKE_CURRENT_SOURCE_DIR}/constrain-to-workarea/src/test-place-constrain-to-workarea.cpp) |
231 | +compiz_discover_tests (compiz_test_place_constrain_to_workarea) |
232 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
238 | ) |
239 | |
240 | -gtest_add_tests (compiz_test_place_screen_size_change "" ${CMAKE_CURRENT_SOURCE_DIR}/screen-size-change/src/test-place-screen-size-change.cpp) |
241 | +compiz_discover_tests (compiz_test_place_screen_size_change) |
242 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
248 | ) |
249 | |
250 | -gtest_add_tests (compiz_test_place_smart_on_screen "" ${CMAKE_CURRENT_SOURCE_DIR}/offscreen/src/test-place-smart-on-screen.cpp) |
251 | +compiz_discover_tests (compiz_test_place_smart_on_screen) |
252 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
258 | ) |
259 | |
260 | -gtest_add_tests (compiz_test_wall_offset_movement "" ${CMAKE_CURRENT_SOURCE_DIR}/test-wall-offset-movement.cpp) |
261 | +compiz_discover_tests (compiz_test_wall_offset_movement) |
262 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
268 | ) |
269 | |
270 | -gtest_add_tests( compiz_option_test "" ${CMAKE_CURRENT_SOURCE_DIR}/option.cpp ) |
271 | +compiz_discover_tests ( compiz_option_test ) |
272 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
278 | ) |
279 | |
280 | -env_gtest_add_tests( compiz_plugin_test "" ${CMAKE_CURRENT_SOURCE_DIR}/test-plugin.cpp ) |
281 | +compiz_discover_tests ( compiz_plugin_test ) |
282 | |
283 | |
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 | # gtest_main |
289 | #) |
290 | |
291 | -gtest_add_tests( compiz_pch_construct "" ${CMAKE_CURRENT_SOURCE_DIR}/construct/src/test-pch-construct.cpp ) |
292 | -gtest_add_tests( compiz_pch_get "" ${CMAKE_CURRENT_SOURCE_DIR}/get/src/test-pch-get.cpp ) |
293 | +compiz_discover_tests (compiz_pch_construct) |
294 | +compiz_discover_tests (compiz_pch_get) |
295 | #add_test( compiz_pch_indexes compiz_pch_indexes ) |
296 | -gtest_add_tests( compiz_pch_typenames "" ${CMAKE_CURRENT_SOURCE_DIR}/typenames/src/test-pch-typenames.cpp ) |
297 | +compiz_discover_tests (compiz_pch_typenames) |
298 | |
299 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
305 | ) |
306 | |
307 | -gtest_add_tests (compiz_test_point "" ${CMAKE_CURRENT_SOURCE_DIR}/point/src/test-point.cpp) |
308 | +compiz_discover_tests (compiz_test_point) |
309 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
315 | ) |
316 | |
317 | -env_gtest_add_tests( compiz_privatescreen_test "" ${CMAKE_CURRENT_SOURCE_DIR}/test-privatescreen.cpp ) |
318 | +compiz_discover_tests (compiz_privatescreen_test) |
319 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
325 | ) |
326 | |
327 | -gtest_add_tests (compiz_test_rect "" ${CMAKE_CURRENT_SOURCE_DIR}/rect/src/test-rect.cpp) |
328 | -gtest_add_tests (compiz_test_rect_wraparound_point "" ${CMAKE_CURRENT_SOURCE_DIR}/wraparound_point/src/test-rect-wraparound-point.cpp) |
329 | +compiz_discover_tests (compiz_test_rect) |
330 | +compiz_discover_tests (compiz_test_rect_wraparound_point) |
331 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
337 | ) |
338 | |
339 | -gtest_add_tests( compiz_region_test "" ${CMAKE_CURRENT_SOURCE_DIR}/test-region.cpp ) |
340 | +compiz_discover_tests (compiz_region_test) |
341 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
347 | ) |
348 | |
349 | -gtest_add_tests (compiz_test_servergrab "" ${CMAKE_CURRENT_SOURCE_DIR}/test-servergrab.cpp) |
350 | +compiz_discover_tests (compiz_test_servergrab) |
351 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
357 | ) |
358 | |
359 | -gtest_add_tests( compiz_string_test "" ${CMAKE_CURRENT_SOURCE_DIR}/printf/src/test-string-printf.cpp ) |
360 | +compiz_discover_tests (compiz_string_test) |
361 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
367 | ) |
368 | |
369 | -gtest_add_tests (compiz_timer_callbacks "" ${CMAKE_CURRENT_SOURCE_DIR}/callbacks/src/test-timer-callbacks.cpp) |
370 | -gtest_add_tests (compiz_timer_diffs "" ${CMAKE_CURRENT_SOURCE_DIR}/diffs/src/test-timer-diffs.cpp) |
371 | -gtest_add_tests (compiz_timer_set-values "" ${CMAKE_CURRENT_SOURCE_DIR}/set-values/src/test-timer-set-values.cpp) |
372 | -gtest_add_tests (compiz_timer_while-calling "" ${CMAKE_CURRENT_SOURCE_DIR}/while-calling/src/test-timer-set-times-while-calling.cpp) |
373 | +compiz_discover_tests (compiz_timer_callbacks) |
374 | +compiz_discover_tests (compiz_timer_diffs) |
375 | +compiz_discover_tests (compiz_timer_set-values) |
376 | +compiz_discover_tests (compiz_timer_while-calling) |
377 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
383 | ) |
384 | |
385 | -gtest_add_tests ( compiz_test_window_constrainment_to_hints "" ${CMAKE_CURRENT_SOURCE_DIR}/to-hints/src/test-window-constrainment-to-hints.cpp) |
386 | +compiz_discover_tests (compiz_test_window_constrainment_to_hints) |
387 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
393 | ) |
394 | |
395 | -gtest_add_tests (compiz_test_window_extents_shift "" ${CMAKE_CURRENT_SOURCE_DIR}/shift/src/test-window-extents-shift.cpp) |
396 | +compiz_discover_tests (compiz_test_window_extents_shift) |
397 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
403 | ) |
404 | |
405 | -gtest_add_tests (compiz_test_window_geometry_saver "" ${CMAKE_CURRENT_SOURCE_DIR}/window-geometry-saver/src/test-window-geometry-saver.cpp) |
406 | +compiz_discover_tests (compiz_test_window_geometry_saver) |
407 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
413 | ) |
414 | |
415 | -gtest_add_tests (compiz_test_window_geometry "" ${CMAKE_CURRENT_SOURCE_DIR}/window-geometry/src/test-window-geometry.cpp) |
416 | +compiz_discover_tests (compiz_test_window_geometry) |
417 | |
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 | ${CMAKE_THREAD_LIBS_INIT} # Link in pthread. |
423 | ) |
424 | |
425 | -gtest_add_tests (${CMAKE_CURRENT_BINARY_DIR}/compiz_wrapsystem_test "" "test-wrapsystem.cpp") |
426 | +compiz_discover_tests (compiz_wrapsystem_test) |
427 | \ 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.