]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/objectstore/CMakeLists.txt
import ceph quincy 17.2.4
[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 # ceph_test_filestore_idempotent
41 add_executable(ceph_test_filestore_idempotent
42 test_idempotent.cc
43 FileStoreTracker.cc
44 ${CMAKE_SOURCE_DIR}/src/test/common/ObjectContents.cc
45 )
46 target_link_libraries(ceph_test_filestore_idempotent
47 os
48 global
49 ${EXTRALIBS}
50 ${BLKID_LIBRARIES}
51 ${CMAKE_DL_LIBS}
52 )
53
54 # ceph_test_filestore_idempotent_sequence
55 add_executable(ceph_test_filestore_idempotent_sequence
56 test_idempotent_sequence.cc
57 DeterministicOpSequence.cc
58 TestObjectStoreState.cc
59 FileStoreDiff.cc
60 )
61 target_link_libraries(ceph_test_filestore_idempotent_sequence
62 os
63 global
64 ${EXTRALIBS}
65 ${BLKID_LIBRARIES}
66 ${CMAKE_DL_LIBS}
67 )
68 install(TARGETS ceph_test_filestore_idempotent_sequence
69 DESTINATION ${CMAKE_INSTALL_BINDIR})
70
71 # unittest_chain_xattr
72 add_executable(unittest_chain_xattr
73 chain_xattr.cc
74 )
75 add_ceph_unittest(unittest_chain_xattr)
76 target_link_libraries(unittest_chain_xattr os global)
77
78 # unittest_rocksdb_option
79 add_executable(unittest_rocksdb_option
80 TestRocksdbOptionParse.cc
81 $<TARGET_OBJECTS:unit-main>
82 )
83 add_ceph_unittest(unittest_rocksdb_option)
84 target_link_libraries(unittest_rocksdb_option global os ${BLKID_LIBRARIES})
85
86 if(WITH_EVENTTRACE)
87 add_dependencies(os eventtrace_tp)
88 endif()
89
90 if(WITH_BLUESTORE)
91
92 add_executable(unittest_alloc
93 Allocator_test.cc
94 $<TARGET_OBJECTS:unit-main>
95 )
96 add_ceph_unittest(unittest_alloc)
97 target_link_libraries(unittest_alloc os global)
98
99 add_executable(unittest_alloc_bench
100 Allocator_bench.cc
101 $<TARGET_OBJECTS:unit-main>
102 )
103 target_link_libraries(unittest_alloc_bench ${UNITTEST_LIBS} os global)
104
105 add_executable(unittest_fastbmap_allocator
106 fastbmap_allocator_test.cc
107 $<TARGET_OBJECTS:unit-main>
108 )
109 add_ceph_unittest(unittest_fastbmap_allocator)
110 target_link_libraries(unittest_fastbmap_allocator os global)
111
112 set_target_properties(unittest_fastbmap_allocator PROPERTIES COMPILE_FLAGS
113 "${UNITTEST_CXX_FLAGS}")
114
115 add_executable(unittest_hybrid_allocator
116 hybrid_allocator_test.cc
117 $<TARGET_OBJECTS:unit-main>
118 )
119 add_ceph_unittest(unittest_hybrid_allocator)
120 target_link_libraries(unittest_hybrid_allocator os global)
121
122 set_target_properties(unittest_hybrid_allocator PROPERTIES COMPILE_FLAGS
123 "${UNITTEST_CXX_FLAGS}")
124
125 add_executable(unittest_alloc_aging EXCLUDE_FROM_ALL
126 Allocator_aging_fragmentation.cc)
127 target_link_libraries(unittest_alloc_aging os global GTest::Main)
128
129 # unittest_bluefs
130 add_executable(unittest_bluefs
131 test_bluefs.cc
132 )
133 add_ceph_unittest(unittest_bluefs)
134 target_link_libraries(unittest_bluefs os global)
135
136 # unittest_bluestore_types
137 add_executable(unittest_bluestore_types
138 test_bluestore_types.cc
139 )
140 add_ceph_unittest(unittest_bluestore_types)
141 target_link_libraries(unittest_bluestore_types os global)
142
143 # unittest_bdev
144 add_executable(unittest_bdev
145 test_bdev.cc
146 )
147 add_ceph_unittest(unittest_bdev)
148 target_link_libraries(unittest_bdev os global)
149
150 # unittest_deferred
151 add_executable(unittest_deferred
152 test_deferred.cc
153 )
154 add_ceph_unittest(unittest_deferred)
155 target_link_libraries(unittest_deferred os global)
156
157 endif(WITH_BLUESTORE)
158
159 # unittest_transaction
160 add_executable(unittest_transaction
161 test_transaction.cc)
162 add_ceph_unittest(unittest_transaction)
163 target_link_libraries(unittest_transaction os ceph-common)
164
165 # unittest_memstore_clone
166 add_executable(unittest_memstore_clone
167 test_memstore_clone.cc
168 $<TARGET_OBJECTS:store_test_fixture>)
169 add_ceph_unittest(unittest_memstore_clone)
170 target_link_libraries(unittest_memstore_clone os global)
171
172 if(WITH_BLUESTORE)
173 add_executable(ceph_test_alloc_replay
174 allocator_replay_test.cc)
175 target_link_libraries(ceph_test_alloc_replay os global ${UNITTEST_LIBS})
176 install(TARGETS ceph_test_alloc_replay
177 DESTINATION bin)
178 endif()