+include(AddCephTest)
+
+set(UNITTEST_LIBS gmock_main gmock gtest ${PTHREAD_LIBS} ${CMAKE_DL_LIBS})
+set(UNITTEST_CXX_FLAGS "-I${CMAKE_SOURCE_DIR}/src/gmock/include -I${CMAKE_BINARY_DIR}/src/gmock/include -I${CMAKE_SOURCE_DIR}/src/gmock/gtest/include -I${CMAKE_BINARY_DIR}/src/gmock/gtest/include -fno-strict-aliasing")
+
# test_timers
-add_executable(test_timers
+add_executable(ceph_test_timers
TestTimers.cc
)
-target_link_libraries(test_timers global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
+target_link_libraries(ceph_test_timers global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
# test_signal_handlers
-add_executable(test_signal_handlers
+add_executable(ceph_test_signal_handlers
TestSignalHandlers.cc
)
-target_link_libraries(test_signal_handlers global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
+target_link_libraries(ceph_test_signal_handlers global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
+
+# test_rewrite_latency
+add_executable(ceph_test_rewrite_latency
+ test_rewrite_latency.cc
+ )
+target_link_libraries(ceph_test_rewrite_latency common
+ ${CMAKE_DL_LIBS}
+ ${CMAKE_THREAD_LIBS_INIT} ${CRYPTO_LIBS} m ${EXTRALIBS})
# test_crypt
add_executable(test_crypto
add_executable(test_build_librados buildtest_skeleton.cc)
target_link_libraries(test_build_librados librados pthread ${CRYPTO_LIBS} ${EXTRALIBS} osdc osd os common cls_lock_client ${BLKID_LIBRARIES})
-# test_rados
-add_executable(test_rados
+# bench_log
+set(bench_log_srcs
+ bench_log.cc
+ )
+add_executable(ceph_bench_log
+ ${bench_log_srcs}
+ )
+target_link_libraries(ceph_bench_log global pthread rt ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
+
+# ceph_test_rados
+add_executable(ceph_test_rados
osd/TestRados.cc
osd/TestOpStat.cc
osd/Object.cc osd/RadosModel.cc
)
-target_link_libraries(test_rados
+target_link_libraries(ceph_test_rados
librados
global
${BLKID_LIBRARIES}
${CMAKE_DL_LIBS}
)
-# test_mutate
-add_executable(test_mutate
+# ceph_test_mutate
+add_executable(ceph_test_mutate
test_mutate.cc
)
-target_link_libraries(test_mutate global librados ${BLKID_LIBRARIES}
+target_link_libraries(ceph_test_mutate global librados ${BLKID_LIBRARIES}
${CMAKE_DL_LIBS})
-# test_rewrite_latency
-add_executable(test_rewrite_latency
- test_rewrite_latency.cc
- )
-target_link_libraries(test_rewrite_latency common
- ${CMAKE_DL_LIBS}
- ${CMAKE_THREAD_LIBS_INIT} ${CRYPTO_LIBS} m ${EXTRALIBS})
-
# test_trans
add_executable(test_trans
test_trans.cc
)
target_link_libraries(test_trans os global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
-# test_keys
-add_executable(test_keys
- testkeys.cc
- )
-target_link_libraries(test_keys mon global ${CMAKE_DL_LIBS})
-
-# get_command_descriptions
-add_executable(get_command_descriptions
- common/get_command_descriptions.cc
- ${CMAKE_SOURCE_DIR}/src/common/TextTable.cc
- )
-target_link_libraries(get_command_descriptions
- mon
- global
- leveldb
- ${EXTRALIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
- )
-
## Benchmarks
# smalliobench
bench/detailed_stat_collector.cc
bench/bencher.cc
)
-add_executable(smalliobench
+add_executable(ceph_smalliobench
${smalliobench_srcs}
)
-target_link_libraries(smalliobench librados ${Boost_PROGRAM_OPTIONS_LIBRARY} global
- ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
-
-# smalliobenchfs
-set(smalliobenchfs_srcs
- bench/small_io_bench_fs.cc
- bench/testfilestore_backend.cc
- bench/detailed_stat_collector.cc
- bench/bencher.cc
- )
-add_executable(smalliobenchfs
- ${smalliobenchfs_srcs}
- )
-target_link_libraries(smalliobenchfs librados ${Boost_PROGRAM_OPTIONS_LIBRARY} os global
- ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
-
-# smalliobenchdumb
-set(smalliobenchdumb_srcs
- bench/small_io_bench_dumb.cc
- bench/dumb_backend.cc
- bench/detailed_stat_collector.cc
- bench/bencher.cc
- )
-add_executable(smalliobenchdumb
- ${smalliobenchdumb_srcs}
- )
-target_link_libraries(smalliobenchdumb librados ${Boost_PROGRAM_OPTIONS_LIBRARY} os global
+target_link_libraries(ceph_smalliobench librados ${Boost_PROGRAM_OPTIONS_LIBRARY} global
${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
-# smalliobenchrbd
+# ceph_smalliobenchrbd
if (${WITH_RBD})
- set(smalliobenchrbd_srcs
+ set(ceph_smalliobenchrbd_srcs
bench/small_io_bench_rbd.cc
bench/rbd_backend.cc
bench/detailed_stat_collector.cc
)
endif (${WITH_RBD})
-# tpbench
-set(tpbench_srcs
- bench/tp_bench.cc
- bench/detailed_stat_collector.cc)
-add_executable(tpbench
- ${tpbench_srcs}
- )
-target_link_libraries(tpbench librados ${Boost_PROGRAM_OPTIONS_LIBRARY} global
- ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
-
-# omapbench
+# ceph_omapbench
set(omapbench_srcs
omap_bench.cc
)
-add_executable(omapbench
+add_executable(ceph_omapbench
${omapbench_srcs}
)
-target_link_libraries(omapbench
+target_link_libraries(ceph_omapbench
librados
${Boost_PROGRAM_OPTIONS_LIBRARY}
global
${CMAKE_DL_LIBS}
)
-# kvstorebench
+# ceph_kvstorebench
set(kvstorebench_srcs
kv_store_bench.cc
${CMAKE_SOURCE_DIR}/src/key_value_store/kv_flat_btree_async.cc
)
-add_executable(kvstorebench
+add_executable(ceph_kvstorebench
${kvstorebench_srcs}
)
-target_link_libraries(kvstorebench librados global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
+target_link_libraries(ceph_kvstorebench librados global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
# ceph_objectstore_bench
add_executable(ceph_objectstore_bench objectstore_bench.cc)
target_link_libraries(test_rados_watch_notify librados systest global
pthread rt ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
-# bench_log
-set(bench_log_srcs
- bench_log.cc
- )
-add_executable(bench_log
- ${bench_log_srcs}
- )
-target_link_libraries(bench_log global pthread rt ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
-
-## Unit tests
-#make check starts here
-set(UNITTEST_LIBS gmock_main gmock gtest ${PTHREAD_LIBS})
-set(UNITTEST_CXX_FLAGS "-I${CMAKE_SOURCE_DIR}/src/gmock/include -I${CMAKE_BINARY_DIR}/src/gmock/include -I${CMAKE_SOURCE_DIR}/src/gmock/gtest/include -I${CMAKE_BINARY_DIR}/src/gmock/gtest/include -fno-strict-aliasing")
-
-#following dependencies are run inside make check unit tests
-add_dependencies(check
- ceph-mon
- ceph
- ceph-authtool
- get_command_descriptions
- crushtool
- ceph-conf
- rados
- ceph-mds
- monmaptool
- ceph-osd
- ceph-dencoder
- ceph-objectstore-tool)
-
-add_test(NAME test_helpers COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/test-ceph-helpers.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check test_helpers)
-
-add_test(NAME osd_config COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/osd/osd-config.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check osd_config)
-
-add_test(NAME osd_copy_from COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/osd/osd-copy-from.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check osd_copy_from)
-
-add_test(NAME osd_crush COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/mon/osd-crush.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check osd_crush)
-
-add_test(NAME ceph_disk_tox COMMAND bash ${CMAKE_SOURCE_DIR}/src/ceph-disk/run-tox.sh)
-add_dependencies(check ceph_disk_tox)
-
-add_test(NAME rados_striper COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/libradosstriper/rados-striper.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check rados_striper)
-
-add_test(NAME osd_bench COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/osd/osd-bench.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check osd_bench)
-
-add_test(NAME test_erasure_code COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/erasure-code/test-erasure-code.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check test_erasure_code)
-
-add_test(NAME test_erasure_eio COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/erasure-code/test-erasure-eio.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check test_erasure_eio)
+if(${WITH_RADOSGW})
+ # test_cors
+ set(test_cors_srcs test_cors.cc)
+ add_executable(test_cors
+ ${test_cors_srcs}
+ )
+ target_link_libraries(test_cors
+ librados
+ rgw_a
+ global
+ curl
+ expat
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
+ set_target_properties(test_cors PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
-#osd_scrub_repair is hanging for unknown reasons
-#add_test(NAME osd_scrub_repair COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/osd/osd-scrub-repair.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-#add_dependencies(check osd_scrub_repair)
+ # test_rgw_manifest
+ set(test_rgw_manifest_srcs rgw/test_rgw_manifest.cc)
+ add_executable(test_rgw_manifest
+ ${test_rgw_manifest_srcs}
+ )
+ target_link_libraries(test_rgw_manifest
+ rgw_a
+ cls_rgw_client
+ cls_lock_client
+ cls_refcount_client
+ cls_log_client
+ cls_statelog_client
+ cls_timeindex_client
+ cls_version_client
+ cls_replica_log_client
+ cls_kvs
+ cls_user_client
+ librados
+ global
+ curl
+ expat
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ ${UNITTEST_LIBS}
+ ${CRYPTO_LIBS}
+ )
+ set_target_properties(test_rgw_manifest PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
-add_test(NAME cephtool_test_rados COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/cephtool-test-rados.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check cephtool_test_rados)
+ # test_rgw_obj
+ set(test_rgw_obj_srcs rgw/test_rgw_obj.cc)
+ add_executable(test_rgw_obj
+ ${test_rgw_obj_srcs}
+ )
+ target_link_libraries(test_rgw_obj
+ rgw_a
+ cls_rgw_client
+ cls_lock_client
+ cls_refcount_client
+ cls_log_client
+ cls_statelog_client
+ cls_version_client
+ cls_replica_log_client
+ cls_kvs
+ cls_user_client
+ librados
+ global
+ curl
+ uuid
+ expat
+ ${CMAKE_DL_LIBS}
+ ${UNITTEST_LIBS}
+ ${CRYPTO_LIBS}
+ )
+ set_target_properties(test_rgw_obj PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
-add_test(NAME cephtool_test_mon COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/cephtool-test-mon.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check cephtool_test_mon)
+ # test_cls_rgw_meta
+ set(test_cls_rgw_meta_srcs test_rgw_admin_meta.cc)
+ add_executable(test_cls_rgw_meta
+ ${test_cls_rgw_meta_srcs}
+ )
+ target_link_libraries(test_cls_rgw_meta
+ librados
+ rgw_a
+ global
+ curl
+ expat
+ cls_version_client
+ cls_log_client
+ cls_statelog_client
+ cls_refcount_client
+ cls_rgw_client
+ cls_user_client
+ cls_lock_client
+ ${Boost_REGEX_LIBRARY}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS} ${UNITTEST_LIBS} ${CRYPTO_LIBS})
+ set_target_properties(test_cls_rgw_meta PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
-add_test(NAME ceph_objectstore_tool_py COMMAND python ${CMAKE_SOURCE_DIR}/src/test/ceph_objectstore_tool.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check ceph_objectstore_tool_py)
+ # test_cls_rgw_log
+ set(test_cls_rgw_log_srcs
+ test_rgw_admin_log.cc
+ )
+ add_executable(test_cls_rgw_log
+ ${test_cls_rgw_log_srcs}
+ )
+ target_link_libraries(test_cls_rgw_log
+ librados
+ rgw_a
+ global
+ curl
+ expat
+ cls_version_client
+ cls_log_client
+ cls_statelog_client
+ cls_refcount_client
+ cls_rgw_client
+ cls_user_client
+ cls_lock_client
+ ${Boost_REGEX_LIBRARY}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ ${UNITTEST_LIBS}
+ ${EXTRALIBS}
+ ${CRYPTO_LIBS}
+ )
+ set_target_properties(test_cls_rgw_log PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
-add_test(NAME osd_mark_down COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/osd/osd-markdown.sh)
-add_dependencies(check osd-markdown)
+ # test_cls_rgw_opstate
+ set(test_cls_rgw_opstate_srcs test_rgw_admin_opstate.cc)
+ add_executable(test_cls_rgw_opstate
+ ${test_cls_rgw_opstate_srcs}
+ )
+ target_link_libraries(test_cls_rgw_opstate
+ rgw_a
+ librados
+ cls_version_client
+ cls_log_client
+ cls_statelog_client
+ cls_timeindex_client
+ cls_refcount_client
+ cls_rgw_client
+ cls_user_client
+ cls_lock_client
+ global
+ curl
+ expat
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ ${UNITTEST_LIBS}
+ ${CRYPTO_LIBS}
+ ${EXTRALIBS}
+ )
+ set_target_properties(test_cls_rgw_opstate PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
+endif(${WITH_RADOSGW})
-add_test(NAME ceph_disk COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/ceph-disk.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check ceph_disk)
+# radostest
+set(libradostest_srcs librados/test.cc librados/TestCase.cc)
+add_library(radostest STATIC ${libradostest_srcs})
+set_target_properties(radostest PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-# unittest_admin_socket
-add_executable(unittest_admin_socket EXCLUDE_FROM_ALL
- admin_socket.cc
+# ceph_multi_stress_watch
+add_executable(ceph_multi_stress_watch
+ multi_stress_watch.cc
)
-add_test(unittest_admin_socket unittest_admin_socket)
-add_dependencies(check unittest_admin_socket)
-target_link_libraries(unittest_admin_socket global ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
-set_target_properties(unittest_admin_socket PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_multi_stress_watch librados global radostest
+ ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
-# unittest_blkdev
-add_executable(unittest_blkdev EXCLUDE_FROM_ALL
- common/test_blkdev.cc
+set(librados_test_stub_srcs
+ librados_test_stub/LibradosTestStub.cc
+ librados_test_stub/TestClassHandler.cc
+ librados_test_stub/TestIoCtxImpl.cc
+ librados_test_stub/TestMemIoCtxImpl.cc
+ librados_test_stub/TestMemRadosClient.cc
+ librados_test_stub/TestRadosClient.cc)
+add_library(librados_test_stub STATIC ${librados_test_stub_srcs})
+
+# unittest_librbd
+add_executable(unittest_librbd EXCLUDE_FROM_ALL
+ librbd/test_librbd.cc
+ librbd/test_fixture.cc
+ librbd/test_ImageWatcher.cc
+ librbd/test_internal.cc
+ librbd/test_support.cc
+ librbd/test_main.cc
+ ${CMAKE_SOURCE_DIR}/src/common/TextTable.cc
+ ${CMAKE_SOURCE_DIR}/src/common/secret.c
)
-add_test(NAME unittest_blkdev COMMAND ./unittest_blkdev WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check unittest_blkdev)
-target_link_libraries(unittest_blkdev
+add_dependencies(check unittest_librbd)
+set_target_properties(unittest_librbd PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
+if(${WITH_LTTNG})
+ target_link_libraries(unittest_librbd librbd_tp)
+endif(${WITH_LTTNG})
+target_link_libraries(unittest_librbd
+ librbd
+ librados
+ journal
+ cls_journal_client
+ librados_api
+ librados_test_stub
+ ${UNITTEST_LIBS}
global
- ${BLKID_LIBRARIES}
${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_blkdev PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+ ${CRYPTO_LIBS}
+ ${EXTRALIBS}
+ blkid
+ udev
+ keyutils
+ radostest
+ )
-# unittest_chain_xattr
-add_executable(unittest_chain_xattr EXCLUDE_FROM_ALL
- objectstore/chain_xattr.cc
+add_executable(test_librbd_fsx
+ librbd/fsx.cc
+ ${CMAKE_SOURCE_DIR}/src/common/TextTable.cc
+ ${CMAKE_SOURCE_DIR}/src/common/secret.c
)
-add_test(unittest_chain_xattr unittest_chain_xattr)
-add_dependencies(check unittest_chain_xattr)
-target_link_libraries(unittest_chain_xattr
- os
+target_link_libraries(test_librbd_fsx
+ librbd
+ librados
global
+ m
${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS}
+ ${CRYPTO_LIBS}
+ ${EXTRALIBS}
+ blkid
+ udev
+ keyutils
)
-set_target_properties(unittest_chain_xattr PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
-add_test(NAME mkfs COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/mon/mkfs.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check mkfs)
-
-add_test(NAME misc COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/mon/misc.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check misc)
-
-add_test(NAME mon_created_time COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/mon/mon-created-time.sh)
-add_dependencies(check mon_created_time)
-
-add_test(NAME test_ceph_daemon COMMAND python ${CMAKE_SOURCE_DIR}/src/test/pybind/test_ceph_daemon.py WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/test/pybind)
-add_dependencies(check test_ceph_daemon)
-
-set(CTEST_ENVIROMENT "PYTHONPATH=$PYTHONPATH:${CMAKE_SOURCE_DIR}/src/pybind")
-add_test(NAME test_ceph_argparse_py COMMAND python ${CMAKE_SOURCE_DIR}/src/test/pybind/test_ceph_argparse.py WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/src/test)
-add_dependencies(check test_ceph_argparse_py)
-
-add_test(NAME unittest_bufferlist_shell COMMAND bash ${CMAKE_SOURCE_DIR}/src/unittest_bufferlist.sh)
-add_dependencies(check unittest_bufferlist_shell)
-
-add_test(NAME osd_reactivate COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/osd/osd-reactivate.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check osd_reactivate)
-
-add_test(NAME run_tox COMMAND bash ${CMAKE_SOURCE_DIR}/src/ceph-detect-init/run-tox.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check run_tox)
-
-add_test(NAME cephtool_test_osd COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/cephtool-test-osd.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check cephtool_test_osd)
-
-add_test(NAME check_generated COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/encoding/check-generated.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check check_generated)
-
-add_test(NAME run_rbd_unit_tests COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/run-rbd-unit-tests.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check run_rbd_unit_tests)
-
-add_test(NAME osd_pool_create COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/mon/osd-pool-create.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check osd_pool_create)
-
-add_test(NAME mon_handle_forward COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/mon/mon-handle-forward.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check mon_handle_forward)
-
-add_test(NAME osd_erasure_code_profile COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/mon/osd-erasure-code-profile.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check osd_erasure_code_profile)
-
-add_test(NAME cephtool_test_mds COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/cephtool-test-mds.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check cephtool_test_mds)
-add_test(NAME readable COMMAND bash ${CMAKE_SOURCE_DIR}/src/test/encoding/readable.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check readable)
-
-add_test(NAME encode_decode_non_regression COMMAND bash ${CMAKE_SOURCE_DIR}/qa/workunits/erasure-code/encode-decode-non-regression.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
-add_dependencies(check encode_decode_non_regression)
-
-# unittest_encoding
-add_executable(unittest_encoding EXCLUDE_FROM_ALL
- encoding.cc
+add_executable(ceph_test_cls_rbd
+ cls_rbd/test_cls_rbd.cc
+ ${CMAKE_SOURCE_DIR}/src/common/TextTable.cc
+ ${CMAKE_SOURCE_DIR}/src/common/secret.c
)
-add_test(unittest_encoding unittest_encoding)
-add_dependencies(check unittest_encoding)
-target_link_libraries(unittest_encoding cephfs librados pthread rt m ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
-set_target_properties(unittest_encoding
- PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-
-# unittest_addrs
-add_executable(unittest_addrs EXCLUDE_FROM_ALL
- test_addrs.cc
+set_target_properties(ceph_test_cls_rbd PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_cls_rbd
+ librbd
+ cls_rbd
+ cls_lock
+ librados
+ global
+ ${UNITTEST_LIBS}
+ ${CMAKE_DL_LIBS}
+ ${CRYPTO_LIBS}
+ ${EXTRALIBS}
+ radostest
+ blkid
+ udev
+ keyutils
)
-add_test(unittest_addrs unittest_addrs)
-add_dependencies(check unittest_addrs)
-target_link_libraries(unittest_addrs cephfs librados pthread rt m
- ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
-set_target_properties(unittest_addrs
- PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-# unittest_bloom_filter
-add_executable(unittest_bloom_filter EXCLUDE_FROM_ALL
- common/test_bloom_filter.cc
+add_executable(ceph_test_cls_refcount
+ cls_refcount/test_cls_refcount.cc
)
-add_test(unittest_bloom_filter unittest_bloom_filter)
-add_dependencies(check unittest_bloom_filter)
-target_link_libraries(unittest_bloom_filter global
- ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
-set_target_properties(unittest_bloom_filter
- PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-
-# unittest_histogram
-add_executable(unittest_histogram EXCLUDE_FROM_ALL
- common/histogram.cc
+set_target_properties(ceph_test_cls_refcount PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_cls_refcount
+ librados
+ cls_refcount_client
+ global
+ ${UNITTEST_LIBS}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ ${CRYPTO_LIBS}
+ ${EXTRALIBS}
+ radostest
)
-add_test(unittest_histogram unittest_histogram)
-add_dependencies(check unittest_histogram)
-target_link_libraries(unittest_histogram global
- ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
-set_target_properties(unittest_histogram
- PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-# unittest_prioritized_queue
-add_executable(unittest_prioritized_queue EXCLUDE_FROM_ALL
- common/test_prioritized_queue.cc
+add_executable(ceph_test_cls_version
+ cls_version/test_cls_version.cc
)
-add_test(unittest_prioritized_queue unittest_prioritized_queue)
-add_dependencies(check unittest_prioritized_queue)
-target_link_libraries(unittest_prioritized_queue global
- ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
-set_target_properties(unittest_prioritized_queue
- PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-
-# unittest_weighted_priority_queue
-add_executable(unittest_weighted_priority_queue EXCLUDE_FROM_ALL
- common/test_weighted_priority_queue.cc
+set_target_properties(ceph_test_cls_version PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_cls_version
+ librados
+ cls_version_client
+ global
+ ${UNITTEST_LIBS}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ ${CRYPTO_LIBS}
+ ${EXTRALIBS}
+ radostest
)
-add_test(unittest_weighted_priority_queue unittest_weighted_priority_queue)
-add_dependencies(check unittest_weighted_priority_queue)
-target_link_libraries(unittest_weighted_priority_queue global
- ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
-set_target_properties(unittest_weighted_priority_queue
- PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-# unittest_str_map
-add_executable(unittest_str_map EXCLUDE_FROM_ALL
- common/test_str_map.cc
+add_executable(ceph_test_cls_log
+ cls_log/test_cls_log.cc
)
-add_test(unittest_str_map unittest_str_map)
-add_dependencies(check unittest_str_map)
-target_link_libraries(unittest_str_map common global
- ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS} common)
-set_target_properties(unittest_str_map
- PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-
-# unittest_shared_mutex
-set(unittest_mutex_debug_srcs
- common/test_mutex_debug.cc
- )
-add_executable(unittest_mutex_debug EXCLUDE_FROM_ALL
- ${unittest_mutex_debug_srcs}
- )
-add_test(unittest_mutex_debug unittest_mutex_debug)
-add_dependencies(check unittest_mutex_debug)
-target_link_libraries(unittest_mutex_debug global
- ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS} ${EXTRALIBS})
-set_target_properties(unittest_mutex_debug
- PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-
-# unittest_shared_mutex
-set(unittest_shunique_lock_srcs
- common/test_shunique_lock.cc
- )
-add_executable(unittest_shunique_lock EXCLUDE_FROM_ALL
- ${unittest_shunique_lock_srcs}
- )
-add_test(unittest_shunique_lock unittest_shunique_lock)
-add_dependencies(check unittest_shunique_lock)
-target_link_libraries(unittest_shunique_lock global
- ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS} ${EXTRALIBS})
-set_target_properties(unittest_shunique_lock
- PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-
-# unittest_sharedptr_registry
-add_executable(unittest_sharedptr_registry EXCLUDE_FROM_ALL
- common/test_sharedptr_registry.cc
+set_target_properties(ceph_test_cls_log PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_cls_log
+ librados
+ cls_log_client
+ global
+ radostest
+ ${UNITTEST_LIBS}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ ${CRYPTO_LIBS}
+ ${EXTRALIBS}
)
-add_test(unittest_sharedptr_registry unittest_sharedptr_registry)
-add_dependencies(check unittest_sharedptr_registry)
-target_link_libraries(unittest_sharedptr_registry global
- ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
-set_target_properties(unittest_sharedptr_registry
- PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-# unittest_shared_cache
-add_executable(unittest_shared_cache EXCLUDE_FROM_ALL
- common/test_shared_cache.cc
+add_executable(ceph_test_cls_statelog
+ cls_statelog/test_cls_statelog.cc
)
-add_test(unittest_shared_cache unittest_shared_cache)
-add_dependencies(check unittest_shared_cache)
-target_link_libraries(unittest_shared_cache global
- ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
-set_target_properties(unittest_shared_cache
- PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-
-# unittest_sloppy_crc_map
-add_executable(unittest_sloppy_crc_map EXCLUDE_FROM_ALL
- common/test_sloppy_crc_map.cc
+set_target_properties(ceph_test_cls_statelog PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_cls_statelog
+ librados
+ cls_statelog_client
+ global
+ ${UNITTEST_LIBS}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ ${CRYPTO_LIBS}
+ ${EXTRALIBS}
+ radostest
)
-add_test(unittest_sloppy_crc_map unittest_sloppy_crc_map)
-add_dependencies(check unittest_sloppy_crc_map)
-target_link_libraries(unittest_sloppy_crc_map global
- ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
-set_target_properties(unittest_sloppy_crc_map
- PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-# unittest_time
-set(unittest_time_srcs
- common/test_time.cc
- ${CMAKE_SOURCE_DIR}/src/common/ceph_time.cc
- )
-add_executable(unittest_time
- ${unittest_time_srcs}
+add_executable(ceph_test_cls_replica_log
+ cls_replica_log/test_cls_replica_log.cc
)
-target_link_libraries(unittest_time
+set_target_properties(ceph_test_cls_replica_log PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_cls_replica_log
+ librados
+ cls_replica_log_client
global
+ ${UNITTEST_LIBS}
${BLKID_LIBRARIES}
${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS}
+ ${CRYPTO_LIBS}
+ ${EXTRALIBS}
+ radostest
)
-set_target_properties(unittest_time
- PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-# unittest_util
-add_executable(unittest_util EXCLUDE_FROM_ALL
- common/test_util.cc
- ${CMAKE_SOURCE_DIR}/src/common/util.cc
+add_executable(ceph_test_cls_lock
+ cls_lock/test_cls_lock.cc
)
-add_test(unittest_util unittest_util)
-add_dependencies(check unittest_util)
-target_link_libraries(unittest_util
+set_target_properties(ceph_test_cls_lock PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_cls_lock
+ cls_lock
+ librados
global
+ ${UNITTEST_LIBS}
${BLKID_LIBRARIES}
${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS}
+ ${CRYPTO_LIBS}
+ ${EXTRALIBS}
+ radostest
)
-set_target_properties(unittest_util
- PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-# unittest_crush_wrapper
-add_executable(unittest_crush_wrapper EXCLUDE_FROM_ALL
- crush/CrushWrapper.cc
+add_executable(ceph_test_cls_hello
+ cls_hello/test_cls_hello.cc
)
-add_test(unittest_crush_wrapper unittest_crush_wrapper)
-add_dependencies(check unittest_crush_wrapper)
-target_link_libraries(unittest_crush_wrapper global crush ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_crush_wrapper PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_cls_hello PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
-
-# unittest_crush
-add_executable(unittest_crush EXCLUDE_FROM_ALL
- crush/crush.cc
+target_link_libraries(ceph_test_cls_hello
+ librados
+ global
+ ${EXTRALIBS}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ radostest
+ ${UNITTEST_LIBS}
)
-add_test(unittest_crush unittest_crush)
-add_dependencies(check unittest_crush)
-target_link_libraries(unittest_crush global m ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS} ${EXTRALIBS})
-set_target_properties(unittest_crush PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-# unittest_osdmap
-add_executable(unittest_osdmap EXCLUDE_FROM_ALL
- osd/TestOSDMap.cc
- )
-add_test(unittest_osdmap unittest_osdmap)
-add_dependencies(check unittest_osdmap)
-target_link_libraries(unittest_osdmap global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_osdmap PROPERTIES COMPILE_FLAGS
+add_executable(ceph_test_cls_numops cls_numops/test_cls_numops.cc)
+set_target_properties(ceph_test_cls_numops PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_cls_numops
+ librados
+ global
+ cls_numops_client
+ ${EXTRALIBS}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ radostest
+ ${UNITTEST_LIBS}
+ )
-# unittest_workqueue
-add_executable(unittest_workqueue EXCLUDE_FROM_ALL
- test_workqueue.cc
+if(${WITH_RADOSGW})
+ add_executable(ceph_test_cls_rgw
+ cls_rgw/test_cls_rgw.cc
+ )
+ set_target_properties(ceph_test_cls_rgw PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
+ target_link_libraries(ceph_test_cls_rgw
+ cls_rgw_client
+ librados
+ global
+ ${UNITTEST_LIBS}
+ ${EXTRALIBS}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ radostest)
+endif(${WITH_RADOSGW})
+
+# ceph_test_async_driver
+add_executable(ceph_test_async_driver
+ msgr/test_async_driver.cc
)
-add_test(unittest_workqueue unittest_workqueue)
-add_dependencies(check unittest_workqueue)
-target_link_libraries(unittest_workqueue global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_workqueue PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_async_driver PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_async_driver os global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
-
-# unittest_striper
-add_executable(unittest_striper EXCLUDE_FROM_ALL
- test_striper.cc
+# ceph_test_msgr
+add_executable(ceph_test_msgr
+ msgr/test_msgr.cc
)
-add_test(unittest_striper unittest_striper)
-add_dependencies(check unittest_striper)
-target_link_libraries(unittest_striper global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_striper PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_msgr PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_msgr os global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
-# unittest_prebufferedstreambuf
-add_executable(unittest_prebufferedstreambuf EXCLUDE_FROM_ALL
- test_prebufferedstreambuf.cc
+# ceph_test_mon_workloadgen
+add_executable(ceph_test_mon_workloadgen
+ mon/test_mon_workloadgen.cc
+ )
+target_link_libraries(ceph_test_mon_workloadgen
+ os
+ osdc
+ global
+ ${EXTRALIBS}
+ ${CMAKE_DL_LIBS}
)
-add_test(unittest_prebufferedstreambuf unittest_prebufferedstreambuf)
-add_dependencies(check unittest_prebufferedstreambuf)
-target_link_libraries(unittest_prebufferedstreambuf global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_prebufferedstreambuf PROPERTIES COMPILE_FLAGS
+
+#test_mon_msg
+add_executable(ceph_test_mon_msg mon/test-mon-msg.cc)
+set_target_properties(ceph_test_mon_msg PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_mon_msg os osdc global ${UNITTEST_LIBS})
-# unittest_str_list
-add_executable(unittest_str_list EXCLUDE_FROM_ALL
- test_str_list.cc
- )
-add_test(unittest_str_list unittest_str_list)
-add_dependencies(check unittest_str_list)
-target_link_libraries(unittest_str_list global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_str_list PROPERTIES COMPILE_FLAGS
+#ceph_perf_local
+add_executable(ceph_perf_local
+ perf_local.cc
+ perf_helper.cc)
+#INTEL_SSE & INTEL_SSE2 flags
+set(PERF_LOCAL_FLAGS "${CMAKE_CXX_FLAGS} -msse -msse2")
+set_target_properties(ceph_perf_local PROPERTIES COMPILE_FLAGS
+ ${PERF_LOCAL_FLAGS})
+target_link_libraries(ceph_perf_local os global ${UNITTEST_LIBS})
+
+#ceph_perf_objectstore
+add_executable(ceph_perf_objectstore objectstore/ObjectStoreTransactionBenchmark.cc)
+set_target_properties(ceph_perf_objectstore PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_perf_objectstore os osdc global ${UNITTEST_LIBS})
-# unittest_log
-add_executable(unittest_log EXCLUDE_FROM_ALL
- ${CMAKE_SOURCE_DIR}/src/log/test.cc
- )
-add_test(unittest_log unittest_log)
-add_dependencies(check unittest_log)
-target_link_libraries(unittest_log global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_log PROPERTIES COMPILE_FLAGS
+#ceph_perf_msgr_server
+add_executable(ceph_perf_msgr_server msgr/perf_msgr_server.cc)
+set_target_properties(ceph_perf_msgr_server PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_perf_msgr_server os global ${UNITTEST_LIBS})
-# unittest_throttle
-add_executable(unittest_throttle EXCLUDE_FROM_ALL
- common/Throttle.cc
- )
-add_test(unittest_throttle unittest_throttle)
-add_dependencies(check unittest_throttle)
-target_link_libraries(unittest_throttle global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_throttle PROPERTIES COMPILE_FLAGS
+#ceph_perf_msgr_client
+add_executable(ceph_perf_msgr_client msgr/perf_msgr_client.cc)
+set_target_properties(ceph_perf_msgr_client PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_perf_msgr_client os global ${UNITTEST_LIBS})
-# unittest_base64
-add_executable(unittest_base64 EXCLUDE_FROM_ALL
- base64.cc
+#ceph_test_objectstore
+add_executable(ceph_test_objectstore
+ objectstore/store_test.cc
+ )
+set_target_properties(ceph_test_objectstore PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_objectstore
+ os
+ common
+ ${UNITTEST_LIBS}
+ global
+ ${EXTRALIBS}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
)
-add_test(unittest_base64 unittest_base64)
-add_dependencies(check unittest_base64)
-target_link_libraries(unittest_base64 global ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
-set_target_properties(unittest_base64 PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-# unittest_ceph_argparse
-add_executable(unittest_ceph_argparse EXCLUDE_FROM_ALL
- ceph_argparse.cc
+#ceph_test_keyvaluedb
+add_executable(ceph_test_keyvaluedb
+ objectstore/test_kv.cc
)
-add_test(unittest_ceph_argparse unittest_ceph_argparse)
-add_dependencies(check unittest_ceph_argparse)
-target_link_libraries(unittest_ceph_argparse global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_ceph_argparse PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_keyvaluedb PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
-
-# unittest_ceph_compatset
-add_executable(unittest_ceph_compatset EXCLUDE_FROM_ALL
- ceph_compatset.cc
+target_link_libraries(ceph_test_keyvaluedb
+ os
+ common
+ ${UNITTEST_LIBS}
+ global
+ ${EXTRALIBS}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
)
-add_test(unittest_ceph_compatset unittest_ceph_compatset)
-add_dependencies(check unittest_ceph_compatset)
-target_link_libraries(unittest_ceph_compatset global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_ceph_compatset PROPERTIES COMPILE_FLAGS
+
+#ceph_test_filestore
+add_executable(ceph_test_filestore filestore/TestFileStore.cc)
+set_target_properties(ceph_test_filestore PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_filestore os global ${UNITTEST_LIBS})
-# unittest_mds_types
-add_executable(unittest_mds_types EXCLUDE_FROM_ALL
- fs/mds_types.cc
+# ceph_test_objectstore_workloadgen
+add_executable(ceph_test_objectstore_workloadgen
+ objectstore/workload_generator.cc
+ objectstore/TestObjectStoreState.cc
+ )
+target_link_libraries(ceph_test_objectstore_workloadgen
+ os
+ global
+ ${EXTRALIBS}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
)
-add_test(unittest_mds_types unittest_mds_types)
-add_dependencies(check unittest_mds_types)
-target_link_libraries(unittest_mds_types global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_mds_types PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-# unittest_osd_types
-add_executable(unittest_osd_types EXCLUDE_FROM_ALL
- osd/types.cc
+# ceph_test_filestore_idempotent
+add_executable(ceph_test_filestore_idempotent
+ objectstore/test_idempotent.cc
+ objectstore/FileStoreTracker.cc
+ common/ObjectContents.cc
+ )
+target_link_libraries(ceph_test_filestore_idempotent
+ os
+ global
+ ${EXTRALIBS}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
)
-add_test(unittest_osd_types unittest_osd_types)
-add_dependencies(check unittest_osd_types)
-target_link_libraries(unittest_osd_types global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_osd_types PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-# unittest_lru
-add_executable(unittest_lru EXCLUDE_FROM_ALL
- common/test_lru.cc
+# ceph_test_filestore_idempotent_sequence
+add_executable(ceph_test_filestore_idempotent_sequence
+ objectstore/test_idempotent_sequence.cc
+ objectstore/DeterministicOpSequence.cc
+ objectstore/TestObjectStoreState.cc
+ objectstore/FileStoreDiff.cc
+ )
+target_link_libraries(ceph_test_filestore_idempotent_sequence
+ os
+ global
+ ${EXTRALIBS}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
)
-add_test(unittest_lru unittest_lru)
-add_dependencies(check unittest_lru)
-target_link_libraries(unittest_lru global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_lru PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-# unittest_io_priority
-add_executable(unittest_io_priority EXCLUDE_FROM_ALL
- common/test_io_priority.cc
+# ceph_test_xattr_bench
+add_executable(ceph_test_xattr_bench
+ xattr_bench.cc
)
-add_test(unittest_io_priority unittest_io_priority)
-add_dependencies(check unittest_io_priority)
-target_link_libraries(unittest_io_priority global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_io_priority PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_xattr_bench PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_xattr_bench
+ os
+ common
+ ${UNITTEST_LIBS}
+ global
+ ${EXTRALIBS}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ )
-# unittest_gather
-add_executable(unittest_gather EXCLUDE_FROM_ALL
- gather.cc
+# ceph_test_filejournal
+add_executable(ceph_test_filejournal
+ test_filejournal.cc
)
-add_test(unittest_gather unittest_gather)
-add_dependencies(check unittest_gather)
-target_link_libraries(unittest_gather global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_gather PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_filejournal PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_filejournal
+ os
+ common
+ ${UNITTEST_LIBS}
+ global
+ ${EXTRALIBS}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ ${EXTRALIBS}
+ )
-# run_cmd
-add_executable(unittest_run_cmd EXCLUDE_FROM_ALL
- run_cmd.cc
+# ceph_test_object_map
+add_executable(ceph_test_object_map
+ ObjectMap/test_object_map.cc
+ ObjectMap/KeyValueDBMemory.cc
)
-add_test(unittest_run_cmd unittest_run_cmd)
-add_dependencies(check unittest_run_cmd)
-target_link_libraries(unittest_run_cmd global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_run_cmd PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_object_map PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_object_map
+ os
+ common
+ ${UNITTEST_LIBS}
+ global
+ ${EXTRALIBS}
+ ${CMAKE_DL_LIBS}
+ )
-# signals
-add_executable(unittest_signals EXCLUDE_FROM_ALL
- signals.cc
+# ceph_test_keyvaluedb_atomicity
+add_executable(ceph_test_keyvaluedb_atomicity
+ ObjectMap/test_keyvaluedb_atomicity.cc
)
-add_test(unittest_signals unittest_signals)
-add_dependencies(check unittest_signals)
-target_link_libraries(unittest_signals global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_signals PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_keyvaluedb_atomicity PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_keyvaluedb_atomicity
+ os
+ common
+ ${UNITTEST_LIBS}
+ global
+ ${EXTRALIBS}
+ ${CMAKE_DL_LIBS}
+ )
-# unittest_simple_spin
-add_executable(unittest_simple_spin EXCLUDE_FROM_ALL
- simple_spin.cc
+# ceph_test_keyvaluedb_iterators
+add_executable(ceph_test_keyvaluedb_iterators
+ ObjectMap/test_keyvaluedb_iterators.cc
+ ObjectMap/KeyValueDBMemory.cc
)
-add_test(unittest_simple_spin unittest_simple_spin)
-add_dependencies(check unittest_simple_spin)
-target_link_libraries(unittest_simple_spin global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_simple_spin PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_keyvaluedb_iterators PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_keyvaluedb_iterators
+ os
+ common
+ ${UNITTEST_LIBS}
+ global
+ ${EXTRALIBS}
+ ${CMAKE_DL_LIBS}
+ )
-# unittest_bufferlist
-add_executable(unittest_bufferlist EXCLUDE_FROM_ALL
- bufferlist.cc
+# ceph_smalliobenchfs
+set(ceph_smalliobenchfs_srcs
+ bench/small_io_bench_fs.cc
+ bench/testfilestore_backend.cc
+ bench/detailed_stat_collector.cc
+ bench/bencher.cc
)
-add_test(unittest_bufferlist unittest_bufferlist)
-add_dependencies(check unittest_bufferlist)
-target_link_libraries(unittest_bufferlist global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_bufferlist PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+add_executable(ceph_smalliobenchfs
+ ${ceph_smalliobenchfs_srcs}
+ )
+target_link_libraries(ceph_smalliobenchfs librados ${Boost_PROGRAM_OPTIONS_LIBRARY} os global
+ ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
-# unittest_xlist
-add_executable(unittest_xlist EXCLUDE_FROM_ALL
- test_xlist.cc
+# ceph_smalliobenchdumb
+set(smalliobenchdumb_srcs
+ bench/small_io_bench_dumb.cc
+ bench/dumb_backend.cc
+ bench/detailed_stat_collector.cc
+ bench/bencher.cc
)
-add_test(unittest_xlist unittest_xlist)
-add_dependencies(check unittest_xlist)
-target_link_libraries(unittest_xlist common ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_xlist PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+add_executable(ceph_smalliobenchdumb
+ ${smalliobenchdumb_srcs}
+ )
+target_link_libraries(ceph_smalliobenchdumb librados ${Boost_PROGRAM_OPTIONS_LIBRARY} os global
+ ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
-# unittest_librados
-add_executable(unittest_librados EXCLUDE_FROM_ALL
- librados/librados.cc
+# ceph_test_keys
+add_executable(ceph_test_keys
+ testkeys.cc
)
-add_test(unittest_librados unittest_librados)
-add_dependencies(check unittest_librados)
-target_link_libraries(unittest_librados
- librados
+target_link_libraries(ceph_test_keys mon global ${CMAKE_DL_LIBS})
+
+# get_command_descriptions
+add_executable(get_command_descriptions
+ common/get_command_descriptions.cc
+ ${CMAKE_SOURCE_DIR}/src/common/TextTable.cc
+ )
+target_link_libraries(get_command_descriptions
+ mon
global
+ leveldb
+ ${EXTRALIBS}
${BLKID_LIBRARIES}
${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS}
)
-set_target_properties(unittest_librados PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-# unittest_crc32c
-add_executable(unittest_crc32c EXCLUDE_FROM_ALL
- common/test_crc32c.cc
+# ceph_tpbench
+set(tpbench_srcs
+ bench/tp_bench.cc
+ bench/detailed_stat_collector.cc)
+add_executable(ceph_tpbench
+ ${tpbench_srcs}
)
-add_test(unittest_crc32c unittest_crc32c)
-add_dependencies(check unittest_crc32c)
-target_link_libraries(unittest_crc32c global ${CMAKE_DL_LIBS} ${ALLOC_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_crc32c PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_tpbench librados ${Boost_PROGRAM_OPTIONS_LIBRARY} global
+ ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
-# unittest_arch
-add_executable(unittest_arch EXCLUDE_FROM_ALL
- test_arch.cc
+# ceph_test_snap_mapper
+add_executable(ceph_test_snap_mapper EXCLUDE_FROM_ALL
+ test_snap_mapper.cc
)
-add_test(unittest_arch unittest_arch)
-add_dependencies(check unittest_arch)
-target_link_libraries(unittest_arch global ${CMAKE_DL_LIBS} ${ALLOC_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_arch PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_snap_mapper osd global ${BLKID_LIBRARIES})
-# unittest_crypto
-add_executable(unittest_crypto
- crypto.cc
+add_executable(ceph_test_rados_api_cmd
+ librados/cmd.cc
)
-add_test(unittest_crypto unittest_crypto)
-add_dependencies(check unittest_crypto)
-target_link_libraries(unittest_crypto global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_crypto PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_rados_api_cmd PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_rados_api_cmd
+ librados global ${UNITTEST_LIBS} radostest)
-# unittest_crypto_init
-add_executable(unittest_crypto_init EXCLUDE_FROM_ALL
- crypto_init.cc
+add_executable(ceph_test_rados_api_io
+ librados/io.cc
)
-add_test(unittest_crypto_init unittest_crypto_init)
-add_dependencies(check unittest_crypto_init)
-target_link_libraries(unittest_crypto_init global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_crypto_init PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_rados_api_io PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_rados_api_io
+ librados ${UNITTEST_LIBS} radostest)
-# unittest_perf_counters
-add_executable(unittest_perf_counters EXCLUDE_FROM_ALL
- perf_counters.cc
+add_executable(ceph_test_rados_api_c_write_operations
+ librados/c_write_operations.cc
)
-add_test(unittest_perf_counters unittest_perf_counters)
-add_dependencies(check unittest_perf_counters)
-target_link_libraries(unittest_perf_counters global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_perf_counters PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+set_target_properties(ceph_test_rados_api_c_write_operations PROPERTIES
+ COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_rados_api_c_write_operations
+ librados ${UNITTEST_LIBS} radostest)
-# unittest_ceph_crypto
-add_executable(unittest_ceph_crypto EXCLUDE_FROM_ALL
- ceph_crypto.cc
+add_executable(ceph_test_rados_api_c_read_operations
+ librados/c_read_operations.cc
)
-add_test(unittest_ceph_crypto unittest_ceph_crypto)
-add_dependencies(check unittest_ceph_crypto)
-target_link_libraries(unittest_ceph_crypto global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_ceph_crypto PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_rados_api_c_read_operations PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_rados_api_c_read_operations
+ librados ${UNITTEST_LIBS} radostest)
-# unittest_utf8
-add_executable(unittest_utf8 EXCLUDE_FROM_ALL
- utf8.cc
+add_executable(ceph_test_rados_api_aio
+ librados/aio.cc
)
-add_test(unittest_utf8 unittest_utf8)
-add_dependencies(check unittest_utf8)
-target_link_libraries(unittest_utf8 global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_utf8 PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_rados_api_aio PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_rados_api_aio
+ librados ${UNITTEST_LIBS} radostest)
-# unittest_mime
-add_executable(unittest_mime EXCLUDE_FROM_ALL
- mime.cc
+add_executable(ceph_test_rados_api_list
+ librados/list.cc
)
-add_test(unittest_mime unittest_mime)
-add_dependencies(check unittest_mime)
-target_link_libraries(unittest_mime global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_mime PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_rados_api_list PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_rados_api_list
+ librados ${UNITTEST_LIBS} radostest)
-# unittest_escape
-add_executable(unittest_escape EXCLUDE_FROM_ALL
- escape.cc
+add_executable(ceph_test_rados_api_nlist
+ librados/nlist.cc
)
-add_test(unittest_escape unittest_escape)
-add_dependencies(check unittest_escape)
-target_link_libraries(unittest_escape global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_escape PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_rados_api_nlist PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_rados_api_nlist
+ librados ${UNITTEST_LIBS} radostest)
-# unittest_strtol
-add_executable(unittest_strtol EXCLUDE_FROM_ALL
- strtol.cc
+add_executable(ceph_test_rados_api_pool
+ librados/pool.cc
)
-add_test(unittest_strtol unittest_strtol)
-add_dependencies(check unittest_strtol)
-target_link_libraries(unittest_strtol global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_strtol PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+set_target_properties(ceph_test_rados_api_pool PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS}
+ )
+target_link_libraries(ceph_test_rados_api_pool
+ librados ${UNITTEST_LIBS} radostest)
-# unittest_confutils
-add_executable(unittest_confutils EXCLUDE_FROM_ALL
- confutils.cc
+add_executable(ceph_test_rados_api_stat
+ librados/stat.cc
)
-add_test(unittest_confutils unittest_confutils)
-add_dependencies(check unittest_confutils)
-target_link_libraries(unittest_confutils global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_confutils PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_rados_api_stat PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_rados_api_stat
+ librados ${UNITTEST_LIBS} radostest)
-# unittest_config
-add_executable(unittest_config EXCLUDE_FROM_ALL
- common/test_config.cc
+add_executable(ceph_test_rados_api_watch_notify
+ librados/watch_notify.cc
)
-add_test(unittest_config unittest_config)
-add_dependencies(check unittest_config)
-target_link_libraries(unittest_config global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_config PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_rados_api_watch_notify PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_rados_api_watch_notify
+ librados ${UNITTEST_LIBS} radostest)
-# unittest_context
-add_executable(unittest_context EXCLUDE_FROM_ALL
- common/test_context.cc
+add_executable(ceph_test_rados_api_cls
+ librados/cls.cc
)
-add_test(unittest_context unittest_context)
-add_dependencies(check unittest_context)
-target_link_libraries(unittest_context global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_context PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_rados_api_cls PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_rados_api_cls
+ librados ${UNITTEST_LIBS} radostest)
-# unittest_safe_io
-add_executable(unittest_safe_io EXCLUDE_FROM_ALL
- common/test_safe_io.cc
+add_executable(ceph_test_rados_api_misc
+ librados/misc.cc
)
-add_test(unittest_safe_io unittest_safe_io)
-add_dependencies(check unittest_safe_io)
-target_link_libraries(unittest_safe_io global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_safe_io PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_rados_api_misc PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_rados_api_misc
+ librados global ${UNITTEST_LIBS} radostest)
-# unittest_heartbeatmap
-add_executable(unittest_heartbeatmap EXCLUDE_FROM_ALL
- heartbeat_map.cc
+add_executable(ceph_test_rados_api_lock
+ librados/lock.cc
)
-add_test(unittest_heartbeatmap unittest_heartbeatmap)
-add_dependencies(check unittest_heartbeatmap)
-target_link_libraries(unittest_heartbeatmap global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_heartbeatmap PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_rados_api_lock PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_rados_api_lock
+ librados ${UNITTEST_LIBS} radostest)
-if(${WITH_RADOSGW})
- # unittest_formatter
- # why does this include rgw/rgw_formats.cc...?
- add_executable(unittest_formatter EXCLUDE_FROM_ALL
- ${CMAKE_SOURCE_DIR}/src/rgw/rgw_formats.cc
+add_executable(ceph_test_rados_api_tier
+ librados/tier.cc
)
- add_test(unittest_formatter unittest_formatter)
- add_dependencies(check unittest_formatter)
- target_link_libraries(unittest_formatter global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
- set_target_properties(unittest_formatter PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-endif(${WITH_RADOSGW})
+set_target_properties(ceph_test_rados_api_tier PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_rados_api_tier
+ global librados ${UNITTEST_LIBS} ${Boost_SYSTEM_LIBRARY} radostest)
-# unittest_daemon_config
-add_executable(unittest_daemon_config EXCLUDE_FROM_ALL
- daemon_config.cc
- )
-add_test(unittest_daemon_config unittest_daemon_config)
-add_dependencies(check unittest_daemon_config)
-target_link_libraries(unittest_daemon_config
- common
- global
- ${UNITTEST_LIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
- ${EXTRALIBS}
+add_executable(ceph_test_rados_api_snapshots
+ librados/snapshots.cc
)
-set_target_properties(unittest_daemon_config PROPERTIES COMPILE_FLAGS
+set_target_properties(ceph_test_rados_api_snapshots PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_rados_api_snapshots
+ librados ${UNITTEST_LIBS} radostest)
-# unittest_libcephfs_config
-add_executable(unittest_libcephfs_config EXCLUDE_FROM_ALL
- libcephfs_config.cc
- )
-add_test(unittest_libcephfs_config unittest_libcephfs_config)
-add_dependencies(check unittest_libcephfs_config)
-target_link_libraries(unittest_libcephfs_config cephfs ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_libcephfs_config PROPERTIES COMPILE_FLAGS
+add_library(rados_striper_test STATIC libradosstriper/TestCase.cc)
+target_link_libraries(rados_striper_test radostest)
+set_target_properties(rados_striper_test PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
-# unittest_lfnindex
-add_executable(unittest_lfnindex EXCLUDE_FROM_ALL
- os/TestLFNIndex.cc
+add_executable(ceph_test_rados_api_striping
+ libradosstriper/striping.cc
)
-add_test(unittest_lfnindex unittest_lfnindex)
-add_dependencies(check unittest_lfnindex)
-target_link_libraries(unittest_lfnindex os global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_lfnindex PROPERTIES COMPILE_FLAGS
+target_link_libraries(ceph_test_rados_api_striping librados libradosstriper
+ ${UNITTEST_LIBS} rados_striper_test)
+set_target_properties(ceph_test_rados_api_striping PROPERTIES COMPILE_FLAGS
${UNITTEST_CXX_FLAGS})
-# unittest_librados_config
-set(unittest_librados_config_srcs librados/librados_config.cc)
-add_executable(unittest_librados_config EXCLUDE_FROM_ALL
- ${unittest_librados_config_srcs}
+if(${WITH_CEPHFS})
+ add_executable(ceph_test_libcephfs
+ libcephfs/test.cc
+ libcephfs/readdir_r_cb.cc
+ libcephfs/caps.cc
+ libcephfs/multiclient.cc
+ libcephfs/flock.cc
+ libcephfs/acl.cc
+ libcephfs/access.cc
)
-add_test(unittest_librados_config unittest_librados_config)
-add_dependencies(check unittest_librados_config)
-target_link_libraries(unittest_librados_config
+ set_target_properties(ceph_test_libcephfs PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
+ target_link_libraries(ceph_test_libcephfs
+ cephfs
+ librados
+ ${UNITTEST_LIBS}
+ ${EXTRALIBS}
+ ${CMAKE_DL_LIBS}
+ )
+endif(${WITH_CEPHFS})
+
+# unittest_transaction
+add_executable(unittest_transaction EXCLUDE_FROM_ALL
+ objectstore/test_transaction.cc)
+add_ceph_unittest(unittest_transaction ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_transaction)
+target_link_libraries(unittest_transaction os common)
+
+add_executable(ceph_test_stress_watch
+ test_stress_watch.cc
+ )
+set_target_properties(ceph_test_stress_watch PROPERTIES COMPILE_FLAGS
+ ${UNITTEST_CXX_FLAGS})
+target_link_libraries(ceph_test_stress_watch
librados
global
+ ${UNITTEST_LIBS}
+ radostest
+ ${EXTRALIBS}
${BLKID_LIBRARIES}
${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS}
)
-set_target_properties(unittest_librados_config PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-# unittest_rbd_replay
-add_executable(unittest_rbd_replay EXCLUDE_FROM_ALL
- test_rbd_replay.cc
- $<TARGET_OBJECTS:parse_secret_objs>
-)
-add_test(unittest_rbd_replay unittest_rbd_replay)
-add_dependencies(check unittest_rbd_replay)
-target_link_libraries(unittest_rbd_replay
- librbd
- librados
+add_executable(ceph_test_objectcacher_stress
+ osdc/object_cacher_stress.cc
+ osdc/FakeWriteback.cc
+ )
+target_link_libraries(ceph_test_objectcacher_stress
+ osdc
global
- rbd_replay
- rbd_replay_ios
- keyutils
+ ${EXTRALIBS}
+ ${CMAKE_DL_LIBS}
+ )
+
+if(${HAVE_FUSE})
+ add_executable(ceph_test_cfuse_cache_invalidate
+ test_cfuse_cache_invalidate.cc
+ )
+ target_link_libraries(ceph_test_cfuse_cache_invalidate
+ global
+ os
+ ${EXTRALIBS}
+ ${CMAKE_DL_LIBS}
+ )
+endif(${HAVE_FUSE})
+
+if(${WITH_CEPHFS})
+ add_executable(test_c_headers
+ test_c_headers.c
+ )
+ target_link_libraries(test_c_headers
+ librados
+ cephfs
+ ${EXTRALIBS}
+ ${BLKID_LIBRARIES}
+ ${CMAKE_DL_LIBS}
+ )
+endif(${WITH_CEPHFS})
+
+add_executable(ceph_test_get_blkdev_size
+ test_get_blkdev_size.cc
+ )
+target_link_libraries(ceph_test_get_blkdev_size
+ common
+ pthread
+ ${EXTRALIBS}
${BLKID_LIBRARIES}
${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS}
-)
-set_target_properties(unittest_rbd_replay PROPERTIES COMPILE_FLAGS
-${UNITTEST_CXX_FLAGS})
+ )
-# unittest_mon_moncap
-add_executable(unittest_mon_moncap EXCLUDE_FROM_ALL
- ${unittest_mon_moncap_srcs}
- mon/moncap.cc
+add_executable(simple_server
+ messenger/simple_server.cc
+ messenger/simple_dispatcher.cc
+ )
+target_link_libraries(simple_server
+ os global common ${Boost_REGEX_LIBRARY}
+ ${EXTRALIBS}
+ ${CMAKE_DL_LIBS}
)
-add_test(unittest_mon_moncap unittest_mon_moncap)
-add_dependencies(check unittest_mon_moncap)
-target_link_libraries(unittest_mon_moncap mon global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_mon_moncap PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-# unittest_mon_pgmap
-add_executable(unittest_mon_pgmap EXCLUDE_FROM_ALL
- mon/PGMap.cc
- ${unittest_mon_moncap_srcs}
+add_executable(simple_client
+ messenger/simple_client.cc
+ messenger/simple_dispatcher.cc
+ )
+target_link_libraries(simple_client
+ os global common ${Boost_REGEX_LIBRARY}
+ ${EXTRALIBS}
+ ${CMAKE_DL_LIBS}
)
-add_test(unittest_mon_pgmap unittest_mon_pgmap)
-add_dependencies(check unittest_mon_pgmap)
-target_link_libraries(unittest_mon_pgmap mon global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_mon_pgmap PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-# unittest_ecbackend
-add_executable(unittest_ecbackend EXCLUDE_FROM_ALL
- osd/TestECBackend.cc
+if(HAVE_XIO)
+ add_executable(xio_server
+ messenger/xio_server.cc
+ messenger/xio_dispatcher.cc
+ )
+ target_link_libraries(xio_server
+ os global common ${Boost_REGEX_LIBRARY}
+ ${Xio_LIBRARY} ibverbs rdmacm pthread rt
+ ${EXTRALIBS}
+ ${CMAKE_DL_LIBS}
+ )
+
+ add_executable(xio_client
+ messenger/xio_client.cc
+ messenger/xio_dispatcher.cc
+ )
+ target_link_libraries(xio_client
+ os global common ${Boost_REGEX_LIBRARY}
+ ${Xio_LIBRARY} ibverbs rdmacm pthread rt
+ ${EXTRALIBS}
+ ${CMAKE_DL_LIBS}
+ )
+endif(HAVE_XIO)
+
+#make check starts here
+
+#following dependencies are run inside make check unit tests
+add_dependencies(check
+ ceph-mon
+ ceph
+ ceph-authtool
+ get_command_descriptions
+ crushtool
+ ceph-conf
+ rados
+ ceph-mds
+ monmaptool
+ ceph-osd
+ ceph-dencoder
+ ceph-objectstore-tool
+ osdmaptool
+ rbd
+ radosgw-admin)
+
+add_ceph_test(test-ceph-helpers.sh ${CMAKE_CURRENT_SOURCE_DIR}/test-ceph-helpers.sh)
+add_ceph_test(erasure-decode-non-regression.sh ${CMAKE_SOURCE_DIR}/qa/workunits/erasure-code/encode-decode-non-regression.sh)
+
+add_ceph_test(ceph_objectstore_tool.py ${CMAKE_CURRENT_SOURCE_DIR}/ceph_objectstore_tool.py)
+add_ceph_test(cephtool-test-mds.sh ${CMAKE_CURRENT_SOURCE_DIR}/cephtool-test-mds.sh)
+add_ceph_test(cephtool-test-mon.sh ${CMAKE_CURRENT_SOURCE_DIR}/cephtool-test-mon.sh)
+add_ceph_test(cephtool-test-osd.sh ${CMAKE_CURRENT_SOURCE_DIR}/cephtool-test-osd.sh)
+add_ceph_test(cephtool-test-rados.sh ${CMAKE_CURRENT_SOURCE_DIR}/cephtool-test-rados.sh)
+add_ceph_test(run-rbd-unit-tests.sh ${CMAKE_CURRENT_SOURCE_DIR}/run-rbd-unit-tests.sh)
+add_ceph_test(run-cli-tests ${CMAKE_CURRENT_SOURCE_DIR}/run-cli-tests)
+add_ceph_test(test_objectstore_memstore.sh ${CMAKE_CURRENT_SOURCE_DIR}/test_objectstore_memstore.sh)
+add_ceph_test(test_pidfile.sh ${CMAKE_CURRENT_SOURCE_DIR}/test_pidfile.sh)
+add_ceph_test(unittest_bufferlist.sh ${CMAKE_SOURCE_DIR}/src/unittest_bufferlist.sh)
+
+add_test(NAME run-tox-ceph-disk COMMAND bash ${CMAKE_SOURCE_DIR}/src/ceph-disk/run-tox.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
+add_dependencies(check run-tox-ceph-disk)
+
+add_test(NAME run-tox-ceph-detect-init COMMAND bash ${CMAKE_SOURCE_DIR}/src/ceph-detect-init/run-tox.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src)
+add_dependencies(check run-tox-ceph-disk)
+
+
+# common directory
+# unittest_blkdev
+add_executable(unittest_blkdev EXCLUDE_FROM_ALL
+ common/test_blkdev.cc
)
-add_test(unittest_ecbackend unittest_ecbackend)
-add_dependencies(check unittest_ecbackend)
-target_link_libraries(unittest_ecbackend osd global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_ecbackend PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+add_ceph_unittest(unittest_blkdev ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_blkdev)
+target_link_libraries(unittest_blkdev global ${BLKID_LIBRARIES})
-# unittest_osdscrub
-add_executable(unittest_osdscrub EXCLUDE_FROM_ALL
- osd/TestOSDScrub.cc
+# crush directory
+# unittest_crush_wrapper
+add_executable(unittest_crush_wrapper EXCLUDE_FROM_ALL
+ crush/CrushWrapper.cc
)
-add_test(unittest_osdscrub unittest_osdscrub)
-add_dependencies(check unittest_osdscrub)
-target_link_libraries(unittest_osdscrub osd global dl os mon ${CMAKE_DL_LIBS}
- ${BLKID_LIBRARIES} ${UNITTEST_LIBS})
-set_target_properties(unittest_osdscrub PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+add_ceph_unittest(unittest_crush_wrapper ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_crush_wrapper)
+target_link_libraries(unittest_crush_wrapper global crush ${BLKID_LIBRARIES})
-# unittest_pglog
-add_executable(unittest_pglog EXCLUDE_FROM_ALL
- osd/TestPGLog.cc
+# unittest_crush
+add_executable(unittest_crush EXCLUDE_FROM_ALL
+ crush/crush.cc
)
-add_test(unittest_pglog unittest_pglog)
-add_dependencies(check unittest_pglog)
-target_link_libraries(unittest_pglog osd global dl ${CMAKE_DL_LIBS}
- ${BLKID_LIBRARIES} ${UNITTEST_LIBS})
-set_target_properties(unittest_pglog PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+add_ceph_unittest(unittest_crush ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_crush)
+target_link_libraries(unittest_crush global m ${BLKID_LIBRARIES})
-# unittest_hitset
-add_executable(unittest_hitset EXCLUDE_FROM_ALL
- osd/hitset.cc
+# unittest_bloom_filter
+add_executable(unittest_bloom_filter EXCLUDE_FROM_ALL
+ common/test_bloom_filter.cc
)
-add_test(unittest_hitset unittest_hitset)
-add_dependencies(check unittest_hitset)
-target_link_libraries(unittest_hitset osd global ${CMAKE_DL_LIBS}
- ${BLKID_LIBRARIES} ${UNITTEST_LIBS})
-set_target_properties(unittest_hitset PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+add_ceph_unittest(unittest_bloom_filter ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_bloom_filter)
+target_link_libraries(unittest_bloom_filter global ${BLKID_LIBRARIES})
-# unittest_osd_osdcap
-add_executable(unittest_osd_osdcap EXCLUDE_FROM_ALL
- osd/osdcap.cc
-)
-add_test(unittest_osd_osdcap unittest_osd_osdcap)
-add_dependencies(check unittest_osd_osdcap)
-target_link_libraries(unittest_osd_osdcap osd global ${CMAKE_DL_LIBS}
-${BLKID_LIBRARIES} ${UNITTEST_LIBS})
-set_target_properties(unittest_osd_osdcap PROPERTIES COMPILE_FLAGS
-${UNITTEST_CXX_FLAGS})
-
-# unittest_snap_mapper
-add_executable(unittest_snap_mapper EXCLUDE_FROM_ALL
- test_snap_mapper.cc
+# unittest_histogram
+add_executable(unittest_histogram EXCLUDE_FROM_ALL
+ common/histogram.cc
)
-add_test(unittest_snap_mapper unittest_snap_mapper)
-add_dependencies(check unittest_snap_mapper)
-target_link_libraries(unittest_snap_mapper osd global ${CMAKE_DL_LIBS}
- ${BLKID_LIBRARIES} ${UNITTEST_LIBS})
-set_target_properties(unittest_snap_mapper PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+add_ceph_unittest(unittest_histogram ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_histogram)
+target_link_libraries(unittest_histogram global ${BLKID_LIBRARIES})
-# unittest_mds_authcap
-add_executable(unittest_mds_authcap EXCLUDE_FROM_ALL
- mds/TestMDSAuthCaps.cc
+# unittest_prioritized_queue
+add_executable(unittest_prioritized_queue EXCLUDE_FROM_ALL
+ common/test_prioritized_queue.cc
)
-add_test(unittest_mds_authcap unittest_mds_authcap)
-add_dependencies(check unittest_mds_authcap)
-target_link_libraries(unittest_mds_authcap mds global ${CMAKE_DL_LIBS}
- ${BLKID_LIBRARIES} ${UNITTEST_LIBS})
-set_target_properties(unittest_mds_authcap PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+add_ceph_unittest(unittest_prioritized_queue ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_prioritized_queue)
+target_link_libraries(unittest_prioritized_queue global ${BLKID_LIBRARIES})
-# unittest_mds_sessionfilter
-add_executable(unittest_mds_sessionfilter EXCLUDE_FROM_ALL
- mds/TestSessionFilter.cc
- $<TARGET_OBJECTS:common_util_obj>
+# unittest_str_map
+add_executable(unittest_str_map EXCLUDE_FROM_ALL
+ common/test_str_map.cc
)
-add_test(unittest_mds_sessionfilter unittest_mds_sessionfilter)
-add_dependencies(check unittest_mds_sessionfilter)
-target_link_libraries(unittest_mds_sessionfilter mds osdc common global
- ${CMAKE_DL_LIBS} ${BLKID_LIBRARIES} ${UNITTEST_LIBS})
-set_target_properties(unittest_mds_sessionfilter PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+add_ceph_unittest(unittest_str_map ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_str_map)
+target_link_libraries(unittest_str_map common global ${BLKID_LIBRARIES})
-# unittest_ipaddr
-add_executable(unittest_ipaddr EXCLUDE_FROM_ALL
- test_ipaddr.cc)
-add_test(unittest_ipaddr unittest_ipaddr)
-add_dependencies(check unittest_ipaddr)
-target_link_libraries(unittest_ipaddr mon global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_ipaddr PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
-# unittest_texttable
-add_executable(unittest_texttable EXCLUDE_FROM_ALL
- test_texttable.cc
- ${CMAKE_SOURCE_DIR}/src/common/TextTable.cc
- )
-add_test(unittest_texttable unittest_texttable)
-add_dependencies(check unittest_texttable)
-target_link_libraries(unittest_texttable mon global ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_texttable PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
-# unittest_on_exit
-add_executable(unittest_on_exit EXCLUDE_FROM_ALL
- on_exit.cc
- )
-add_test(unittest_on_exit unittest_on_exit)
-add_dependencies(check unittest_on_exit)
-target_link_libraries(unittest_on_exit
- global
- ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-add_test(unittest_on_exit unittest_on_exit)
-add_dependencies(check unittest_on_exit)
-set_target_properties(unittest_on_exit PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
-# unittest_readahead
-add_executable(unittest_readahead EXCLUDE_FROM_ALL
- common/Readahead.cc
- )
-add_test(unittest_readahead unittest_readahead)
-add_dependencies(check unittest_readahead)
-target_link_libraries(unittest_readahead
- global
- ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-add_test(unittest_readahead unittest_readahead)
-add_dependencies(check unittest_readahead)
-set_target_properties(unittest_readahead PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
-# unittest_tableformatter
-add_executable(unittest_tableformatter EXCLUDE_FROM_ALL
- common/test_tableformatter.cc
- )
-add_test(unittest_tableformatter unittest_tableformatter)
-add_dependencies(check unittest_tableformatter)
-target_link_libraries(unittest_tableformatter
- global
- ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-add_test(unittest_tableformatter unittest_tableformatter)
-add_dependencies(check unittest_tableformatter)
-set_target_properties(unittest_tableformatter PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
-# unittest_bit_vector
-add_executable(unittest_bit_vector EXCLUDE_FROM_ALL
- common/test_bit_vector.cc
- )
-add_test(unittest_bit_vector unittest_bit_vector)
-add_dependencies(check unittest_bit_vector)
-target_link_libraries(unittest_bit_vector
- global
- ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-add_test(unittest_bit_vector unittest_bit_vector)
-add_dependencies(check unittest_bit_vector)
-set_target_properties(unittest_bit_vector PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
-# unittest_interval_set
-add_executable(unittest_interval_set EXCLUDE_FROM_ALL
- common/test_interval_set.cc
- )
-add_test(unittest_interval_set unittest_interval_set)
-add_dependencies(check unittest_interval_set)
-target_link_libraries(unittest_interval_set
- global
- ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-add_test(unittest_interval_set unittest_interval_set)
-add_dependencies(check unittest_interval_set)
-set_target_properties(unittest_interval_set PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
-# unittest_subprocess
-add_executable(unittest_subprocess EXCLUDE_FROM_ALL
- test_subprocess.cc
- )
-add_dependencies(check unittest_subprocess)
-target_link_libraries(unittest_subprocess
- global
- ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_subprocess PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
-# unittest_pageset
-add_executable(unittest_pageset EXCLUDE_FROM_ALL test_pageset.cc)
-add_test(unittest_pageset unittest_pageset)
-add_dependencies(check unittest_pageset)
-target_link_libraries(unittest_pageset ${UNITTEST_LIBS})
-set_target_properties(unittest_pageset PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
-# unittest_async_compressor
-add_executable(unittest_async_compressor EXCLUDE_FROM_ALL
- common/test_async_compressor.cc
-)
-add_dependencies(check unittest_async_compressor)
-target_link_libraries(unittest_async_compressor
- global
- compressor
- ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS})
-set_target_properties(unittest_async_compressor PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
-# unittest_rocksdb_option
-add_executable(unittest_rocksdb_option EXCLUDE_FROM_ALL
- objectstore/TestRocksdbOptionParse.cc
- )
-add_test(unittest_rocksdb_option unittest_rocksdb_option)
-add_dependencies(check unittest_rocksdb_option)
-target_link_libraries(unittest_rocksdb_option global os ${CMAKE_DL_LIBS}
- ${BLKID_LIBRARIES} ${UNITTEST_LIBS})
-set_target_properties(unittest_rocksdb_option PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-
-# unittest_bluefs
-add_executable(unittest_bluefs EXCLUDE_FROM_ALL objectstore/test_bluefs.cc)
-add_test(unittest_bluefs unittest_bluefs)
-add_dependencies(check unittest_bluefs)
-target_link_libraries(unittest_bluefs os global ${UNITTEST_LIBS})
-set_target_properties(unittest_bluefs PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
-# unittest_bluestore_types
-add_executable(unittest_bluestore_types EXCLUDE_FROM_ALL objectstore/test_bluestore_types.cc)
-add_test(unittest_bluestore_types unittest_bluestore_types)
-add_dependencies(check unittest_bluestore_types)
-target_link_libraries(unittest_bluestore_types os global ${UNITTEST_LIBS})
-set_target_properties(unittest_bluestore_types PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
-add_subdirectory(erasure-code EXCLUDE_FROM_ALL)
-
-#make check ends here
-
-if(${WITH_RADOSGW})
- add_subdirectory(rgw)
- # test_cors
- set(test_cors_srcs test_cors.cc)
- add_executable(test_cors
- ${test_cors_srcs}
- )
- target_link_libraries(test_cors
- librados
- rgw_a
- global
- curl
- expat
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
- set_target_properties(test_cors PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
- # test_rgw_manifest
- set(test_rgw_manifest_srcs rgw/test_rgw_manifest.cc)
- add_executable(test_rgw_manifest
- ${test_rgw_manifest_srcs}
- )
- target_link_libraries(test_rgw_manifest
- rgw_a
- ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS}
- ${CRYPTO_LIBS}
- )
- set_target_properties(test_rgw_manifest PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
- # test_rgw_obj
- set(test_rgw_obj_srcs rgw/test_rgw_obj.cc)
- add_executable(test_rgw_obj
- ${test_rgw_obj_srcs}
- )
- target_link_libraries(test_rgw_obj
- rgw_a
- cls_rgw_client
- cls_lock_client
- cls_refcount_client
- cls_log_client
- cls_statelog_client
- cls_version_client
- cls_replica_log_client
- cls_kvs
- cls_user_client
- librados
- global
- curl
- uuid
- expat
- ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS}
- ${CRYPTO_LIBS}
- )
- set_target_properties(test_rgw_obj PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
- # test_cls_rgw_meta
- set(test_cls_rgw_meta_srcs test_rgw_admin_meta.cc)
- add_executable(test_cls_rgw_meta
- ${test_cls_rgw_meta_srcs}
- )
- target_link_libraries(test_cls_rgw_meta
- rgw_a
- boost_regex
- ${Boost_REGEX_LIBRARY}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS} ${UNITTEST_LIBS} ${CRYPTO_LIBS})
- set_target_properties(test_cls_rgw_meta PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
- # test_cls_rgw_log
- set(test_cls_rgw_log_srcs
- test_rgw_admin_log.cc
- )
- add_executable(test_cls_rgw_log
- ${test_cls_rgw_log_srcs}
- )
- target_link_libraries(test_cls_rgw_log
- rgw_a
- global
- curl
- expat
- cls_version_client
- cls_log_client
- cls_statelog_client
- cls_refcount_client
- cls_rgw_client
- cls_user_client
- cls_lock_client
- cls_timeindex_client
- ${Boost_REGEX_LIBRARY}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS}
- ${EXTRALIBS}
- ${CRYPTO_LIBS}
- )
- set_target_properties(test_cls_rgw_log PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-
- # test_cls_rgw_opstate
- set(test_cls_rgw_opstate_srcs test_rgw_admin_opstate.cc)
- add_executable(test_cls_rgw_opstate
- ${test_cls_rgw_opstate_srcs}
- )
- target_link_libraries(test_cls_rgw_opstate
- rgw_a
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
- ${UNITTEST_LIBS}
- ${CRYPTO_LIBS}
- ${EXTRALIBS}
- )
- set_target_properties(test_cls_rgw_opstate PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-endif(${WITH_RADOSGW})
-
-# radostest
-set(libradostest_srcs librados/test.cc librados/TestCase.cc)
-add_library(radostest STATIC ${libradostest_srcs})
-set_target_properties(radostest PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-
-# multi_stress_watch
-add_executable(multi_stress_watch
- multi_stress_watch.cc
- )
-target_link_libraries(multi_stress_watch librados global radostest
- ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS})
-
-set(librados_test_stub_srcs
- librados_test_stub/LibradosTestStub.cc
- librados_test_stub/TestClassHandler.cc
- librados_test_stub/TestIoCtxImpl.cc
- librados_test_stub/TestMemIoCtxImpl.cc
- librados_test_stub/TestMemRadosClient.cc
- librados_test_stub/TestRadosClient.cc)
-add_library(librados_test_stub STATIC ${librados_test_stub_srcs})
-
-# unittest_librbd
-add_executable(unittest_librbd EXCLUDE_FROM_ALL
- librbd/test_librbd.cc
- librbd/test_fixture.cc
- librbd/test_ImageWatcher.cc
- librbd/test_internal.cc
- librbd/test_mirroring.cc
- librbd/test_support.cc
- librbd/test_main.cc
- ${CMAKE_SOURCE_DIR}/src/common/TextTable.cc
- ${CMAKE_SOURCE_DIR}/src/common/secret.c
- )
-add_dependencies(check unittest_librbd)
-set_target_properties(unittest_librbd PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-if(${WITH_LTTNG})
- target_link_libraries(unittest_librbd librbd_tp)
-endif(${WITH_LTTNG})
-target_link_libraries(unittest_librbd
- librbd
- librados
- journal
- cls_journal_client
- librados_api
- librados_test_stub
- ${UNITTEST_LIBS}
- global
- ${CMAKE_DL_LIBS}
- ${CRYPTO_LIBS}
- ${EXTRALIBS}
- blkid
- udev
- keyutils
- radostest
- )
-
-add_executable(test_librbd_fsx
- librbd/fsx.cc
- ${CMAKE_SOURCE_DIR}/src/common/TextTable.cc
- ${CMAKE_SOURCE_DIR}/src/common/secret.c
- )
-target_link_libraries(test_librbd_fsx
- librbd
- librados
- global
- m
- ${CMAKE_DL_LIBS}
- ${CRYPTO_LIBS}
- ${EXTRALIBS}
- blkid
- udev
- keyutils
- )
-
-add_executable(test_cls_rbd
- cls_rbd/test_cls_rbd.cc
- ${CMAKE_SOURCE_DIR}/src/common/TextTable.cc
- ${CMAKE_SOURCE_DIR}/src/common/secret.c
- )
-set_target_properties(test_cls_rbd PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_cls_rbd
- librbd
- cls_rbd
- cls_lock
- librados
- global
- ${UNITTEST_LIBS}
- ${CMAKE_DL_LIBS}
- ${CRYPTO_LIBS}
- ${EXTRALIBS}
- radostest
- blkid
- udev
- keyutils
- )
-
-add_executable(test_cls_refcount
- cls_refcount/test_cls_refcount.cc
- )
-set_target_properties(test_cls_refcount PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_cls_refcount
- librados
- cls_refcount_client
- global
- ${UNITTEST_LIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
- ${CRYPTO_LIBS}
- ${EXTRALIBS}
- radostest
- )
-
-add_executable(test_cls_version
- cls_version/test_cls_version.cc
- )
-set_target_properties(test_cls_version PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_cls_version
- librados
- cls_version_client
- global
- ${UNITTEST_LIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
- ${CRYPTO_LIBS}
- ${EXTRALIBS}
- radostest
- )
-
-add_executable(test_cls_log
- cls_log/test_cls_log.cc
- )
-set_target_properties(test_cls_log PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_cls_log
- librados
- cls_log_client
- global
- radostest
- ${UNITTEST_LIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
- ${CRYPTO_LIBS}
- ${EXTRALIBS}
+# unittest_sharedptr_registry
+add_executable(unittest_sharedptr_registry EXCLUDE_FROM_ALL
+ common/test_sharedptr_registry.cc
)
+add_ceph_unittest(unittest_sharedptr_registry ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_sharedptr_registry)
+target_link_libraries(unittest_sharedptr_registry global ${BLKID_LIBRARIES})
-add_executable(test_cls_statelog
- cls_statelog/test_cls_statelog.cc
- )
-set_target_properties(test_cls_statelog PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_cls_statelog
- librados
- cls_statelog_client
- global
- ${UNITTEST_LIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
- ${CRYPTO_LIBS}
- ${EXTRALIBS}
- radostest
+# unittest_shared_cache
+add_executable(unittest_shared_cache EXCLUDE_FROM_ALL
+ common/test_shared_cache.cc
)
+add_ceph_unittest(unittest_shared_cache ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_shared_cache)
+target_link_libraries(unittest_shared_cache global ${BLKID_LIBRARIES})
-add_executable(test_cls_replica_log
- cls_replica_log/test_cls_replica_log.cc
- )
-set_target_properties(test_cls_replica_log PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_cls_replica_log
- librados
- cls_replica_log_client
- global
- ${UNITTEST_LIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
- ${CRYPTO_LIBS}
- ${EXTRALIBS}
- radostest
+# unittest_sloppy_crc_map
+add_executable(unittest_sloppy_crc_map EXCLUDE_FROM_ALL
+ common/test_sloppy_crc_map.cc
)
+add_ceph_unittest(unittest_sloppy_crc_map ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_sloppy_crc_map)
+target_link_libraries(unittest_sloppy_crc_map global ${BLKID_LIBRARIES})
-add_executable(test_cls_lock
- cls_lock/test_cls_lock.cc
+# unittest_time
+set(unittest_time_srcs
+ common/test_time.cc
+ ${CMAKE_SOURCE_DIR}/src/common/ceph_time.cc
)
-set_target_properties(test_cls_lock PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_cls_lock
- cls_lock
- librados
- global
- ${UNITTEST_LIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
- ${CRYPTO_LIBS}
- ${EXTRALIBS}
- radostest
+add_executable(unittest_time EXCLUDE_FROM_ALL
+ ${unittest_time_srcs}
)
+add_ceph_unittest(unittest_time ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_time)
+target_link_libraries(unittest_time global ${BLKID_LIBRARIES})
-add_executable(test_cls_hello
- cls_hello/test_cls_hello.cc
- )
-set_target_properties(test_cls_hello PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_cls_hello
- librados
- global
- ${EXTRALIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
- radostest
- ${UNITTEST_LIBS}
+# unittest_util
+add_executable(unittest_util EXCLUDE_FROM_ALL
+ common/test_util.cc
+ ${CMAKE_SOURCE_DIR}/src/common/util.cc
)
+add_ceph_unittest(unittest_util ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_util)
+target_link_libraries(unittest_util global ${BLKID_LIBRARIES})
-add_executable(test_cls_numops cls_numops/test_cls_numops.cc)
-set_target_properties(test_cls_numops PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_cls_numops
- librados
- global
- cls_numops_client
- ${EXTRALIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
- radostest
- ${UNITTEST_LIBS}
+# unittest_throttle
+add_executable(unittest_throttle EXCLUDE_FROM_ALL
+ common/Throttle.cc
)
+add_ceph_unittest(unittest_throttle ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_throttle)
+target_link_libraries(unittest_throttle global)
-if(${WITH_RADOSGW})
- add_executable(test_cls_rgw
- cls_rgw/test_cls_rgw.cc
- )
- set_target_properties(test_cls_rgw PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
- target_link_libraries(test_cls_rgw
- cls_rgw_client
- librados
- global
- ${UNITTEST_LIBS}
- ${EXTRALIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
- radostest)
-endif(${WITH_RADOSGW})
-
-# test_async_driver
-add_executable(test_async_driver
- msgr/test_async_driver.cc
+# unittest_lru
+add_executable(unittest_lru EXCLUDE_FROM_ALL
+ common/test_lru.cc
)
-set_target_properties(test_async_driver PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_async_driver os global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
+add_ceph_unittest(unittest_lru ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_lru)
+target_link_libraries(unittest_lru global)
-# test_msgr
-add_executable(test_msgr
- msgr/test_msgr.cc
+# unittest_io_priority
+add_executable(unittest_io_priority EXCLUDE_FROM_ALL
+ common/test_io_priority.cc
)
-set_target_properties(test_msgr PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_msgr os global ${BLKID_LIBRARIES} ${CMAKE_DL_LIBS} ${UNITTEST_LIBS})
-
-#test_mon_msg
-add_executable(test_mon_msg mon/test-mon-msg.cc)
-set_target_properties(test_mon_msg PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_mon_msg os osdc global ${UNITTEST_LIBS})
-
-#test_perf_local
-add_executable(test_perf_local
- perf_local.cc
- perf_helper.cc)
-#INTEL_SSE & INTEL_SSE2 flags
-set(PERF_LOCAL_FLAGS "${CMAKE_CXX_FLAGS} -msse -msse2")
-set_target_properties(test_perf_local PROPERTIES COMPILE_FLAGS
- ${PERF_LOCAL_FLAGS})
-target_link_libraries(test_perf_local os global ${UNITTEST_LIBS})
-
-#test_perf_objectstore
-add_executable(test_perf_objectstore objectstore/ObjectStoreTransactionBenchmark.cc)
-set_target_properties(test_perf_objectstore PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_perf_objectstore os osdc global ${UNITTEST_LIBS})
-
-#test_perf_msgr_server
-add_executable(test_perf_msgr_server msgr/perf_msgr_server.cc)
-set_target_properties(test_perf_msgr_server PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_perf_msgr_server os global ${UNITTEST_LIBS})
+add_ceph_unittest(unittest_io_priority ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_io_priority)
+target_link_libraries(unittest_io_priority global)
-#test_perf_msgr_client
-add_executable(test_perf_msgr_client msgr/perf_msgr_client.cc)
-set_target_properties(test_perf_msgr_client PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_perf_msgr_client os global ${UNITTEST_LIBS})
-
-add_executable(test_mon_workloadgen
- mon/test_mon_workloadgen.cc
+# unittest_crc32c
+add_executable(unittest_crc32c EXCLUDE_FROM_ALL
+ common/test_crc32c.cc
)
-target_link_libraries(test_mon_workloadgen
- os
- osdc
- global
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_crc32c ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_crc32c)
+target_link_libraries(unittest_crc32c global)
+
+# unittest_config
+add_executable(unittest_config EXCLUDE_FROM_ALL
+ common/test_config.cc
)
+add_ceph_unittest(unittest_config ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_config)
+target_link_libraries(unittest_config global)
-add_executable(test_rados_api_cmd
- librados/cmd.cc
+# unittest_context
+add_executable(unittest_context EXCLUDE_FROM_ALL
+ common/test_context.cc
)
-set_target_properties(test_rados_api_cmd PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rados_api_cmd
- librados global ${UNITTEST_LIBS} radostest)
+add_ceph_unittest(unittest_context ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_context)
+target_link_libraries(unittest_context global)
-add_executable(test_rados_api_io
- librados/io.cc
+# unittest_safe_io
+add_executable(unittest_safe_io EXCLUDE_FROM_ALL
+ common/test_safe_io.cc
)
-set_target_properties(test_rados_api_io PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rados_api_io
- librados ${UNITTEST_LIBS} radostest)
+add_ceph_unittest(unittest_safe_io ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_safe_io)
+target_link_libraries(unittest_safe_io global)
-add_executable(test_rados_api_c_write_operations
- librados/c_write_operations.cc
+# unittest_readahead
+add_executable(unittest_readahead EXCLUDE_FROM_ALL
+ common/Readahead.cc
)
-set_target_properties(test_rados_api_c_write_operations PROPERTIES
- COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rados_api_c_write_operations
- librados ${UNITTEST_LIBS} radostest)
+add_ceph_unittest(unittest_readahead ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_readahead)
+target_link_libraries(unittest_readahead global)
-add_executable(test_rados_api_c_read_operations
- librados/c_read_operations.cc
+# unittest_tableformatter
+add_executable(unittest_tableformatter EXCLUDE_FROM_ALL
+ common/test_tableformatter.cc
)
-set_target_properties(test_rados_api_c_read_operations PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rados_api_c_read_operations
- librados ${UNITTEST_LIBS} radostest)
+add_ceph_unittest(unittest_tableformatter ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_tableformatter)
+target_link_libraries(unittest_tableformatter global)
-add_executable(test_rados_api_aio
- librados/aio.cc
+# unittest_bit_vector
+add_executable(unittest_bit_vector EXCLUDE_FROM_ALL
+ common/test_bit_vector.cc
)
-set_target_properties(test_rados_api_aio PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rados_api_aio
- librados ${UNITTEST_LIBS} radostest)
+add_ceph_unittest(unittest_bit_vector ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_bit_vector)
+target_link_libraries(unittest_bit_vector global)
-add_executable(test_rados_api_list
- librados/list.cc
+# unittest_async_compressor
+add_executable(unittest_async_compressor EXCLUDE_FROM_ALL
+ common/test_async_compressor.cc
+)
+add_ceph_unittest(unittest_async_compressor ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_async_compressor)
+target_link_libraries(unittest_async_compressor global compressor)
+
+#encoding directory
+add_ceph_test(check-generated.sh ${CMAKE_SOURCE_DIR}/src/test/encoding/check-generated.sh)
+add_ceph_test(readable.sh ${CMAKE_SOURCE_DIR}/src/test/encoding/readable.sh)
+
+# erasure-code directory
+add_ceph_test(test-erasure-code.sh ${CMAKE_SOURCE_DIR}/src/test/erasure-code/test-erasure-code.sh)
+add_ceph_test(test-erasure-eio.sh ${CMAKE_SOURCE_DIR}/src/test/erasure-code/test-erasure-eio.sh)
+
+# fs directory
+
+# unittest_mds_types
+add_executable(unittest_mds_types EXCLUDE_FROM_ALL
+ fs/mds_types.cc
)
-set_target_properties(test_rados_api_list PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rados_api_list
- librados global ${UNITTEST_LIBS} radostest)
+add_ceph_unittest(unittest_mds_types ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mds_types)
+target_link_libraries(unittest_mds_types global)
-add_executable(test_rados_api_nlist
- librados/nlist.cc
+#libradosstriper directory
+add_ceph_test(rados-striper.sh ${CMAKE_SOURCE_DIR}/src/test/libradosstriper/rados-striper.sh)
+
+
+#libradosdirectory
+# unittest_librados
+add_executable(unittest_librados EXCLUDE_FROM_ALL
+ librados/librados.cc
)
-set_target_properties(test_rados_api_nlist PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rados_api_nlist
- librados ${UNITTEST_LIBS} radostest)
+add_ceph_unittest(unittest_librados ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_librados)
+target_link_libraries(unittest_librados librados global ${BLKID_LIBRARIES})
-add_executable(test_rados_api_pool
- librados/pool.cc
+# unittest_librados_config
+set(unittest_librados_config_srcs librados/librados_config.cc)
+add_executable(unittest_librados_config EXCLUDE_FROM_ALL
+ ${unittest_librados_config_srcs}
)
-set_target_properties(test_rados_api_pool PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS}
+add_ceph_unittest(unittest_librados_config ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_librados_config)
+target_link_libraries(unittest_librados_config
+ librados
+ global
+ ${BLKID_LIBRARIES}
)
-target_link_libraries(test_rados_api_pool
- librados ${UNITTEST_LIBS} radostest)
-add_executable(test_rados_api_stat
- librados/stat.cc
+#mds directory
+# unittest_mds_authcap
+add_executable(unittest_mds_authcap EXCLUDE_FROM_ALL
+ mds/TestMDSAuthCaps.cc
)
-set_target_properties(test_rados_api_stat PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rados_api_stat
- librados ${UNITTEST_LIBS} radostest)
+add_ceph_unittest(unittest_mds_authcap ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mds_authcap)
+target_link_libraries(unittest_mds_authcap mds global ${BLKID_LIBRARIES})
-add_executable(test_rados_api_watch_notify
- librados/watch_notify.cc
+# unittest_mds_sessionfilter
+add_executable(unittest_mds_sessionfilter EXCLUDE_FROM_ALL
+ mds/TestSessionFilter.cc
+ $<TARGET_OBJECTS:common_util_obj>
)
-set_target_properties(test_rados_api_watch_notify PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rados_api_watch_notify
- librados ${UNITTEST_LIBS} radostest)
+add_ceph_unittest(unittest_mds_sessionfilter ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mds_sessionfilter)
+target_link_libraries(unittest_mds_sessionfilter mds osdc common global ${BLKID_LIBRARIES})
-add_executable(test_rados_api_cls
- librados/cls.cc
- )
-set_target_properties(test_rados_api_cls PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rados_api_cls
- librados ${UNITTEST_LIBS} radostest)
+#mon directory
+add_ceph_test(misc.sh ${CMAKE_SOURCE_DIR}/src/test/mon/misc.sh)
+add_ceph_test(mkfs.sh ${CMAKE_SOURCE_DIR}/src/test/mon/mkfs.sh)
+add_ceph_test(mon-handle-forward.sh ${CMAKE_SOURCE_DIR}/src/test/mon/mon-handle-forward.sh)
+add_ceph_test(mon-ping.sh ${CMAKE_SOURCE_DIR}/src/test/mon/mon-ping.sh)
+add_ceph_test(mon-scrub.sh ${CMAKE_SOURCE_DIR}/src/test/mon/mon-scrub.sh)
+add_ceph_test(osd-crush.sh ${CMAKE_SOURCE_DIR}/src/test/mon/osd-crush.sh)
+add_ceph_test(osd-erasure-code-profile.sh ${CMAKE_SOURCE_DIR}/src/test/mon/osd-erasure-code-profile.sh)
+add_ceph_test(osd-pool-create.sh ${CMAKE_SOURCE_DIR}/src/test/mon/osd-pool-create.sh)
-add_executable(test_rados_api_misc
- librados/misc.cc
+# unittest_mon_moncap
+add_executable(unittest_mon_moncap EXCLUDE_FROM_ALL
+ mon/moncap.cc
)
-set_target_properties(test_rados_api_misc PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rados_api_misc
- librados global ${UNITTEST_LIBS} radostest)
+add_ceph_unittest(unittest_mon_moncap ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mon_moncap)
+target_link_libraries(unittest_mon_moncap mon global)
-add_executable(test_rados_api_tmap_migrate
- ../tools/cephfs/DataScan.cc
- ../tools/cephfs/MDSUtility.cc
- librados/tmap_migrate.cc
- $<TARGET_OBJECTS:heap_profiler_objs>
+# unittest_mon_pgmap
+add_executable(unittest_mon_pgmap EXCLUDE_FROM_ALL
+ mon/PGMap.cc
)
-set_target_properties(test_rados_api_tmap_migrate PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rados_api_tmap_migrate
- librados mds osdc global cls_cephfs_client ${UNITTEST_LIBS} ${ALLOC_LIBS} radostest)
+add_ceph_unittest(unittest_mon_pgmap ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mon_pgmap)
+target_link_libraries(unittest_mon_pgmap mon global)
-add_executable(test_rados_api_lock
- librados/lock.cc
- )
-set_target_properties(test_rados_api_lock PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rados_api_lock
- librados ${UNITTEST_LIBS} radostest)
+#objectstore directory
-add_executable(test_rados_api_tier
- librados/tier.cc
+# unittest_chain_xattr
+add_executable(unittest_chain_xattr EXCLUDE_FROM_ALL
+ objectstore/chain_xattr.cc
)
-set_target_properties(test_rados_api_tier PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rados_api_tier
- global librados ${UNITTEST_LIBS} radostest)
+add_ceph_unittest(unittest_chain_xattr ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_chain_xattr)
+target_link_libraries(unittest_chain_xattr os global)
-add_executable(test_rados_api_snapshots
- librados/snapshots.cc
+# unittest_rocksdb_option
+add_executable(unittest_rocksdb_option EXCLUDE_FROM_ALL
+ objectstore/TestRocksdbOptionParse.cc
)
-set_target_properties(test_rados_api_snapshots PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rados_api_snapshots
- librados ${UNITTEST_LIBS} radostest)
+add_ceph_unittest(unittest_rocksdb_option ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_rocksdb_option)
+target_link_libraries(unittest_rocksdb_option global os ${BLKID_LIBRARIES})
-add_library(rados_striper_test STATIC libradosstriper/TestCase.cc)
-target_link_libraries(rados_striper_test radostest)
-set_target_properties(rados_striper_test PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+# unittest_bluefs
+add_executable(unittest_bluefs EXCLUDE_FROM_ALL objectstore/test_bluefs.cc)
+add_ceph_unittest(unittest_bluefs ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_bluefs)
+target_link_libraries(unittest_bluefs os global)
-add_executable(test_rados_api_striping
- libradosstriper/striping.cc
- )
-target_link_libraries(test_rados_api_striping librados libradosstriper
- ${UNITTEST_LIBS} rados_striper_test)
-set_target_properties(test_rados_api_striping PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
+# unittest_bluestore_types
+add_executable(unittest_bluestore_types EXCLUDE_FROM_ALL objectstore/test_bluestore_types.cc)
+add_ceph_unittest(unittest_bluestore_types ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_bluestore_types)
+target_link_libraries(unittest_bluestore_types os global)
+
-if(${WITH_CEPHFS})
- add_executable(test_libcephfs
- libcephfs/test.cc
- libcephfs/readdir_r_cb.cc
- libcephfs/caps.cc
- libcephfs/multiclient.cc
- libcephfs/flock.cc
- libcephfs/acl.cc
- libcephfs/access.cc
+#os directory
+# unittest_lfnindex
+add_executable(unittest_lfnindex EXCLUDE_FROM_ALL
+ os/TestLFNIndex.cc
)
- set_target_properties(test_libcephfs PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
- target_link_libraries(test_libcephfs
- cephfs
- librados
- ${UNITTEST_LIBS}
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
- )
-endif(${WITH_CEPHFS})
+add_ceph_unittest(unittest_lfnindex ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_lfnindex)
+target_link_libraries(unittest_lfnindex os global)
-add_executable(test_objectstore
- objectstore/store_test.cc
+#osd directory
+add_ceph_test(osd-bench.sh ${CMAKE_SOURCE_DIR}/src/test/osd/osd-bench.sh)
+add_ceph_test(osd-config.sh ${CMAKE_SOURCE_DIR}/src/test/osd/osd-config.sh)
+add_ceph_test(osd-copy-from.sh ${CMAKE_SOURCE_DIR}/src/test/osd/osd-copy-from.sh)
+add_ceph_test(osd-mark-down.sh ${CMAKE_SOURCE_DIR}/src/test/osd/osd-mark-down.sh)
+add_ceph_test(osd-reactivate.sh ${CMAKE_SOURCE_DIR}/src/test/osd/osd-reactivate.sh)
+add_ceph_test(osd-reuse-id.sh ${CMAKE_SOURCE_DIR}/src/test/osd/osd-reuse-id.sh)
+add_ceph_test(osd-scrub-repair.sh ${CMAKE_SOURCE_DIR}/src/test/osd/osd-scrub-repair.sh)
+add_ceph_test(osd-scrub-snaps.sh ${CMAKE_SOURCE_DIR}/src/test/osd/osd-scrub-snaps.sh)
+
+# unittest_osdmap
+add_executable(unittest_osdmap EXCLUDE_FROM_ALL
+ osd/TestOSDMap.cc
)
-set_target_properties(test_objectstore PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_objectstore
- os
- common
- ${UNITTEST_LIBS}
- global
- ${EXTRALIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_osdmap ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_osdmap)
+target_link_libraries(unittest_osdmap global ${BLKID_LIBRARIES})
+
+# unittest_osd_types
+add_executable(unittest_osd_types EXCLUDE_FROM_ALL
+ osd/types.cc
)
+add_ceph_unittest(unittest_osd_types ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_osd_types)
+target_link_libraries(unittest_osd_types global)
-add_executable(test_keyvaluedb
- objectstore/test_kv.cc
+# unittest_ecbackend
+add_executable(unittest_ecbackend EXCLUDE_FROM_ALL
+ osd/TestECBackend.cc
)
-set_target_properties(test_keyvaluedb PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_keyvaluedb
- os
- common
- ${UNITTEST_LIBS}
- global
- ${EXTRALIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_ecbackend ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_ecbackend)
+target_link_libraries(unittest_ecbackend osd global)
+
+# unittest_osdscrub
+add_executable(unittest_osdscrub EXCLUDE_FROM_ALL
+ osd/TestOSDScrub.cc
)
+add_ceph_unittest(unittest_osdscrub ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_osdscrub)
+target_link_libraries(unittest_osdscrub osd global dl os mon ${BLKID_LIBRARIES})
-add_executable(test_objectstore_workloadgen
- objectstore/workload_generator.cc
- objectstore/TestObjectStoreState.cc
+# unittest_pglog
+add_executable(unittest_pglog EXCLUDE_FROM_ALL
+ osd/TestPGLog.cc
)
-target_link_libraries(test_objectstore_workloadgen
- os
- global
- ${EXTRALIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_pglog ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_pglog)
+target_link_libraries(unittest_pglog osd global dl ${BLKID_LIBRARIES})
+
+# unittest_hitset
+add_executable(unittest_hitset EXCLUDE_FROM_ALL
+ osd/hitset.cc
)
+add_ceph_unittest(unittest_hitset ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_hitset)
+target_link_libraries(unittest_hitset osd global ${BLKID_LIBRARIES})
-# test_transaction
-add_executable(unittest_transaction objectstore/test_transaction.cc)
-add_test(unittest_transaction unittest_transaction)
-set_target_properties(unittest_transaction PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
-target_link_libraries(unittest_transaction os common ${UNITTEST_LIBS})
+# unittest_osd_osdcap
+add_executable(unittest_osd_osdcap EXCLUDE_FROM_ALL
+ osd/osdcap.cc
+)
+add_ceph_unittest(unittest_osd_osdcap ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_osd_osdcap)
+target_link_libraries(unittest_osd_osdcap osd global ${BLKID_LIBRARIES})
-#test_filestore
-add_executable(test_filestore filestore/TestFileStore.cc)
-set_target_properties(test_filestore PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_filestore os global ${UNITTEST_LIBS})
+#pybind
+add_ceph_test(test_ceph_daemon.py ${CMAKE_SOURCE_DIR}/src/test/pybind/test_ceph_daemon.py)
+add_ceph_test(test_ceph_argparse.py ${CMAKE_SOURCE_DIR}/src/test/pybind/test_ceph_argparse.py)
-add_executable(test_filestore_idempotent
- objectstore/test_idempotent.cc
- objectstore/FileStoreTracker.cc
- common/ObjectContents.cc
- )
-target_link_libraries(test_filestore_idempotent
- os
- global
- ${EXTRALIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
+# unittest_admin_socket
+add_executable(unittest_admin_socket EXCLUDE_FROM_ALL
+ admin_socket.cc
)
+add_ceph_unittest(unittest_admin_socket ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_admin_socket)
+target_link_libraries(unittest_admin_socket global)
-add_executable(test_filestore_idempotent_sequence
- objectstore/test_idempotent_sequence.cc
- objectstore/DeterministicOpSequence.cc
- objectstore/TestObjectStoreState.cc
- objectstore/FileStoreDiff.cc
- )
-target_link_libraries(test_filestore_idempotent_sequence
- os
- global
- ${EXTRALIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
+# unittest_encoding
+add_executable(unittest_encoding EXCLUDE_FROM_ALL
+ encoding.cc
)
+add_ceph_unittest(unittest_encoding ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_encoding)
+target_link_libraries(unittest_encoding librados pthread rt m ${BLKID_LIBRARIES})
-add_executable(test_xattr_bench
- xattr_bench.cc
- )
-set_target_properties(test_xattr_bench PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_xattr_bench
- os
- common
- ${UNITTEST_LIBS}
- global
- ${EXTRALIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
+# unittest_addrs
+add_executable(unittest_addrs EXCLUDE_FROM_ALL
+ test_addrs.cc
)
+add_ceph_unittest(unittest_addrs ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_addrs)
+target_link_libraries(unittest_addrs librados pthread rt m ${BLKID_LIBRARIES})
-add_executable(test_filejournal
- test_filejournal.cc
- )
-set_target_properties(test_filejournal PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_filejournal
- os
- common
- ${UNITTEST_LIBS}
- global
- ${EXTRALIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
- ${EXTRALIBS}
+# unittest_workqueue
+add_executable(unittest_workqueue EXCLUDE_FROM_ALL
+ test_workqueue.cc
)
+add_ceph_unittest(unittest_workqueue ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_workqueue)
+target_link_libraries(unittest_workqueue global ${BLKID_LIBRARIES})
-add_executable(test_stress_watch
- test_stress_watch.cc
- )
-set_target_properties(test_stress_watch PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_stress_watch
- librados
- global
- ${UNITTEST_LIBS}
- radostest
- ${EXTRALIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
+# unittest_striper
+add_executable(unittest_striper EXCLUDE_FROM_ALL
+ test_striper.cc
)
+add_ceph_unittest(unittest_striper ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_striper)
+target_link_libraries(unittest_striper global ${BLKID_LIBRARIES})
-add_executable(test_objectcacher_stress
- osdc/object_cacher_stress.cc
- osdc/FakeWriteback.cc
+# unittest_prebufferedstreambuf
+add_executable(unittest_prebufferedstreambuf EXCLUDE_FROM_ALL
+ test_prebufferedstreambuf.cc
)
-target_link_libraries(test_objectcacher_stress
- osdc
- global
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_prebufferedstreambuf ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_prebufferedstreambuf)
+target_link_libraries(unittest_prebufferedstreambuf global ${BLKID_LIBRARIES})
+
+# unittest_str_list
+add_executable(unittest_str_list EXCLUDE_FROM_ALL
+ test_str_list.cc
)
+add_ceph_unittest(unittest_str_list ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_str_list)
+target_link_libraries(unittest_str_list global ${BLKID_LIBRARIES})
-add_executable(test_object_map
- ObjectMap/test_object_map.cc
- ObjectMap/KeyValueDBMemory.cc
+# unittest_log
+add_executable(unittest_log EXCLUDE_FROM_ALL
+ ${CMAKE_SOURCE_DIR}/src/log/test.cc
)
-set_target_properties(test_object_map PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_object_map
- os
- common
- ${UNITTEST_LIBS}
- global
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_log ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_log)
+target_link_libraries(unittest_log global)
+
+# unittest_base64
+add_executable(unittest_base64 EXCLUDE_FROM_ALL
+ base64.cc
)
+add_ceph_unittest(unittest_base64 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_base64)
+target_link_libraries(unittest_base64 global)
-add_executable(test_keyvaluedb_atomicity
- ObjectMap/test_keyvaluedb_atomicity.cc
+# unittest_ceph_argparse
+add_executable(unittest_ceph_argparse EXCLUDE_FROM_ALL
+ ceph_argparse.cc
)
-set_target_properties(test_keyvaluedb_atomicity PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_keyvaluedb_atomicity
- os
- common
- ${UNITTEST_LIBS}
- global
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_ceph_argparse ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_ceph_argparse)
+target_link_libraries(unittest_ceph_argparse global)
+
+# unittest_ceph_compatset
+add_executable(unittest_ceph_compatset EXCLUDE_FROM_ALL
+ ceph_compatset.cc
)
+add_ceph_unittest(unittest_ceph_compatset ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_ceph_compatset)
+target_link_libraries(unittest_ceph_compatset global)
-add_executable(test_keyvaluedb_iterators
- ObjectMap/test_keyvaluedb_iterators.cc
- ObjectMap/KeyValueDBMemory.cc
+# unittest_gather
+add_executable(unittest_gather EXCLUDE_FROM_ALL
+ gather.cc
)
-set_target_properties(test_keyvaluedb_iterators PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_keyvaluedb_iterators
- os
- common
- ${UNITTEST_LIBS}
- global
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_gather ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_gather)
+target_link_libraries(unittest_gather global)
+
+# unittest_run_cmd
+add_executable(unittest_run_cmd EXCLUDE_FROM_ALL
+ run_cmd.cc
)
+add_ceph_unittest(unittest_run_cmd ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_run_cmd)
+target_link_libraries(unittest_run_cmd global)
-# librgw_file (nfs-like RGW interface)
-add_executable(test_librgw_file
- librgw_file.cc
+# signals
+add_executable(unittest_signals EXCLUDE_FROM_ALL
+ signals.cc
)
-set_target_properties(test_librgw_file PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_librgw_file
- rgw
- librados
- ${UNITTEST_LIBS}
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_signals ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_signals)
+target_link_libraries(unittest_signals global)
+
+# unittest_simple_spin
+add_executable(unittest_simple_spin EXCLUDE_FROM_ALL
+ simple_spin.cc
)
+add_ceph_unittest(unittest_simple_spin ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_simple_spin)
+target_link_libraries(unittest_simple_spin global)
-# librgw_file_cd (just the rgw_file create-delete bucket ops)
-add_executable(test_librgw_file_cd
- librgw_file_cd.cc
+# unittest_bufferlist
+add_executable(unittest_bufferlist EXCLUDE_FROM_ALL
+ bufferlist.cc
)
-set_target_properties(test_librgw_file_cd PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_librgw_file_cd
- rgw
- librados
- ${UNITTEST_LIBS}
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_bufferlist ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_bufferlist)
+target_link_libraries(unittest_bufferlist global)
+
+# unittest_xlist
+add_executable(unittest_xlist EXCLUDE_FROM_ALL
+ test_xlist.cc
)
+add_ceph_unittest(unittest_xlist ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_xlist)
+target_link_libraries(unittest_xlist common)
-# librgw_file_gp (just the rgw_file get-put bucket ops)
-add_executable(test_librgw_file_gp
- librgw_file_gp.cc
+# unittest_arch
+add_executable(unittest_arch EXCLUDE_FROM_ALL
+ test_arch.cc
)
-set_target_properties(test_librgw_file_gp PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_librgw_file_gp
- rgw
- librados
- ${UNITTEST_LIBS}
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_arch ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_arch)
+target_link_libraries(unittest_arch global)
+
+# unittest_crypto
+add_executable(unittest_crypto EXCLUDE_FROM_ALL
+ crypto.cc
)
+add_ceph_unittest(unittest_crypto ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_crypto)
+target_link_libraries(unittest_crypto global)
-# librgw_file_nfsns (nfs namespace tests)
-add_executable(test_librgw_file_nfsns
- librgw_file_nfsns.cc
+# unittest_crypto_init
+add_executable(unittest_crypto_init EXCLUDE_FROM_ALL
+ crypto_init.cc
)
-set_target_properties(test_librgw_file_nfsns PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_librgw_file_nfsns
- rgw
- librados
- ${UNITTEST_LIBS}
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_crypto_init ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_crypto_init)
+target_link_libraries(unittest_crypto_init global)
+
+# unittest_perf_counters
+add_executable(unittest_perf_counters EXCLUDE_FROM_ALL
+ perf_counters.cc
)
+add_ceph_unittest(unittest_perf_counters ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_perf_counters)
+target_link_libraries(unittest_perf_counters global)
-# librgw_file_aw (nfs write transaction [atomic write] tests)
-add_executable(test_librgw_file_aw
- librgw_file_aw.cc
+# unittest_ceph_crypto
+add_executable(unittest_ceph_crypto EXCLUDE_FROM_ALL
+ ceph_crypto.cc
)
-set_target_properties(test_librgw_file_aw PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_librgw_file_aw
- rgw
- librados
- ${UNITTEST_LIBS}
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_ceph_crypto ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_ceph_crypto)
+target_link_libraries(unittest_ceph_crypto global)
+
+# unittest_utf8
+add_executable(unittest_utf8 EXCLUDE_FROM_ALL
+ utf8.cc
)
+add_ceph_unittest(unittest_utf8 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_utf8)
+target_link_libraries(unittest_utf8 global)
-add_executable(test_rgw_token
- test_rgw_token.cc
- $<TARGET_OBJECTS:heap_profiler_objs>
+# unittest_mime
+add_executable(unittest_mime EXCLUDE_FROM_ALL
+ mime.cc
)
-set_target_properties(test_rgw_token PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rgw_token
- rgw
- os
- global
- ${UNITTEST_LIBS}
- ${EXTRALIBS}
- ${ALLOC_LIBS}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_mime ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_mime)
+target_link_libraries(unittest_mime global)
+
+# unittest_escape
+add_executable(unittest_escape EXCLUDE_FROM_ALL
+ escape.cc
)
+add_ceph_unittest(unittest_escape ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_escape)
+target_link_libraries(unittest_escape global)
-if(${HAVE_LIBFUSE})
- add_executable(test_cfuse_cache_invalidate
- test_cfuse_cache_invalidate.cc
- )
- target_link_libraries(test_cfuse_cache_invalidate
- global
- os
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
- )
-endif(${HAVE_LIBFUSE})
+# unittest_strtol
+add_executable(unittest_strtol EXCLUDE_FROM_ALL
+ strtol.cc
+ )
+add_ceph_unittest(unittest_strtol ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_strtol)
+target_link_libraries(unittest_strtol global)
-# librgw_file_gp (just the rgw_file get-put bucket ops)
-add_executable(test_rgw_ldap
- ../rgw/rgw_ldap.cc
- test_rgw_ldap.cc
- $<TARGET_OBJECTS:heap_profiler_objs>
+# unittest_confutils
+add_executable(unittest_confutils EXCLUDE_FROM_ALL
+ confutils.cc
)
-set_target_properties(test_rgw_ldap PROPERTIES COMPILE_FLAGS
- ${UNITTEST_CXX_FLAGS})
-target_link_libraries(test_rgw_ldap
- librados
- ${OPENLDAP_LIBS}
- ${Boost_LIBRARIES}
- ${ALLOC_LIBS}
- ${UNITTEST_LIBS}
+add_ceph_unittest(unittest_confutils ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_confutils)
+target_link_libraries(unittest_confutils global)
+
+# unittest_heartbeatmap
+add_executable(unittest_heartbeatmap EXCLUDE_FROM_ALL
+ heartbeat_map.cc
)
+add_ceph_unittest(unittest_heartbeatmap ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_heartbeatmap)
+target_link_libraries(unittest_heartbeatmap global)
-if(${WITH_CEPHFS})
- add_executable(test_c_headers
- test_c_headers.c
+if(${WITH_RADOSGW})
+ # unittest_formatter
+ # why does this include rgw/rgw_formats.cc...?
+ add_executable(unittest_formatter EXCLUDE_FROM_ALL
+ formatter.cc
+ ${CMAKE_SOURCE_DIR}/src/rgw/rgw_formats.cc
)
- target_link_libraries(test_c_headers
- librados
- cephfs
- ${EXTRALIBS}
- ${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
- )
-endif(${WITH_CEPHFS})
+ add_ceph_unittest(unittest_formatter ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_formatter)
+ target_link_libraries(unittest_formatter global)
+endif(${WITH_RADOSGW})
-add_executable(test_get_blkdev_size
- test_get_blkdev_size.cc
+# unittest_daemon_config
+add_executable(unittest_daemon_config EXCLUDE_FROM_ALL
+ daemon_config.cc
)
-target_link_libraries(test_get_blkdev_size
+add_ceph_unittest(unittest_daemon_config ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_daemon_config)
+target_link_libraries(unittest_daemon_config
common
- pthread
- ${EXTRALIBS}
+ global
${BLKID_LIBRARIES}
- ${CMAKE_DL_LIBS}
+ ${EXTRALIBS}
)
-add_executable(simple_server
- messenger/simple_server.cc
- messenger/simple_dispatcher.cc
+# unittest_libcephfs_config
+add_executable(unittest_libcephfs_config EXCLUDE_FROM_ALL
+ libcephfs_config.cc
)
-target_link_libraries(simple_server
- os global common ${Boost_REGEX_LIBRARY}
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_libcephfs_config ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_libcephfs_config)
+target_link_libraries(unittest_libcephfs_config cephfs)
+
+# unittest_rbd_replay
+add_executable(unittest_rbd_replay EXCLUDE_FROM_ALL
+ test_rbd_replay.cc
+ $<TARGET_OBJECTS:parse_secret_objs>
+)
+add_ceph_unittest(unittest_rbd_replay ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_rbd_replay)
+target_link_libraries(unittest_rbd_replay
+ librbd
+ librados
+ global
+ rbd_replay
+ rbd_replay_ios
+ keyutils
+ ${BLKID_LIBRARIES}
)
-add_executable(simple_client
- messenger/simple_client.cc
- messenger/simple_dispatcher.cc
+# unittest_ipaddr
+add_executable(unittest_ipaddr EXCLUDE_FROM_ALL
+ test_ipaddr.cc)
+add_ceph_unittest(unittest_ipaddr ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_ipaddr)
+target_link_libraries(unittest_ipaddr mon global)
+
+# unittest_texttable
+add_executable(unittest_texttable EXCLUDE_FROM_ALL
+ test_texttable.cc
+ ${CMAKE_SOURCE_DIR}/src/common/TextTable.cc
)
-target_link_libraries(simple_client
- os global common ${Boost_REGEX_LIBRARY}
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
+add_ceph_unittest(unittest_texttable ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_texttable)
+target_link_libraries(unittest_texttable mon global)
+
+# unittest_on_exit
+add_executable(unittest_on_exit EXCLUDE_FROM_ALL
+ on_exit.cc
)
+add_ceph_unittest(unittest_on_exit ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_on_exit)
+target_link_libraries(unittest_on_exit global)
-if(HAVE_XIO)
- add_executable(xio_server
- messenger/xio_server.cc
- messenger/xio_dispatcher.cc
- )
- target_link_libraries(xio_server
- os global common ${Boost_REGEX_LIBRARY}
- ${Xio_LIBRARY} ibverbs rdmacm pthread rt
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
- )
+# unittest_subprocess
+add_executable(unittest_subprocess EXCLUDE_FROM_ALL
+ test_subprocess.cc
+ )
+add_ceph_unittest(unittest_subprocess ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_subprocess)
+target_link_libraries(unittest_subprocess global)
- add_executable(xio_client
- messenger/xio_client.cc
- messenger/xio_dispatcher.cc
- )
- target_link_libraries(xio_client
- os global common ${Boost_REGEX_LIBRARY}
- ${Xio_LIBRARY} ibverbs rdmacm pthread rt
- ${EXTRALIBS}
- ${CMAKE_DL_LIBS}
- )
-endif(HAVE_XIO)
+# unittest_pageset
+add_executable(unittest_pageset EXCLUDE_FROM_ALL test_pageset.cc)
+add_ceph_unittest(unittest_pageset ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/unittest_pageset)
+
+add_subdirectory(erasure-code EXCLUDE_FROM_ALL)
+
+#make check ends here