]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/objectstore/CMakeLists.txt
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / test / objectstore / CMakeLists.txt
1 add_executable(ceph_perf_objectstore
2 ObjectStoreTransactionBenchmark.cc)
3 target_link_libraries(ceph_perf_objectstore os osdc global ${UNITTEST_LIBS})
4 install(TARGETS ceph_perf_objectstore
5 DESTINATION bin)
6
7 add_library(store_test_fixture OBJECT store_test_fixture.cc)
8 target_include_directories(store_test_fixture PRIVATE
9 $<TARGET_PROPERTY:GTest::GTest,INTERFACE_INCLUDE_DIRECTORIES>)
10
11 add_executable(ceph_test_objectstore
12 store_test.cc
13 $<TARGET_OBJECTS:store_test_fixture>)
14 target_link_libraries(ceph_test_objectstore
15 os
16 ceph-common
17 ${UNITTEST_LIBS}
18 global
19 ${EXTRALIBS}
20 ${BLKID_LIBRARIES}
21 ${CMAKE_DL_LIBS}
22 )
23 install(TARGETS ceph_test_objectstore
24 DESTINATION ${CMAKE_INSTALL_BINDIR})
25
26 add_executable(ceph_test_keyvaluedb
27 test_kv.cc)
28 target_link_libraries(ceph_test_keyvaluedb
29 os
30 ceph-common
31 ${UNITTEST_LIBS}
32 global
33 ${EXTRALIBS}
34 ${BLKID_LIBRARIES}
35 ${CMAKE_DL_LIBS}
36 )
37 install(TARGETS ceph_test_keyvaluedb
38 DESTINATION ${CMAKE_INSTALL_BINDIR})
39
40 # unittest_rocksdb_option
41 add_executable(unittest_rocksdb_option
42 TestRocksdbOptionParse.cc
43 $<TARGET_OBJECTS:unit-main>
44 )
45 add_ceph_unittest(unittest_rocksdb_option)
46 target_link_libraries(unittest_rocksdb_option global os ${BLKID_LIBRARIES})
47
48 if(WITH_EVENTTRACE)
49 add_dependencies(os eventtrace_tp)
50 endif()
51
52 if(WITH_BLUESTORE)
53
54 add_executable(unittest_alloc
55 Allocator_test.cc
56 $<TARGET_OBJECTS:unit-main>
57 )
58 add_ceph_unittest(unittest_alloc)
59 target_link_libraries(unittest_alloc os global)
60
61 add_executable(unittest_alloc_bench
62 Allocator_bench.cc
63 $<TARGET_OBJECTS:unit-main>
64 )
65 target_link_libraries(unittest_alloc_bench ${UNITTEST_LIBS} os global)
66
67 add_executable(unittest_fastbmap_allocator
68 fastbmap_allocator_test.cc
69 $<TARGET_OBJECTS:unit-main>
70 )
71 add_ceph_unittest(unittest_fastbmap_allocator)
72 target_link_libraries(unittest_fastbmap_allocator os global)
73
74 set_target_properties(unittest_fastbmap_allocator PROPERTIES COMPILE_FLAGS
75 "${UNITTEST_CXX_FLAGS}")
76
77 add_executable(unittest_hybrid_allocator
78 hybrid_allocator_test.cc
79 $<TARGET_OBJECTS:unit-main>
80 )
81 add_ceph_unittest(unittest_hybrid_allocator)
82 target_link_libraries(unittest_hybrid_allocator os global)
83
84 set_target_properties(unittest_hybrid_allocator PROPERTIES COMPILE_FLAGS
85 "${UNITTEST_CXX_FLAGS}")
86
87 add_executable(unittest_alloc_aging EXCLUDE_FROM_ALL
88 Allocator_aging_fragmentation.cc)
89 target_link_libraries(unittest_alloc_aging os global GTest::Main)
90
91 # unittest_bluefs
92 add_executable(unittest_bluefs
93 test_bluefs.cc
94 )
95 add_ceph_unittest(unittest_bluefs)
96 target_link_libraries(unittest_bluefs os global)
97
98 # unittest_bluestore_types
99 add_executable(unittest_bluestore_types
100 test_bluestore_types.cc
101 )
102 add_ceph_unittest(unittest_bluestore_types)
103 target_link_libraries(unittest_bluestore_types os global)
104
105 # unittest_bdev
106 add_executable(unittest_bdev
107 test_bdev.cc
108 )
109 add_ceph_unittest(unittest_bdev)
110 target_link_libraries(unittest_bdev os global)
111
112 # unittest_deferred
113 add_executable(unittest_deferred
114 test_deferred.cc
115 )
116 add_ceph_unittest(unittest_deferred)
117 target_link_libraries(unittest_deferred os global)
118
119 endif(WITH_BLUESTORE)
120
121 # unittest_transaction
122 add_executable(unittest_transaction
123 test_transaction.cc)
124 add_ceph_unittest(unittest_transaction)
125 target_link_libraries(unittest_transaction os ceph-common)
126
127 # unittest_memstore_clone
128 add_executable(unittest_memstore_clone
129 test_memstore_clone.cc
130 $<TARGET_OBJECTS:store_test_fixture>)
131 add_ceph_unittest(unittest_memstore_clone)
132 target_link_libraries(unittest_memstore_clone os global)
133
134 if(WITH_BLUESTORE)
135 add_executable(ceph_test_alloc_replay
136 allocator_replay_test.cc)
137 target_link_libraries(ceph_test_alloc_replay os global ${UNITTEST_LIBS})
138 install(TARGETS ceph_test_alloc_replay
139 DESTINATION bin)
140 endif()