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