summaryrefslogtreecommitdiffstats
path: root/src/test/librados/CMakeLists.txt
blob: e9338bbd46415e8f1a6e4293017bbe5160f1fca2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# radostest
add_library(radostest_shared OBJECT test_shared.cc)
target_include_directories(radostest_shared PRIVATE
  $<TARGET_PROPERTY:GTest::GTest,INTERFACE_INCLUDE_DIRECTORIES>)

add_library(radostest STATIC
  test_common.cc
  TestCase.cc
  test.cc
  $<TARGET_OBJECTS:radostest_shared>)
target_link_libraries(radostest PUBLIC
  GTest::GTest
  ceph-common
  json_spirit
  ${GSSAPI_LIBRARIES} ${OPENLDAP_LIBRARIES} ${EXTRALIBS})
add_library(radostest-cxx STATIC
  testcase_cxx.cc
  test_cxx.cc
  $<TARGET_OBJECTS:radostest_shared>)
target_link_libraries(radostest-cxx PUBLIC
  GTest::GTest
  ceph-common)

add_executable(ceph_test_rados_api_cmd
  cmd.cc)
target_link_libraries(ceph_test_rados_api_cmd
  librados ${UNITTEST_LIBS} radostest)
add_executable(ceph_test_rados_api_cmd_pp
  cmd_cxx.cc)
target_link_libraries(ceph_test_rados_api_cmd_pp
  librados ${UNITTEST_LIBS} radostest-cxx)

add_executable(ceph_test_rados_api_io
  io.cc)
target_link_libraries(ceph_test_rados_api_io
  librados ${UNITTEST_LIBS} radostest)
add_executable(ceph_test_rados_api_io_pp
  io_cxx.cc)
target_link_libraries(ceph_test_rados_api_io_pp
  librados ${UNITTEST_LIBS} radostest-cxx)

add_executable(ceph_test_rados_api_c_write_operations
  c_write_operations.cc)
target_link_libraries(ceph_test_rados_api_c_write_operations
  librados ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_c_read_operations
  c_read_operations.cc)
target_link_libraries(ceph_test_rados_api_c_read_operations
  librados ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_aio
  aio.cc)
target_link_libraries(ceph_test_rados_api_aio
  librados ${UNITTEST_LIBS} radostest)
add_executable(ceph_test_rados_api_aio_pp
  aio_cxx.cc)
target_link_libraries(ceph_test_rados_api_aio_pp
  librados ${UNITTEST_LIBS} radostest-cxx)

add_executable(ceph_test_rados_api_asio asio.cc)
target_link_libraries(ceph_test_rados_api_asio global
  librados ${UNITTEST_LIBS} Boost::coroutine Boost::context)

add_executable(ceph_test_rados_api_list
  list.cc
  $<TARGET_OBJECTS:unit-main>)
target_link_libraries(ceph_test_rados_api_list
  librados global ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_pool
  pool.cc)
target_link_libraries(ceph_test_rados_api_pool
  librados ${UNITTEST_LIBS} radostest)

add_executable(ceph_test_rados_api_stat
  stat.cc)
target_link_libraries(ceph_test_rados_api_stat
  librados ${UNITTEST_LIBS} radostest)
add_executable(ceph_test_rados_api_stat_pp
  stat_cxx.cc)
target_link_libraries(ceph_test_rados_api_stat_pp
  librados ${UNITTEST_LIBS} radostest-cxx)

add_executable(ceph_test_rados_api_watch_notify
  watch_notify.cc)
target_link_libraries(ceph_test_rados_api_watch_notify
  librados ${UNITTEST_LIBS} radostest)
add_executable(ceph_test_rados_api_watch_notify_pp
  watch_notify_cxx.cc)
target_link_libraries(ceph_test_rados_api_watch_notify_pp
  librados ${UNITTEST_LIBS} radostest-cxx)

add_executable(ceph_test_rados_api_cls
  cls.cc)
target_link_libraries(ceph_test_rados_api_cls
  librados ${UNITTEST_LIBS} radostest-cxx)

add_executable(ceph_test_rados_api_misc
  misc.cc
  $<TARGET_OBJECTS:unit-main>)
target_link_libraries(ceph_test_rados_api_misc
  librados global ${UNITTEST_LIBS} radostest)
add_executable(ceph_test_rados_api_misc_pp
  misc_cxx.cc
  $<TARGET_OBJECTS:unit-main>)
target_link_libraries(ceph_test_rados_api_misc_pp
  librados global ${UNITTEST_LIBS} radostest-cxx)

add_executable(ceph_test_rados_api_lock
  lock.cc)
target_link_libraries(ceph_test_rados_api_lock
  librados ${UNITTEST_LIBS} radostest)
add_executable(ceph_test_rados_api_lock_pp
  lock_cxx.cc)
target_link_libraries(ceph_test_rados_api_lock_pp
  librados ${UNITTEST_LIBS} radostest-cxx)

add_executable(ceph_test_rados_api_service
  service.cc)
target_link_libraries(ceph_test_rados_api_service
  librados global ${UNITTEST_LIBS} radostest)
add_executable(ceph_test_rados_api_service_pp
  service_cxx.cc)
target_link_libraries(ceph_test_rados_api_service_pp
  librados global ${UNITTEST_LIBS} radostest-cxx)

add_executable(ceph_test_rados_api_tier_pp
  tier_cxx.cc
  $<TARGET_OBJECTS:unit-main>)
target_link_libraries(ceph_test_rados_api_tier_pp
  librados global ${UNITTEST_LIBS} Boost::system radostest-cxx cls_cas_internal
  cls_cas_client spawn)

add_executable(ceph_test_rados_api_snapshots
  snapshots.cc)
target_link_libraries(ceph_test_rados_api_snapshots
  librados ${UNITTEST_LIBS} radostest)
add_executable(ceph_test_rados_api_snapshots_pp
  snapshots_cxx.cc)
target_link_libraries(ceph_test_rados_api_snapshots_pp
  librados ${UNITTEST_LIBS} radostest-cxx)

install(TARGETS
  ceph_test_rados_api_aio
  ceph_test_rados_api_aio_pp
  ceph_test_rados_api_asio
  ceph_test_rados_api_c_read_operations
  ceph_test_rados_api_c_write_operations
  ceph_test_rados_api_cmd
  ceph_test_rados_api_cmd_pp
  ceph_test_rados_api_io
  ceph_test_rados_api_io_pp
  ceph_test_rados_api_list
  ceph_test_rados_api_lock
  ceph_test_rados_api_lock_pp
  ceph_test_rados_api_misc
  ceph_test_rados_api_misc_pp
  ceph_test_rados_api_pool
  ceph_test_rados_api_service
  ceph_test_rados_api_service_pp
  ceph_test_rados_api_snapshots
  ceph_test_rados_api_snapshots_pp
  ceph_test_rados_api_stat
  ceph_test_rados_api_stat_pp
  ceph_test_rados_api_tier_pp
  ceph_test_rados_api_watch_notify
  ceph_test_rados_api_watch_notify_pp
  DESTINATION ${CMAKE_INSTALL_BINDIR})

# unittest_librados
add_executable(unittest_librados
  librados.cc
  )
add_ceph_unittest(unittest_librados)
target_link_libraries(unittest_librados librados ${BLKID_LIBRARIES}
	${GSSAPI_LIBRARIES} ${OPENLDAP_LIBRARIES})

# unittest_librados_config
add_executable(unittest_librados_config
  librados_config.cc
  )
add_ceph_unittest(unittest_librados_config)
target_link_libraries(unittest_librados_config
  librados
  ${BLKID_LIBRARIES} ${GSSAPI_LIBRARIES} ${OPENLDAP_LIBRARIES})

# Removing this test. We can't shove it into Finisher as it's not a
# Context any more, and wrapping it to adapt it would be less fair.

#add_executable(ceph_test_rados_completion_speed
#  completion_speed.cc)
#target_link_libraries(ceph_test_rados_completion_speed
#  librados ${UNITTEST_LIBS} radostest-cxx)

add_executable(ceph_test_rados_op_speed
  op_speed.cc)
target_link_libraries(ceph_test_rados_op_speed
  librados ${UNITTEST_LIBS} radostest-cxx)