]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/librbd/CMakeLists.txt
update sources to 12.2.10
[ceph.git] / ceph / src / test / librbd / CMakeLists.txt
1 set(librbd_test
2 test_fixture.cc
3 test_support.cc
4 test_librbd.cc
5 test_ImageWatcher.cc
6 test_internal.cc
7 test_mirroring.cc
8 test_BlockGuard.cc
9 test_MirroringWatcher.cc
10 test_ObjectMap.cc
11 test_Operations.cc
12 journal/test_Entries.cc
13 journal/test_Replay.cc)
14 add_library(rbd_test STATIC ${librbd_test})
15 set_target_properties(rbd_test PROPERTIES COMPILE_FLAGS ${UNITTEST_CXX_FLAGS})
16
17 set(librbd_test_mock_srcs
18 mock/MockImageCtx.cc
19 mock/MockJournal.cc)
20 add_library(rbd_test_mock STATIC ${librbd_test_mock_srcs})
21 set_target_properties(rbd_test_mock PROPERTIES COMPILE_FLAGS
22 ${UNITTEST_CXX_FLAGS})
23
24 # unittest_librbd
25 # doesn't use add_ceph_test because it is called by run-rbd-unit-tests.sh
26 set(unittest_librbd_srcs
27 test_main.cc
28 test_mock_fixture.cc
29 test_mock_ExclusiveLock.cc
30 test_mock_Journal.cc
31 test_mock_ManagedLock.cc
32 test_mock_ObjectMap.cc
33 test_mock_Watcher.cc
34 exclusive_lock/test_mock_PreAcquireRequest.cc
35 exclusive_lock/test_mock_PostAcquireRequest.cc
36 exclusive_lock/test_mock_PreReleaseRequest.cc
37 image/test_mock_RefreshRequest.cc
38 image/test_mock_RemoveRequest.cc
39 io/test_mock_ImageRequest.cc
40 io/test_mock_ImageRequestWQ.cc
41 io/test_mock_ObjectRequest.cc
42 journal/test_mock_OpenRequest.cc
43 journal/test_mock_PromoteRequest.cc
44 journal/test_mock_Replay.cc
45 managed_lock/test_mock_AcquireRequest.cc
46 managed_lock/test_mock_BreakRequest.cc
47 managed_lock/test_mock_GetLockerRequest.cc
48 managed_lock/test_mock_ReacquireRequest.cc
49 managed_lock/test_mock_ReleaseRequest.cc
50 mirror/test_mock_DisableRequest.cc
51 object_map/test_mock_InvalidateRequest.cc
52 object_map/test_mock_LockRequest.cc
53 object_map/test_mock_RefreshRequest.cc
54 object_map/test_mock_ResizeRequest.cc
55 object_map/test_mock_SnapshotCreateRequest.cc
56 object_map/test_mock_SnapshotRemoveRequest.cc
57 object_map/test_mock_SnapshotRollbackRequest.cc
58 object_map/test_mock_UnlockRequest.cc
59 object_map/test_mock_UpdateRequest.cc
60 operation/test_mock_DisableFeaturesRequest.cc
61 operation/test_mock_EnableFeaturesRequest.cc
62 operation/test_mock_Request.cc
63 operation/test_mock_ResizeRequest.cc
64 operation/test_mock_SnapshotCreateRequest.cc
65 operation/test_mock_SnapshotProtectRequest.cc
66 operation/test_mock_SnapshotRemoveRequest.cc
67 operation/test_mock_SnapshotRollbackRequest.cc
68 operation/test_mock_SnapshotUnprotectRequest.cc
69 operation/test_mock_TrimRequest.cc
70 watcher/test_mock_RewatchRequest.cc
71 )
72 add_executable(unittest_librbd
73 ${unittest_librbd_srcs}
74 $<TARGET_OBJECTS:common_texttable_obj>)
75 target_compile_definitions(unittest_librbd PUBLIC "-DTEST_LIBRBD_INTERNALS")
76 set_target_properties(unittest_librbd PROPERTIES COMPILE_FLAGS
77 ${UNITTEST_CXX_FLAGS})
78 target_link_libraries(unittest_librbd
79 cls_rbd
80 cls_rbd_client
81 cls_lock
82 cls_lock_client
83 journal
84 journal_test_mock
85 cls_journal
86 cls_journal_client
87 rados_test_stub
88 librados
89 rbd_test
90 rbd_test_mock
91 rbd_api
92 rbd_internal
93 rbd_types
94 osdc
95 global
96 ${UNITTEST_LIBS}
97 radostest)
98
99 add_executable(ceph_test_librbd
100 test_main.cc
101 $<TARGET_OBJECTS:common_texttable_obj>)
102 target_link_libraries(ceph_test_librbd
103 rbd_test
104 rbd_api
105 rbd_internal
106 rbd_types
107 journal
108 cls_journal_client
109 cls_rbd_client
110 rados_a
111 ${UNITTEST_LIBS}
112 radostest)
113 target_compile_definitions(ceph_test_librbd PUBLIC "-DTEST_LIBRBD_INTERNALS")
114 set_target_properties(ceph_test_librbd PROPERTIES COMPILE_FLAGS
115 ${UNITTEST_CXX_FLAGS})
116
117 add_executable(ceph_test_librbd_api
118 test_support.cc
119 test_librbd.cc
120 test_main.cc
121 $<TARGET_OBJECTS:libradostest_obj>
122 $<TARGET_OBJECTS:common_texttable_obj>)
123 target_link_libraries(ceph_test_librbd_api
124 librbd
125 librados
126 ${UNITTEST_LIBS})
127 set_target_properties(ceph_test_librbd_api PROPERTIES COMPILE_FLAGS
128 ${UNITTEST_CXX_FLAGS})
129
130 if(LINUX)
131 add_executable(ceph_test_librbd_fsx
132 fsx.cc
133 $<TARGET_OBJECTS:common_texttable_obj>
134 )
135 target_link_libraries(ceph_test_librbd_fsx
136 librbd
137 librados
138 journal
139 krbd
140 global
141 m
142 ${CMAKE_DL_LIBS}
143 ${CRYPTO_LIBS}
144 ${EXTRALIBS}
145 )
146 install(TARGETS
147 ceph_test_librbd_fsx
148 DESTINATION ${CMAKE_INSTALL_BINDIR})
149 endif(LINUX)
150
151 install(TARGETS
152 ceph_test_librbd
153 ceph_test_librbd_api
154 DESTINATION ${CMAKE_INSTALL_BINDIR})