]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/CMakeLists.txt
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / test / CMakeLists.txt
1 include(AddCephTest)
2
3 set(UNITTEST_LIBS GMock::Main GMock::GMock GTest::GTest ${CMAKE_THREAD_LIBS_INIT}
4 ${GSSAPI_LIBRARIES} ${OPENLDAP_LIBRARIES} ${CMAKE_DL_LIBS})
5
6 add_library(unit-main OBJECT unit.cc)
7 target_include_directories(unit-main PRIVATE
8 $<TARGET_PROPERTY:GTest::GTest,INTERFACE_INCLUDE_DIRECTORIES>)
9
10 add_subdirectory(cls_hello)
11 add_subdirectory(cls_lock)
12 add_subdirectory(cls_log)
13 add_subdirectory(cls_numops)
14 add_subdirectory(cls_sdk)
15 if(WITH_RBD)
16 add_subdirectory(cls_journal)
17 add_subdirectory(cls_rbd)
18 endif(WITH_RBD)
19 add_subdirectory(cls_refcount)
20 add_subdirectory(cls_rgw)
21 add_subdirectory(cls_version)
22 add_subdirectory(cls_lua)
23 add_subdirectory(common)
24 add_subdirectory(compressor)
25 add_subdirectory(crush)
26 add_subdirectory(direct_messenger)
27 add_subdirectory(encoding)
28 add_subdirectory(erasure-code)
29 add_subdirectory(filestore)
30 add_subdirectory(fs)
31 add_subdirectory(journal)
32 add_subdirectory(libcephfs)
33 add_subdirectory(librados)
34 add_subdirectory(librados_test_stub)
35 if(WITH_LIBRADOSSTRIPER)
36 add_subdirectory(libradosstriper)
37 endif()
38 if(WITH_RBD)
39 add_subdirectory(librbd)
40 endif(WITH_RBD)
41 add_subdirectory(messenger)
42 if (WITH_CEPHFS)
43 add_subdirectory(mds)
44 endif()
45 add_subdirectory(mon)
46 add_subdirectory(mgr)
47 add_subdirectory(msgr)
48 add_subdirectory(ObjectMap)
49 add_subdirectory(objectstore)
50 add_subdirectory(os)
51 add_subdirectory(osd)
52 add_subdirectory(osdc)
53 add_subdirectory(pybind)
54 if(WITH_RADOSGW)
55 set(rgw_libs rgw_a)
56 if(WITH_RADOSGW_AMQP_ENDPOINT)
57 list(APPEND rgw_libs amqp_mock)
58 endif()
59 add_subdirectory(rgw)
60 endif(WITH_RADOSGW)
61 if(WITH_RBD)
62 add_subdirectory(rbd_mirror)
63 endif(WITH_RBD)
64 if(WITH_SEASTAR)
65 add_subdirectory(crimson)
66 endif()
67 add_subdirectory(system)
68 if(WITH_FIO OR WITH_SYSTEM_FIO)
69 add_subdirectory(fio)
70 endif()
71
72 # test_timers
73 add_executable(ceph_test_timers
74 TestTimers.cc
75 )
76 target_link_libraries(ceph_test_timers global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
77
78 # test_signal_handlers
79 add_executable(ceph_test_signal_handlers
80 TestSignalHandlers.cc
81 )
82 target_link_libraries(ceph_test_signal_handlers global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
83
84 # test_rewrite_latency
85 add_executable(ceph_test_rewrite_latency
86 test_rewrite_latency.cc
87 )
88 target_link_libraries(ceph_test_rewrite_latency ceph-common
89 ${CMAKE_DL_LIBS}
90 ${CMAKE_THREAD_LIBS_INIT} ${CRYPTO_LIBS} m ${EXTRALIBS})
91
92 # test_crypt
93 add_executable(test_crypto
94 testcrypto.cc
95 )
96 target_link_libraries(test_crypto
97 global
98 ${CRYPTO_LIBS}
99 m
100 ${EXTRALIBS}
101 ${BLKID_LIBRARIES}
102 ${CMAKE_DL_LIBS}
103 )
104
105 add_executable(test_build_libcommon buildtest_skeleton.cc)
106 target_link_libraries(test_build_libcommon ceph-common pthread ${CRYPTO_LIBS} ${EXTRALIBS})
107
108 if(WITH_RADOSGW)
109 add_executable(test_build_librgw buildtest_skeleton.cc)
110 target_link_libraries(test_build_librgw rgw_a pthread ${CRYPTO_LIBS} ${EXTRALIBS})
111 endif(WITH_RADOSGW)
112
113 if(WITH_RADOSGW)
114 add_executable(test_build_librgw_admin_user buildtest_skeleton.cc)
115 target_link_libraries(test_build_librgw_admin_user pthread ${CRYPTO_LIBS} ${EXTRALIBS})
116 endif(WITH_RADOSGW)
117
118 if(WITH_LIBCEPHFS)
119 # From src/test/Makefile-client.am: I dont get this one... testing the osdc build but link in libcephfs?
120 add_executable(test_build_libcephfs buildtest_skeleton.cc)
121 target_link_libraries(test_build_libcephfs cephfs pthread ${CRYPTO_LIBS} ${EXTRALIBS})
122 endif(WITH_LIBCEPHFS)
123
124 add_executable(test_build_librados buildtest_skeleton.cc)
125 target_link_libraries(test_build_librados librados pthread ${CRYPTO_LIBS} ${EXTRALIBS} osdc osd os ceph-common cls_lock_client ${BLKID_LIBRARIES})
126
127 # bench_log
128 set(bench_log_srcs
129 bench_log.cc
130 )
131 add_executable(ceph_bench_log
132 ${bench_log_srcs}
133 )
134 target_link_libraries(ceph_bench_log global pthread rt ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
135
136 # ceph_test_mutate
137 add_executable(ceph_test_mutate
138 test_mutate.cc
139 )
140 target_link_libraries(ceph_test_mutate global librados ${BLKID_LIBRARIES}
141 ${CMAKE_DL_LIBS})
142
143 # test_trans
144 add_executable(test_trans
145 test_trans.cc
146 )
147 target_link_libraries(test_trans os global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
148
149 ## Benchmarks
150
151
152 # ceph_omapbench
153 set(omapbench_srcs
154 omap_bench.cc
155 )
156 add_executable(ceph_omapbench
157 ${omapbench_srcs}
158 )
159 target_link_libraries(ceph_omapbench
160 librados
161 Boost::program_options
162 global
163 ${BLKID_LIBRARIES}
164 ${CMAKE_DL_LIBS}
165 )
166
167 if(WITH_KVS)
168 # ceph_kvstorebench
169 set(kvstorebench_srcs
170 kv_store_bench.cc
171 ${CMAKE_SOURCE_DIR}/src/key_value_store/kv_flat_btree_async.cc
172 )
173 add_executable(ceph_kvstorebench ${kvstorebench_srcs})
174 target_link_libraries(ceph_kvstorebench librados global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
175 install(TARGETS ceph_kvstorebench DESTINATION bin)
176 endif(WITH_KVS)
177
178 # ceph_objectstore_bench
179 add_executable(ceph_objectstore_bench objectstore_bench.cc)
180 target_link_libraries(ceph_objectstore_bench os global ${BLKID_LIBRARIES})
181
182 if(${WITH_RADOSGW})
183 # test_cors
184 set(test_cors_srcs test_cors.cc)
185 add_executable(test_cors
186 ${test_cors_srcs}
187 )
188 target_link_libraries(test_cors
189 librados
190 ${rgw_libs}
191 global
192 ${BLKID_LIBRARIES}
193 ${CURL_LIBRARIES}
194 ${EXPAT_LIBRARIES}
195 ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
196
197 # ceph_test_cls_rgw_meta
198 set(test_cls_rgw_meta_srcs test_rgw_admin_meta.cc)
199 add_executable(ceph_test_cls_rgw_meta
200 ${test_cls_rgw_meta_srcs}
201 )
202 target_link_libraries(ceph_test_cls_rgw_meta
203 librados
204 ${rgw_libs}
205 global
206 cls_version_client
207 cls_log_client
208 cls_refcount_client
209 cls_rgw_client
210 cls_user_client
211 cls_lock_client
212 ${BLKID_LIBRARIES}
213 ${CURL_LIBRARIES}
214 ${EXPAT_LIBRARIES}
215 ${CMAKE_DL_LIBS} ${UNITTEST_LIBS} ${CRYPTO_LIBS})
216
217 install(TARGETS
218 ceph_test_cls_rgw_meta
219 DESTINATION ${CMAKE_INSTALL_BINDIR})
220
221 # ceph_test_cls_rgw_log
222 set(ceph_test_cls_rgw_log_srcs
223 test_rgw_admin_log.cc
224 )
225 add_executable(ceph_test_cls_rgw_log
226 ${ceph_test_cls_rgw_log_srcs}
227 )
228 target_link_libraries(ceph_test_cls_rgw_log
229 librados
230 ${rgw_libs}
231 global
232 cls_version_client
233 cls_log_client
234 cls_refcount_client
235 cls_rgw_client
236 cls_user_client
237 cls_lock_client
238 ${BLKID_LIBRARIES}
239 ${CURL_LIBRARIES}
240 ${EXPAT_LIBRARIES}
241 ${CMAKE_DL_LIBS}
242 ${UNITTEST_LIBS}
243 ${EXTRALIBS}
244 ${CRYPTO_LIBS}
245 )
246
247 # ceph_test_librgw_file (nfs-like RGW interface)
248 add_executable(ceph_test_librgw_file
249 librgw_file.cc
250 )
251 if(WITH_RADOSGW_FCGI_FRONTEND)
252 target_include_directories(ceph_test_librgw_file SYSTEM PRIVATE ${FCGI_INCLUDE_DIR})
253 endif(WITH_RADOSGW_FCGI_FRONTEND)
254 target_link_libraries(ceph_test_librgw_file
255 rgw
256 librados
257 ceph-common
258 ${UNITTEST_LIBS}
259 ${EXTRALIBS}
260 )
261
262 # ceph_test_librgw_file_cd (just the rgw_file create-delete bucket ops)
263 add_executable(ceph_test_librgw_file_cd
264 librgw_file_cd.cc
265 )
266 target_link_libraries(ceph_test_librgw_file_cd
267 rgw
268 librados
269 ceph-common
270 ${UNITTEST_LIBS}
271 ${EXTRALIBS}
272 )
273
274 # ceph_test_librgw_file_gp (just the rgw_file get-put bucket ops)
275 add_executable(ceph_test_librgw_file_gp
276 librgw_file_gp.cc
277 )
278 target_link_libraries(ceph_test_librgw_file_gp
279 rgw
280 librados
281 ceph-common
282 ${UNITTEST_LIBS}
283 ${EXTRALIBS}
284 )
285
286 # ceph_test_librgw_file_nfsns (nfs namespace tests)
287 add_executable(ceph_test_librgw_file_nfsns
288 librgw_file_nfsns.cc
289 )
290 if(WITH_RADOSGW_FCGI_FRONTEND)
291 target_include_directories(ceph_test_librgw_file_nfsns SYSTEM PRIVATE ${FCGI_INCLUDE_DIR})
292 endif(WITH_RADOSGW_FCGI_FRONTEND)
293 target_link_libraries(ceph_test_librgw_file_nfsns
294 rgw
295 librados
296 ceph-common
297 ${UNITTEST_LIBS}
298 ${EXTRALIBS}
299 )
300
301 # ceph_test_librgw_file_aw (nfs write transaction [atomic write] tests)
302 add_executable(ceph_test_librgw_file_aw
303 librgw_file_aw.cc
304 )
305 target_link_libraries(ceph_test_librgw_file_aw
306 rgw
307 librados
308 ceph-common
309 ${UNITTEST_LIBS}
310 ${EXTRALIBS}
311 )
312
313 # ceph_test_librgw_file_marker (READDIR with string and uint64 offsets)
314 add_executable(ceph_test_librgw_file_marker
315 librgw_file_marker.cc
316 )
317 target_link_libraries(ceph_test_librgw_file_marker
318 rgw
319 librados
320 ceph-common
321 ${UNITTEST_LIBS}
322 ${EXTRALIBS}
323 )
324
325 # ceph_test_rgw_token
326 add_executable(ceph_test_rgw_token
327 test_rgw_token.cc
328 )
329 target_link_libraries(ceph_test_rgw_token
330 rgw
331 os
332 global
333 ${UNITTEST_LIBS}
334 ${EXTRALIBS}
335 )
336
337 # librgw_file_gp (just the rgw_file get-put bucket ops)
338 add_executable(test_rgw_ldap
339 ${CMAKE_SOURCE_DIR}/src/rgw/rgw_ldap.cc
340 test_rgw_ldap.cc
341 )
342 target_link_libraries(test_rgw_ldap
343 librados
344 ceph-common
345 ${OPENLDAP_LIBRARIES}
346 ${UNITTEST_LIBS}
347 )
348
349 # unittest_librgw_admin_user
350 add_executable(ceph_test_librgw_admin_user test_librgw_admin_user.cc)
351 target_link_libraries(ceph_test_librgw_admin_user
352 rgw_admin_user
353 cls_otp_client
354 librados
355 ceph-common
356 ${UNITTEST_LIBS}
357 ${EXTRALIBS}
358 )
359
360 endif(${WITH_RADOSGW})
361
362 # ceph_multi_stress_watch
363 add_executable(ceph_multi_stress_watch
364 multi_stress_watch.cc
365 )
366 target_link_libraries(ceph_multi_stress_watch librados global radostest-cxx
367 ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
368
369 #ceph_perf_local
370 add_executable(ceph_perf_local
371 perf_local.cc
372 perf_helper.cc)
373 if(HAVE_SSE)
374 set(PERF_LOCAL_FLAGS ${SSE3_FLAGS})
375 endif(HAVE_SSE)
376 if(HAVE_NEON)
377 set(PERF_LOCAL_FLAGS ${ARM_NEON_FLAGS})
378 endif(HAVE_NEON)
379 if(PERF_LOCAL_FLAGS)
380 set_target_properties(ceph_perf_local PROPERTIES COMPILE_FLAGS
381 ${PERF_LOCAL_FLAGS})
382 endif()
383 target_link_libraries(ceph_perf_local os global ${UNITTEST_LIBS})
384
385 install(TARGETS
386 ceph_bench_log
387 ceph_multi_stress_watch
388 ceph_objectstore_bench
389 ceph_omapbench
390 ceph_perf_local
391 DESTINATION bin)
392
393 # ceph_test_filejournal
394 add_executable(ceph_test_filejournal
395 test_filejournal.cc
396 )
397 target_link_libraries(ceph_test_filejournal
398 os
399 ceph-common
400 ${UNITTEST_LIBS}
401 global
402 ${EXTRALIBS}
403 ${BLKID_LIBRARIES}
404 ${CMAKE_DL_LIBS}
405 ${EXTRALIBS}
406 )
407 install(TARGETS
408 ceph_test_filejournal
409 DESTINATION ${CMAKE_INSTALL_BINDIR})
410
411 # ceph_test_keys
412 add_executable(ceph_test_keys
413 testkeys.cc
414 )
415 target_link_libraries(ceph_test_keys mon global ${CMAKE_DL_LIBS})
416
417 # ceph_test_snap_mapper
418 add_executable(ceph_test_snap_mapper
419 test_snap_mapper.cc
420 $<TARGET_OBJECTS:unit-main>
421 )
422 target_link_libraries(ceph_test_snap_mapper osd global ${BLKID_LIBRARIES} ${UNITTEST_LIBS})
423
424 add_executable(ceph_test_stress_watch
425 test_stress_watch.cc
426 )
427 target_link_libraries(ceph_test_stress_watch
428 librados
429 ${UNITTEST_LIBS}
430 radostest-cxx
431 ${EXTRALIBS}
432 ${BLKID_LIBRARIES}
433 ${CMAKE_DL_LIBS}
434 )
435 install(TARGETS
436 ceph_test_stress_watch
437 DESTINATION ${CMAKE_INSTALL_BINDIR})
438
439 if(WITH_FUSE)
440 add_executable(ceph_test_cfuse_cache_invalidate
441 test_cfuse_cache_invalidate.cc
442 )
443 target_link_libraries(ceph_test_cfuse_cache_invalidate
444 ceph-common
445 )
446 endif(WITH_FUSE)
447
448 if(${WITH_CEPHFS})
449 add_executable(test_c_headers
450 test_c_headers.c
451 )
452 target_link_libraries(test_c_headers
453 librados
454 cephfs)
455 endif(${WITH_CEPHFS})
456
457 if(HAVE_BLKID OR FREEBSD)
458 add_executable(ceph_test_get_blkdev_props
459 test_get_blkdev_props.cc
460 )
461 target_link_libraries(ceph_test_get_blkdev_props
462 ceph-common
463 pthread
464 ${EXTRALIBS}
465 ${BLKID_LIBRARIES}
466 ${CMAKE_DL_LIBS}
467 )
468 endif(HAVE_BLKID OR FREEBSD)
469
470 # ceph_test_admin_socket_output
471
472 find_package(StdFilesystem)
473 if(StdFilesystem_FOUND)
474 add_executable(ceph_test_admin_socket_output
475 test_admin_socket_output.cc
476 admin_socket_output.cc
477 admin_socket_output_tests.cc)
478 target_link_libraries(ceph_test_admin_socket_output
479 ceph-common StdFilesystem::filesystem)
480 install(TARGETS
481 ceph_test_admin_socket_output
482 DESTINATION ${CMAKE_INSTALL_BINDIR})
483 endif()
484
485 #make check starts here
486
487 #following dependencies are run inside make check unit tests
488 add_dependencies(tests
489 ceph-mon
490 ceph-authtool
491 get_command_descriptions
492 crushtool
493 ceph-conf
494 rados
495 monmaptool
496 ceph-osd
497 ceph-dencoder
498 ceph-objectstore-tool
499 ceph-kvstore-tool
500 ceph-monstore-tool
501 osdmaptool
502 ceph_example
503 ceph_snappy
504 cls_lock
505 ceph_test_objectstore
506 ceph_erasure_code_non_regression
507 ceph_erasure_code
508 cython${PY_BINDING_INFIX}_modules)
509 if (WITH_CEPHFS)
510 add_dependencies(tests ceph-mds)
511 endif()
512 if(WITH_MGR)
513 add_dependencies(tests ceph-mgr)
514 endif()
515 if(WITH_RBD)
516 add_dependencies(tests unittest_librbd rbd)
517 if(FREEBSD)
518 add_dependencies(tests rbd-ggate)
519 endif(FREEBSD)
520 endif(WITH_RBD)
521 if(WITH_RADOSGW)
522 add_dependencies(tests radosgw radosgw-admin)
523 endif(WITH_RADOSGW)
524 #add dependency from fio just to ensure the plugin build isn't failing
525 if(WITH_FIO OR WITH_SYSTEM_FIO)
526 add_dependencies(tests fio_ceph_objectstore)
527 endif()
528
529 if(WITH_RBD)
530 add_ceph_test(run-rbd-unit-tests.sh ${CMAKE_CURRENT_SOURCE_DIR}/run-rbd-unit-tests.sh)
531 if(FREEBSD)
532 add_ceph_test(rbd-ggate.sh ${CMAKE_CURRENT_SOURCE_DIR}/rbd-ggate.sh)
533 endif(FREEBSD)
534 endif(WITH_RBD)
535 add_ceph_test(run-cli-tests ${CMAKE_CURRENT_SOURCE_DIR}/run-cli-tests)
536 add_ceph_test(test_objectstore_memstore.sh ${CMAKE_CURRENT_SOURCE_DIR}/test_objectstore_memstore.sh)
537
538 # flaky
539 #add_ceph_test(test_pidfile.sh ${CMAKE_CURRENT_SOURCE_DIR}/test_pidfile.sh)
540
541 add_ceph_test(smoke.sh ${CMAKE_CURRENT_SOURCE_DIR}/smoke.sh)
542
543 # XXX are these safe to remove? they used to be around for ceph-disk tox testing
544 set(env_vars_for_tox_tests
545 CEPH_BUILD_DIR=${CMAKE_BINARY_DIR}
546 CEPH_ROOT=${CMAKE_SOURCE_DIR}
547 CEPH_BIN=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
548 CEPH_LIB=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
549 CEPH_BUILD_VIRTUALENV=${CEPH_BUILD_VIRTUALENV}
550 LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib
551 PATH=$ENV{PATH}:${CMAKE_RUNTIME_OUTPUT_DIRECTORY}:${CMAKE_SOURCE_DIR}/src
552 PYTHONPATH=${CMAKE_SOURCE_DIR}/src/pybind
553 WITH_PYTHON2=${WITH_PYTHON2}
554 WITH_PYTHON3=${WITH_PYTHON3})
555
556 if(WITH_MGR)
557 add_test(NAME run-tox-mgr-dashboard COMMAND bash ${CMAKE_SOURCE_DIR}/src/pybind/mgr/dashboard/run-tox.sh)
558 list(APPEND tox_tests run-tox-mgr-dashboard)
559 set(MGR_DASHBOARD_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/mgr-dashboard-virtualenv)
560 list(APPEND env_vars_for_tox_tests MGR_DASHBOARD_VIRTUALENV=${MGR_DASHBOARD_VIRTUALENV})
561
562 add_test(NAME run-tox-mgr-insights COMMAND bash ${CMAKE_SOURCE_DIR}/src/pybind/mgr/insights/run-tox.sh)
563 list(APPEND tox_tests run-tox-mgr-insights)
564 set(MGR_INSIGHTS_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/mgr-insights-virtualenv)
565 list(APPEND env_vars_for_tox_tests MGR_INSIGHTS_VIRTUALENV=${MGR_INSIGHTS_VIRTUALENV})
566
567 add_test(NAME run-tox-mgr-ansible COMMAND bash ${CMAKE_SOURCE_DIR}/src/pybind/mgr/ansible/run-tox.sh)
568 list(APPEND tox_tests run-tox-mgr-ansible)
569 set(MGR_ANSIBLE_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/mgr-ansible-virtualenv)
570 list(APPEND env_vars_for_tox_tests MGR_ANSIBLE_VIRTUALENV=${MGR_ANSIBLE_VIRTUALENV})
571
572 add_test(NAME run-tox-mgr-orchestrator_cli COMMAND bash ${CMAKE_SOURCE_DIR}/src/pybind/mgr/orchestrator_cli/run-tox.sh)
573 list(APPEND tox_tests run-tox-mgr-orchestrator_cli)
574 set(MGR_ORCHESTRATOR_CLI_VIRTUALENV ${CEPH_BUILD_VIRTUALENV}/mgr-orchestrator_cli-virtualenv)
575 list(APPEND env_vars_for_tox_tests MGR_ORCHESTRATOR_CLI_VIRTUALENV=${MGR_ORCHESTRATOR_CLI_VIRTUALENV})
576 endif()
577
578 set_property(
579 TEST ${tox_tests}
580 PROPERTY ENVIRONMENT ${env_vars_for_tox_tests})
581
582 # unittest_admin_socket
583 add_executable(unittest_admin_socket
584 admin_socket.cc
585 $<TARGET_OBJECTS:unit-main>
586 )
587 add_ceph_unittest(unittest_admin_socket)
588 target_link_libraries(unittest_admin_socket global)
589
590 # unittest_encoding
591 add_executable(unittest_encoding
592 encoding.cc
593 )
594 add_ceph_unittest(unittest_encoding)
595 target_link_libraries(unittest_encoding ceph-common)
596
597 # unittest_addrs
598 add_executable(unittest_addrs
599 test_addrs.cc
600 )
601 add_ceph_unittest(unittest_addrs)
602 target_link_libraries(unittest_addrs ceph-common)
603
604 # unittest_auth
605 add_executable(unittest_auth
606 test_auth.cc
607 $<TARGET_OBJECTS:unit-main>
608 )
609 add_ceph_unittest(unittest_auth)
610 target_link_libraries(unittest_auth global)
611
612 # unittest_workqueue
613 add_executable(unittest_workqueue
614 test_workqueue.cc
615 $<TARGET_OBJECTS:unit-main>
616 )
617 add_ceph_unittest(unittest_workqueue)
618 target_link_libraries(unittest_workqueue global)
619
620 # unittest_striper
621 if(WITH_LIBRADOSSTRIPER)
622 add_executable(unittest_striper
623 test_striper.cc
624 $<TARGET_OBJECTS:unit-main>
625 )
626 add_ceph_unittest(unittest_striper)
627 target_link_libraries(unittest_striper global ${BLKID_LIBRARIES})
628 endif()
629
630 # unittest_str_list
631 add_executable(unittest_str_list
632 test_str_list.cc
633 )
634 add_ceph_unittest(unittest_str_list)
635 target_link_libraries(unittest_str_list global)
636
637 # unittest_log
638 add_executable(unittest_log
639 ${CMAKE_SOURCE_DIR}/src/log/test.cc
640 )
641 add_ceph_unittest(unittest_log)
642 target_link_libraries(unittest_log global)
643
644 # unittest_base64
645 add_executable(unittest_base64
646 base64.cc
647 )
648 add_ceph_unittest(unittest_base64)
649 target_link_libraries(unittest_base64 global)
650
651 # unittest_ceph_argparse
652 add_executable(unittest_ceph_argparse
653 ceph_argparse.cc
654 )
655 add_ceph_unittest(unittest_ceph_argparse)
656 target_link_libraries(unittest_ceph_argparse global)
657
658 # unittest_ceph_compatset
659 add_executable(unittest_ceph_compatset
660 ceph_compatset.cc
661 )
662 add_ceph_unittest(unittest_ceph_compatset)
663 target_link_libraries(unittest_ceph_compatset global)
664
665 # unittest_gather
666 add_executable(unittest_gather
667 gather.cc
668 $<TARGET_OBJECTS:unit-main>
669 )
670 add_ceph_unittest(unittest_gather)
671 target_link_libraries(unittest_gather global)
672
673 # unittest_run_cmd
674 add_executable(unittest_run_cmd
675 run_cmd.cc
676 )
677 add_ceph_unittest(unittest_run_cmd)
678 target_link_libraries(unittest_run_cmd global)
679
680 # signals
681 add_executable(unittest_signals
682 signals.cc
683 $<TARGET_OBJECTS:unit-main>
684 )
685 add_ceph_unittest(unittest_signals)
686 target_link_libraries(unittest_signals global)
687
688 # unittest_simple_spin
689 add_executable(unittest_simple_spin
690 simple_spin.cc
691 )
692 add_ceph_unittest(unittest_simple_spin)
693 target_link_libraries(unittest_simple_spin global)
694
695 # unittest_bufferlist
696 add_executable(unittest_bufferlist
697 bufferlist.cc
698 $<TARGET_OBJECTS:unit-main>
699 )
700 add_ceph_unittest(unittest_bufferlist)
701 target_link_libraries(unittest_bufferlist global)
702
703 # unittest_xlist
704 add_executable(unittest_xlist
705 test_xlist.cc
706 )
707 add_ceph_unittest(unittest_xlist)
708 target_link_libraries(unittest_xlist ceph-common)
709
710 # unittest_arch
711 add_executable(unittest_arch
712 test_arch.cc
713 $<TARGET_OBJECTS:unit-main>
714 )
715 add_ceph_unittest(unittest_arch)
716 target_link_libraries(unittest_arch global)
717
718 # unittest_denc
719 add_executable(unittest_denc
720 test_denc.cc
721 )
722 add_ceph_unittest(unittest_denc)
723 target_link_libraries(unittest_denc global)
724
725 # unittest_mempool
726 add_executable(unittest_mempool
727 test_mempool.cc
728 )
729 add_ceph_unittest(unittest_mempool)
730 target_link_libraries(unittest_mempool global)
731
732 # unittest_features
733 add_executable(unittest_features
734 test_features.cc
735 )
736 add_ceph_unittest(unittest_features)
737 target_link_libraries(unittest_features global)
738
739 # unittest_crypto
740 add_executable(unittest_crypto
741 crypto.cc
742 $<TARGET_OBJECTS:unit-main>
743 )
744 add_ceph_unittest(unittest_crypto)
745 target_link_libraries(unittest_crypto global)
746
747 # unittest_crypto_init
748 add_executable(unittest_crypto_init
749 crypto_init.cc
750 )
751 add_ceph_unittest(unittest_crypto_init)
752 target_link_libraries(unittest_crypto_init global)
753
754 # unittest_perf_counters
755 add_executable(unittest_perf_counters
756 perf_counters.cc
757 )
758 add_ceph_unittest(unittest_perf_counters)
759 target_link_libraries(unittest_perf_counters global)
760
761 # unittest_ceph_crypto
762 add_executable(unittest_ceph_crypto
763 ceph_crypto.cc
764 )
765 add_ceph_unittest(unittest_ceph_crypto)
766 target_link_libraries(unittest_ceph_crypto global)
767
768 # unittest_utf8
769 add_executable(unittest_utf8
770 utf8.cc
771 )
772 add_ceph_unittest(unittest_utf8)
773 target_link_libraries(unittest_utf8 global)
774
775 # unittest_mime
776 add_executable(unittest_mime
777 mime.cc
778 )
779 add_ceph_unittest(unittest_mime)
780 target_link_libraries(unittest_mime global)
781
782 # unittest_escape
783 add_executable(unittest_escape
784 escape.cc
785 )
786 add_ceph_unittest(unittest_escape)
787 target_link_libraries(unittest_escape global)
788
789 # unittest_strtol
790 add_executable(unittest_strtol
791 strtol.cc
792 )
793 add_ceph_unittest(unittest_strtol)
794 target_link_libraries(unittest_strtol global)
795
796 # unittest_confutils
797 add_executable(unittest_confutils
798 confutils.cc
799 )
800 add_ceph_unittest(unittest_confutils)
801 target_link_libraries(unittest_confutils global)
802
803 # unittest_heartbeatmap
804 add_executable(unittest_heartbeatmap
805 heartbeat_map.cc
806 $<TARGET_OBJECTS:unit-main>
807 )
808 add_ceph_unittest(unittest_heartbeatmap)
809 target_link_libraries(unittest_heartbeatmap global ceph-common)
810
811 if(${WITH_RADOSGW})
812 # unittest_formatter
813 add_executable(unittest_formatter
814 formatter.cc
815 $<TARGET_OBJECTS:unit-main>
816 )
817 add_ceph_unittest(unittest_formatter)
818 target_link_libraries(unittest_formatter global)
819 endif(${WITH_RADOSGW})
820
821 # unittest_daemon_config
822 add_executable(unittest_daemon_config
823 daemon_config.cc
824 $<TARGET_OBJECTS:unit-main>
825 )
826 add_ceph_unittest(unittest_daemon_config)
827 target_link_libraries(unittest_daemon_config
828 ceph-common
829 global
830 ${BLKID_LIBRARIES}
831 ${EXTRALIBS}
832 )
833
834 if(WITH_LIBCEPHFS)
835 # unittest_libcephfs_config
836 add_executable(unittest_libcephfs_config
837 libcephfs_config.cc
838 )
839 add_ceph_unittest(unittest_libcephfs_config)
840 target_link_libraries(unittest_libcephfs_config cephfs)
841 endif(WITH_LIBCEPHFS)
842
843 if(WITH_RBD)
844 # unittest_rbd_replay
845 add_executable(unittest_rbd_replay
846 test_rbd_replay.cc)
847 add_ceph_unittest(unittest_rbd_replay)
848 target_link_libraries(unittest_rbd_replay
849 librbd
850 librados
851 global
852 rbd_replay
853 rbd_replay_ios
854 ${BLKID_LIBRARIES}
855 )
856 endif(WITH_RBD)
857
858 # unittest_ipaddr
859 add_executable(unittest_ipaddr
860 test_ipaddr.cc)
861 add_ceph_unittest(unittest_ipaddr)
862 target_link_libraries(unittest_ipaddr mon global)
863
864 # unittest_texttable
865 add_executable(unittest_texttable
866 test_texttable.cc
867 $<TARGET_OBJECTS:common_texttable_obj>
868 )
869 add_ceph_unittest(unittest_texttable)
870 target_link_libraries(unittest_texttable mon global)
871
872 # unittest_on_exit
873 add_executable(unittest_on_exit
874 on_exit.cc
875 )
876 add_ceph_unittest(unittest_on_exit)
877 target_link_libraries(unittest_on_exit global)
878
879 # unittest_subprocess
880 add_executable(unittest_subprocess
881 test_subprocess.cc
882 )
883 add_ceph_unittest(unittest_subprocess)
884 target_link_libraries(unittest_subprocess global)
885
886 # unittest_pageset
887 add_executable(unittest_pageset test_pageset.cc)
888 add_ceph_unittest(unittest_pageset)
889 target_link_libraries(unittest_pageset global)
890
891 # unittest_any_
892 add_executable(unittest_any test_any.cc)
893 add_ceph_unittest(unittest_any)
894 target_link_libraries(unittest_any)
895
896 #make check ends here