]> git.proxmox.com Git - ceph.git/blob - ceph/src/test/librbd/CMakeLists.txt
update sources to v12.2.3
[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 exclusive_lock/test_mock_PreAcquireRequest.cc
34 exclusive_lock/test_mock_PostAcquireRequest.cc
35 exclusive_lock/test_mock_PreReleaseRequest.cc
36 image/test_mock_RefreshRequest.cc
37 image/test_mock_RemoveRequest.cc
38 io/test_mock_ImageRequest.cc
39 io/test_mock_ImageRequestWQ.cc
40 io/test_mock_ObjectRequest.cc
41 journal/test_mock_OpenRequest.cc
42 journal/test_mock_PromoteRequest.cc
43 journal/test_mock_Replay.cc
44 managed_lock/test_mock_AcquireRequest.cc
45 managed_lock/test_mock_BreakRequest.cc
46 managed_lock/test_mock_GetLockerRequest.cc
47 managed_lock/test_mock_ReacquireRequest.cc
48 managed_lock/test_mock_ReleaseRequest.cc
49 mirror/test_mock_DisableRequest.cc
50 object_map/test_mock_InvalidateRequest.cc
51 object_map/test_mock_LockRequest.cc
52 object_map/test_mock_RefreshRequest.cc
53 object_map/test_mock_ResizeRequest.cc
54 object_map/test_mock_SnapshotCreateRequest.cc
55 object_map/test_mock_SnapshotRemoveRequest.cc
56 object_map/test_mock_SnapshotRollbackRequest.cc
57 object_map/test_mock_UnlockRequest.cc
58 object_map/test_mock_UpdateRequest.cc
59 operation/test_mock_DisableFeaturesRequest.cc
60 operation/test_mock_EnableFeaturesRequest.cc
61 operation/test_mock_Request.cc
62 operation/test_mock_ResizeRequest.cc
63 operation/test_mock_SnapshotCreateRequest.cc
64 operation/test_mock_SnapshotProtectRequest.cc
65 operation/test_mock_SnapshotRemoveRequest.cc
66 operation/test_mock_SnapshotRollbackRequest.cc
67 operation/test_mock_SnapshotUnprotectRequest.cc
68 operation/test_mock_TrimRequest.cc
69 watcher/test_mock_RewatchRequest.cc
70 )
71 add_executable(unittest_librbd
72 ${unittest_librbd_srcs}
73 $<TARGET_OBJECTS:common_texttable_obj>)
74 target_compile_definitions(unittest_librbd PUBLIC "-DTEST_LIBRBD_INTERNALS")
75 set_target_properties(unittest_librbd PROPERTIES COMPILE_FLAGS
76 ${UNITTEST_CXX_FLAGS})
77 target_link_libraries(unittest_librbd
78 cls_rbd
79 cls_rbd_client
80 cls_lock
81 cls_lock_client
82 journal
83 journal_test_mock
84 cls_journal
85 cls_journal_client
86 rados_test_stub
87 librados
88 rbd_test
89 rbd_test_mock
90 rbd_api
91 rbd_internal
92 rbd_types
93 osdc
94 global
95 ${UNITTEST_LIBS}
96 radostest)
97
98 add_executable(ceph_test_librbd
99 test_main.cc
100 $<TARGET_OBJECTS:common_texttable_obj>)
101 target_link_libraries(ceph_test_librbd
102 rbd_test
103 rbd_api
104 rbd_internal
105 rbd_types
106 journal
107 cls_journal_client
108 cls_rbd_client
109 rados_a
110 ${UNITTEST_LIBS}
111 radostest)
112 target_compile_definitions(ceph_test_librbd PUBLIC "-DTEST_LIBRBD_INTERNALS")
113 set_target_properties(ceph_test_librbd PROPERTIES COMPILE_FLAGS
114 ${UNITTEST_CXX_FLAGS})
115
116 add_executable(ceph_test_librbd_api
117 test_support.cc
118 test_librbd.cc
119 test_main.cc
120 $<TARGET_OBJECTS:libradostest_obj>
121 $<TARGET_OBJECTS:common_texttable_obj>)
122 target_link_libraries(ceph_test_librbd_api
123 librbd
124 librados
125 ${UNITTEST_LIBS})
126 set_target_properties(ceph_test_librbd_api PROPERTIES COMPILE_FLAGS
127 ${UNITTEST_CXX_FLAGS})
128
129 if(LINUX)
130 add_executable(ceph_test_librbd_fsx
131 fsx.cc
132 $<TARGET_OBJECTS:common_texttable_obj>
133 )
134 target_link_libraries(ceph_test_librbd_fsx
135 librbd
136 librados
137 journal
138 krbd
139 global
140 m
141 ${CMAKE_DL_LIBS}
142 ${CRYPTO_LIBS}
143 ${EXTRALIBS}
144 )
145 install(TARGETS
146 ceph_test_librbd_fsx
147 DESTINATION ${CMAKE_INSTALL_BINDIR})
148 endif(LINUX)
149
150 install(TARGETS
151 ceph_test_librbd
152 ceph_test_librbd_api
153 DESTINATION ${CMAKE_INSTALL_BINDIR})