]> git.proxmox.com Git - ceph.git/blame - ceph/src/test/common/CMakeLists.txt
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / test / common / CMakeLists.txt
CommitLineData
7c673cae
FG
1# get_command_descriptions
2add_executable(get_command_descriptions
3 get_command_descriptions.cc
4 $<TARGET_OBJECTS:common_texttable_obj>
5 )
6target_link_libraries(get_command_descriptions
7 mon
8 global
9 ${LEVELDB_LIBRARIES}
10 ${EXTRALIBS}
11 ${BLKID_LIBRARIES}
12 ${CMAKE_DL_LIBS}
13 )
14
11fdf7f2
TL
15# Though FreeBSD has blkdev support, the unittests' mocks only work in Linux
16if(HAVE_BLKID AND LINUX)
17 # unittest_blkdev
18 add_executable(unittest_blkdev
19 test_blkdev.cc)
20 add_ceph_unittest(unittest_blkdev ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_blkdev)
21 target_link_libraries(unittest_blkdev global ${BLKID_LIBRARIES})
22endif()
23
24# unittest_lockdep
25add_executable(unittest_lockdep
26 test_lockdep.cc
7c673cae 27 )
11fdf7f2
TL
28add_ceph_unittest(unittest_lockdep)
29target_link_libraries(unittest_lockdep ceph-common global)
30
31# FreeBSD only has shims to support NUMA, no functional code.
32if(LINUX)
33# unittest_numa
34add_executable(unittest_numa
35 test_numa.cc
36 )
37add_ceph_unittest(unittest_numa)
38target_link_libraries(unittest_numa ceph-common)
39endif()
7c673cae
FG
40
41# unittest_bloom_filter
42add_executable(unittest_bloom_filter
43 test_bloom_filter.cc
44 )
11fdf7f2
TL
45add_ceph_unittest(unittest_bloom_filter)
46target_link_libraries(unittest_bloom_filter ceph-common)
7c673cae
FG
47
48# unittest_histogram
49add_executable(unittest_histogram
50 histogram.cc
51 )
11fdf7f2
TL
52add_ceph_unittest(unittest_histogram)
53target_link_libraries(unittest_histogram ceph-common)
7c673cae
FG
54
55# unittest_prioritized_queue
56add_executable(unittest_prioritized_queue
57 test_prioritized_queue.cc
58 )
11fdf7f2
TL
59target_link_libraries(unittest_prioritized_queue ceph-common)
60add_ceph_unittest(unittest_prioritized_queue)
7c673cae 61
224ce89b 62# unittest_mclock_priority_queue
91327a77 63add_executable(unittest_mclock_priority_queue
224ce89b
WB
64 test_mclock_priority_queue.cc
65 )
11fdf7f2
TL
66add_ceph_unittest(unittest_mclock_priority_queue)
67target_link_libraries(unittest_mclock_priority_queue
68 ceph-common
69 dmclock::dmclock)
224ce89b 70
7c673cae
FG
71# unittest_str_map
72add_executable(unittest_str_map
73 test_str_map.cc
74 )
11fdf7f2
TL
75add_ceph_unittest(unittest_str_map)
76target_link_libraries(unittest_str_map ceph-common)
77
78# unittest_json_formattable
79add_executable(unittest_json_formattable
80 test_json_formattable.cc
81 )
82add_ceph_unittest(unittest_json_formattable ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_json_formattable)
83# add_dependencies(unittest_json_formattable ceph-common)
84target_link_libraries(unittest_json_formattable ceph-common global ${BLKID_LIBRARIES})
85
86# unittest_json_formatter
87add_executable(unittest_json_formatter
88 test_json_formatter.cc
89 )
90add_ceph_unittest(unittest_json_formatter ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_json_formatter)
91# add_dependencies(unittest_json_formatter ceph-common)
92target_link_libraries(unittest_json_formatter ceph-common global ${BLKID_LIBRARIES})
7c673cae
FG
93
94# unittest_sharedptr_registry
95add_executable(unittest_sharedptr_registry
96 test_sharedptr_registry.cc
97 $<TARGET_OBJECTS:unit-main>
98 )
11fdf7f2
TL
99add_ceph_unittest(unittest_sharedptr_registry)
100target_link_libraries(unittest_sharedptr_registry global)
7c673cae
FG
101
102# unittest_shared_cache
103add_executable(unittest_shared_cache
104 test_shared_cache.cc
105 $<TARGET_OBJECTS:unit-main>
106 )
11fdf7f2
TL
107add_ceph_unittest(unittest_shared_cache)
108target_link_libraries(unittest_shared_cache global)
7c673cae
FG
109
110# unittest_sloppy_crc_map
111add_executable(unittest_sloppy_crc_map
112 test_sloppy_crc_map.cc
113 )
11fdf7f2
TL
114add_ceph_unittest(unittest_sloppy_crc_map)
115target_link_libraries(unittest_sloppy_crc_map global)
7c673cae
FG
116
117# unittest_time
118add_executable(unittest_time
119 test_time.cc
120 ${CMAKE_SOURCE_DIR}/src/common/ceph_time.cc
121 )
11fdf7f2
TL
122add_ceph_unittest(unittest_time)
123target_link_libraries(unittest_time ceph-common)
7c673cae
FG
124
125# unittest_util
126add_executable(unittest_util
127 test_util.cc
128 ${CMAKE_SOURCE_DIR}/src/common/util.cc
129 )
11fdf7f2
TL
130add_ceph_unittest(unittest_util)
131target_link_libraries(unittest_util global)
132
133# unittest_random
134add_executable(unittest_random
135 test_random.cc
136 )
137add_ceph_unittest(unittest_random)
7c673cae
FG
138
139# unittest_throttle
140add_executable(unittest_throttle
141 Throttle.cc
142 $<TARGET_OBJECTS:unit-main>
143 )
11fdf7f2 144add_ceph_unittest(unittest_throttle parallel)
7c673cae
FG
145target_link_libraries(unittest_throttle global)
146
147# unittest_lru
148add_executable(unittest_lru
149 test_lru.cc
150 )
11fdf7f2
TL
151add_ceph_unittest(unittest_lru)
152target_link_libraries(unittest_lru ceph-common)
7c673cae
FG
153
154# unittest_crc32c
155add_executable(unittest_crc32c
156 test_crc32c.cc
157 )
11fdf7f2
TL
158add_ceph_unittest(unittest_crc32c)
159target_link_libraries(unittest_crc32c ceph-common)
7c673cae
FG
160
161# unittest_config
162add_executable(unittest_config
163 test_config.cc
164 test_hostname.cc
165 )
11fdf7f2
TL
166add_ceph_unittest(unittest_config)
167target_link_libraries(unittest_config ceph-common)
7c673cae
FG
168
169# unittest_context
170add_executable(unittest_context
171 test_context.cc
172 )
11fdf7f2
TL
173add_ceph_unittest(unittest_context)
174target_link_libraries(unittest_context ceph-common)
7c673cae
FG
175
176# unittest_safe_io
177add_executable(unittest_safe_io
178 test_safe_io.cc
179 )
11fdf7f2
TL
180add_ceph_unittest(unittest_safe_io)
181target_link_libraries(unittest_safe_io ceph-common)
7c673cae
FG
182
183# unittest_url_escape
184add_executable(unittest_url_escape
185 test_url_escape.cc
186 )
11fdf7f2 187add_ceph_unittest(unittest_url_escape)
7c673cae
FG
188target_link_libraries(unittest_url_escape ceph-common)
189
190# unittest_readahead
191add_executable(unittest_readahead
192 Readahead.cc
193 )
11fdf7f2
TL
194add_ceph_unittest(unittest_readahead)
195target_link_libraries(unittest_readahead ceph-common)
7c673cae
FG
196
197# unittest_tableformatter
198add_executable(unittest_tableformatter
199 test_tableformatter.cc
200 )
11fdf7f2
TL
201add_ceph_unittest(unittest_tableformatter)
202target_link_libraries(unittest_tableformatter ceph-common)
7c673cae
FG
203
204add_executable(unittest_xmlformatter
205 test_xmlformatter.cc
206 )
11fdf7f2 207add_ceph_unittest(unittest_xmlformatter)
7c673cae
FG
208target_link_libraries(unittest_xmlformatter ceph-common)
209
210# unittest_bit_vector
211add_executable(unittest_bit_vector
212 test_bit_vector.cc
213 )
11fdf7f2
TL
214add_ceph_unittest(unittest_bit_vector)
215target_link_libraries(unittest_bit_vector ceph-common)
7c673cae
FG
216
217# unittest_interval_map
218add_executable(unittest_interval_map
219 test_interval_map.cc
220)
11fdf7f2
TL
221add_ceph_unittest(unittest_interval_map)
222target_link_libraries(unittest_interval_map ceph-common)
7c673cae
FG
223
224# unittest_interval_set
225add_executable(unittest_interval_set
226 test_interval_set.cc
227)
11fdf7f2
TL
228add_ceph_unittest(unittest_interval_set)
229target_link_libraries(unittest_interval_set ceph-common)
7c673cae
FG
230
231# unittest_weighted_priority_queue
232add_executable(unittest_weighted_priority_queue
233 test_weighted_priority_queue.cc
234 )
11fdf7f2
TL
235target_link_libraries(unittest_weighted_priority_queue ceph-common)
236add_ceph_unittest(unittest_weighted_priority_queue)
7c673cae
FG
237
238# unittest_mutex_debug
239add_executable(unittest_mutex_debug
240 test_mutex_debug.cc
241 )
11fdf7f2
TL
242add_ceph_unittest(unittest_mutex_debug)
243target_link_libraries(unittest_mutex_debug ceph-common)
7c673cae
FG
244
245# unittest_mutex
246add_executable(unittest_mutex
247 test_mutex.cc
248 )
11fdf7f2
TL
249add_ceph_unittest(unittest_mutex)
250target_link_libraries(unittest_mutex ceph-common)
7c673cae
FG
251
252# unittest_shunique_lock
253add_executable(unittest_shunique_lock
254 test_shunique_lock.cc
255 )
11fdf7f2
TL
256add_ceph_unittest(unittest_shunique_lock)
257target_link_libraries(unittest_shunique_lock ceph-common)
7c673cae
FG
258
259# unittest_perf_histogram
260add_executable(unittest_perf_histogram
261 test_perf_histogram.cc
262 )
11fdf7f2
TL
263add_ceph_unittest(unittest_perf_histogram)
264target_link_libraries(unittest_perf_histogram ceph-common)
7c673cae
FG
265
266# unittest_global_doublefree
267if(WITH_CEPHFS)
268 add_executable(unittest_global_doublefree
269 test_global_doublefree.cc
270 )
11fdf7f2 271 add_ceph_unittest(unittest_global_doublefree)
7c673cae
FG
272 target_link_libraries(unittest_global_doublefree cephfs librados)
273endif(WITH_CEPHFS)
274
275add_executable(unittest_dns_resolve
276 dns_resolve.cc
277 $<TARGET_OBJECTS:unit-main>)
278target_link_libraries(unittest_dns_resolve global)
11fdf7f2 279add_ceph_unittest(unittest_dns_resolve)
7c673cae
FG
280
281add_executable(unittest_back_trace
282 test_back_trace.cc)
283set_source_files_properties(test_back_trace.cc PROPERTIES
284 COMPILE_FLAGS -fno-inline)
285target_link_libraries(unittest_back_trace ceph-common)
11fdf7f2 286add_ceph_unittest(unittest_back_trace)
7c673cae
FG
287
288add_executable(unittest_hostname
289 test_hostname.cc)
290target_link_libraries(unittest_hostname ceph-common)
11fdf7f2 291add_ceph_unittest(unittest_hostname)
31f18b77
FG
292
293add_executable(unittest_iso_8601
294 test_iso_8601.cc)
295target_link_libraries(unittest_iso_8601 ceph-common)
11fdf7f2 296add_ceph_unittest(unittest_iso_8601)
d2e6a577 297
11fdf7f2
TL
298add_executable(unittest_convenience test_convenience.cc)
299target_link_libraries(unittest_convenience ceph-common)
300add_ceph_unittest(unittest_convenience)
b32b8144
FG
301
302add_executable(unittest_bounded_key_counter
303 test_bounded_key_counter.cc
304 $<TARGET_OBJECTS:unit-main>)
305target_link_libraries(unittest_bounded_key_counter global)
11fdf7f2
TL
306add_ceph_unittest(unittest_bounded_key_counter)
307
308add_executable(unittest_static_ptr test_static_ptr.cc)
309add_ceph_unittest(unittest_static_ptr)
310
311add_executable(unittest_hobject test_hobject.cc
312 $<TARGET_OBJECTS:unit-main>)
313target_link_libraries(unittest_hobject global ceph-common)
314add_ceph_unittest(unittest_hobject)
315
316add_executable(unittest_async_completion test_async_completion.cc)
317add_ceph_unittest(unittest_async_completion)
318target_link_libraries(unittest_async_completion Boost::system)
319
320add_executable(unittest_async_shared_mutex test_async_shared_mutex.cc)
321add_ceph_unittest(unittest_async_shared_mutex)
322target_link_libraries(unittest_async_shared_mutex ceph-common Boost::system)