summaryrefslogtreecommitdiffstats
path: root/src/test/Makefile-client.am
blob: 8a9ae6eb35e78b95627c6d09200b2c0879468622 (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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
# This should use LIBMDS_TYPES once it exists
ceph_dencoder_SOURCES = \
	test/encoding/ceph_dencoder.cc \
	$(DENCODER_SOURCES)
ceph_dencoder_LDADD = \
	$(LIBRBD_TYPES) \
	$(LIBOSD_TYPES) \
	$(LIBOS_TYPES) \
	$(LIBMON_TYPES) \
	$(DENCODER_DEPS) \
	$(CEPH_GLOBAL)

# These should always use explicit _CFLAGS/_CXXFLAGS so avoid basename conflicts
ceph_dencoder_CFLAGS = ${AM_CFLAGS}
ceph_dencoder_CXXFLAGS = ${AM_CXXFLAGS}

if COMPILER_HAS_VTA
ceph_dencoder_CFLAGS += -fno-var-tracking-assignments
ceph_dencoder_CXXFLAGS += -fno-var-tracking-assignments
endif

bin_PROGRAMS += ceph-dencoder


if WITH_RADOS

libradostest_la_SOURCES = \
	test/librados/test.cc \
	test/librados/TestCase.cc
noinst_LTLIBRARIES += libradostest.la
libradostest_la_CXXFLAGS = $(UNITTEST_CXXFLAGS)
RADOS_TEST_LDADD = libradostest.la

ceph_test_rados_SOURCES = \
	test/osd/TestRados.cc \
	test/osd/TestOpStat.cc \
	test/osd/Object.cc \
	test/osd/RadosModel.cc
ceph_test_rados_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
bin_DEBUGPROGRAMS += ceph_test_rados

ceph_test_mutate_SOURCES = test/test_mutate.cc
ceph_test_mutate_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
bin_DEBUGPROGRAMS += ceph_test_mutate

if WITH_BUILD_TESTS
test_build_librados_SOURCES = \
	test/buildtest_skeleton.cc \
	$(librados_la_SOURCES)
test_build_librados_LDADD = \
	$(LIBRADOS_DEPS) \
	$(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS)
test_build_librados_LDFLAGS = -static-libtool-libs
test_build_librados_CFLAGS = $(AM_CFLAGS)
test_build_librados_CXXFLAGS = $(AM_CXXFLAGS)
bin_DEBUGPROGRAMS += test_build_librados
endif # WITH_BUILD_TESTS

ceph_smalliobench_SOURCES = \
	test/bench/small_io_bench.cc \
	test/bench/rados_backend.cc \
	test/bench/detailed_stat_collector.cc \
	test/bench/bencher.cc
ceph_smalliobench_LDADD = $(LIBRADOS) $(BOOST_PROGRAM_OPTIONS_LIBS) $(CEPH_GLOBAL)
bin_DEBUGPROGRAMS += ceph_smalliobench

ceph_omapbench_SOURCES = test/omap_bench.cc
ceph_omapbench_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
bin_DEBUGPROGRAMS += ceph_omapbench

ceph_objectstore_bench_SOURCES = test/objectstore_bench.cc
ceph_objectstore_bench_LDADD = $(LIBOS) $(CEPH_GLOBAL)
bin_DEBUGPROGRAMS += ceph_objectstore_bench

if LINUX
ceph_kvstorebench_SOURCES = \
	test/kv_store_bench.cc \
	key_value_store/kv_flat_btree_async.cc
ceph_kvstorebench_LDADD = $(LIBRADOS) $(CEPH_GLOBAL)
bin_DEBUGPROGRAMS += ceph_kvstorebench
endif

if LINUX
ceph_test_rados_list_parallel_SOURCES = \
	test/system/rados_list_parallel.cc \
	test/system/st_rados_create_pool.cc \
	test/system/st_rados_list_objects.cc
ceph_test_rados_list_parallel_LDADD = $(LIBRADOS) libsystest.la $(PTHREAD_LIBS)
bin_DEBUGPROGRAMS += ceph_test_rados_list_parallel

ceph_test_rados_open_pools_parallel_SOURCES = \
	test/system/rados_open_pools_parallel.cc \
	test/system/st_rados_create_pool.cc
ceph_test_rados_open_pools_parallel_LDADD = $(LIBRADOS) libsystest.la $(PTHREAD_LIBS)
bin_DEBUGPROGRAMS += ceph_test_rados_open_pools_parallel

ceph_test_rados_delete_pools_parallel_SOURCES = \
	test/system/rados_delete_pools_parallel.cc \
	test/system/st_rados_create_pool.cc \
	test/system/st_rados_delete_pool.cc \
	test/system/st_rados_list_objects.cc
ceph_test_rados_delete_pools_parallel_LDADD = $(LIBRADOS) libsystest.la $(PTHREAD_LIBS)
bin_DEBUGPROGRAMS += ceph_test_rados_delete_pools_parallel

ceph_test_rados_watch_notify_SOURCES = \
	test/system/rados_watch_notify.cc \
	test/system/st_rados_create_pool.cc \
	test/system/st_rados_delete_pool.cc \
	test/system/st_rados_delete_objs.cc \
	test/system/st_rados_watch.cc \
	test/system/st_rados_notify.cc
ceph_test_rados_watch_notify_LDADD = $(LIBRADOS) libsystest.la $(PTHREAD_LIBS)
bin_DEBUGPROGRAMS += ceph_test_rados_watch_notify
endif # LINUX

unittest_librados_SOURCES = test/librados/librados.cc
unittest_librados_LDADD = $(LIBRADOS) $(CEPH_GLOBAL) $(UNITTEST_LDADD)
unittest_librados_CXXFLAGS = $(UNITTEST_CXXFLAGS)
check_TESTPROGRAMS += unittest_librados

unittest_librados_config_SOURCES = test/librados/librados_config.cc
unittest_librados_config_LDADD = $(LIBRADOS) $(CEPH_GLOBAL) $(UNITTEST_LDADD)
unittest_librados_config_CXXFLAGS = $(UNITTEST_CXXFLAGS)
check_TESTPROGRAMS += unittest_librados_config

ceph_multi_stress_watch_SOURCES = test/multi_stress_watch.cc
ceph_multi_stress_watch_LDADD = $(LIBRADOS) $(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
bin_DEBUGPROGRAMS += ceph_multi_stress_watch


ceph_test_cls_rbd_SOURCES = test/cls_rbd/test_cls_rbd.cc
ceph_test_cls_rbd_LDADD = \
	$(LIBRADOS) libcls_rbd_client.la libcls_lock_client.la \
	$(LIBCOMMON) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD) $(CRYPTO_LIBS) \
	$(EXTRALIBS)
ceph_test_cls_rbd_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_cls_rbd

ceph_test_cls_refcount_SOURCES = test/cls_refcount/test_cls_refcount.cc
ceph_test_cls_refcount_LDADD = $(LIBRADOS) libcls_refcount_client.la $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_cls_refcount_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_cls_refcount

ceph_test_cls_version_SOURCES = test/cls_version/test_cls_version.cc
ceph_test_cls_version_LDADD = $(LIBRADOS) libcls_version_client.a $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_cls_version_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_cls_version

ceph_test_cls_log_SOURCES = test/cls_log/test_cls_log.cc
ceph_test_cls_log_LDADD = $(LIBRADOS) libcls_log_client.a $(UNITTEST_LDADD) $(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
ceph_test_cls_log_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_cls_log

ceph_test_cls_statelog_SOURCES = test/cls_statelog/test_cls_statelog.cc
ceph_test_cls_statelog_LDADD = $(LIBRADOS) libcls_statelog_client.a $(UNITTEST_LDADD) $(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
ceph_test_cls_statelog_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_cls_statelog

ceph_test_cls_replica_log_SOURCES = test/cls_replica_log/test_cls_replica_log.cc
ceph_test_cls_replica_log_LDADD = \
	$(LIBRADOS) libcls_replica_log_client.a \
	$(UNITTEST_LDADD) $(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
ceph_test_cls_replica_log_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_cls_replica_log

ceph_test_cls_lock_SOURCES = test/cls_lock/test_cls_lock.cc
ceph_test_cls_lock_LDADD = \
	$(LIBRADOS) libcls_lock_client.la \
	$(LIBCOMMON) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_cls_lock_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_cls_lock

ceph_test_cls_hello_SOURCES = test/cls_hello/test_cls_hello.cc
ceph_test_cls_hello_LDADD = \
	$(LIBRADOS) $(CRYPTO_LIBS) \
	$(UNITTEST_LDADD) $(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
ceph_test_cls_hello_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_cls_hello

ceph_test_cls_numops_SOURCES = test/cls_numops/test_cls_numops.cc
ceph_test_cls_numops_LDADD = \
    $(LIBRADOS) libcls_numops_client.la \
    $(UNITTEST_LDADD) $(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
ceph_test_cls_numops_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_cls_numops

ceph_test_cls_journal_SOURCES = test/cls_journal/test_cls_journal.cc
ceph_test_cls_journal_LDADD = \
        libcls_journal_client.la $(LIBRADOS) \
        $(LIBCOMMON) $(CRYPTO_LIBS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD) -luuid
ceph_test_cls_journal_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_cls_journal

ceph_test_rados_api_cmd_SOURCES = test/librados/cmd.cc
ceph_test_rados_api_cmd_LDADD = \
	$(LIBCOMMON) $(LIBRADOS) $(CRYPTO_LIBS) \
	$(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_rados_api_cmd_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_api_cmd

ceph_test_rados_api_io_SOURCES = test/librados/io.cc
ceph_test_rados_api_io_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_rados_api_io_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_api_io

ceph_test_rados_api_c_write_operations_SOURCES = \
	test/librados/c_write_operations.cc
ceph_test_rados_api_c_write_operations_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_rados_api_c_write_operations_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_api_c_write_operations

ceph_test_rados_api_c_read_operations_SOURCES = \
	test/librados/c_read_operations.cc
ceph_test_rados_api_c_read_operations_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_rados_api_c_read_operations_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_api_c_read_operations

ceph_test_rados_api_aio_SOURCES = test/librados/aio.cc
ceph_test_rados_api_aio_LDADD = \
	$(LIBRADOS) $(LIBCOMMON) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_rados_api_aio_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_api_aio

ceph_test_rados_api_list_SOURCES = test/librados/list.cc
ceph_test_rados_api_list_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_rados_api_list_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_api_list

ceph_test_rados_api_nlist_SOURCES = test/librados/nlist.cc
ceph_test_rados_api_nlist_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_rados_api_nlist_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_api_nlist

ceph_test_rados_api_pool_SOURCES = test/librados/pool.cc
ceph_test_rados_api_pool_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_rados_api_pool_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_api_pool

ceph_test_rados_api_stat_SOURCES = test/librados/stat.cc
ceph_test_rados_api_stat_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_rados_api_stat_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_api_stat

ceph_test_rados_api_watch_notify_SOURCES = test/librados/watch_notify.cc
ceph_test_rados_api_watch_notify_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_rados_api_watch_notify_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_api_watch_notify

ceph_test_rados_api_snapshots_SOURCES = test/librados/snapshots.cc
ceph_test_rados_api_snapshots_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_rados_api_snapshots_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_api_snapshots

ceph_test_rados_api_cls_SOURCES = test/librados/cls.cc
ceph_test_rados_api_cls_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_rados_api_cls_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_api_cls

ceph_test_rados_api_misc_SOURCES = test/librados/misc.cc
ceph_test_rados_api_misc_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
ceph_test_rados_api_misc_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_api_misc

ceph_test_rados_api_tier_SOURCES = \
	test/librados/tier.cc \
	osd/HitSet.cc
ceph_test_rados_api_tier_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
ceph_test_rados_api_tier_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_api_tier

ceph_test_rados_api_lock_SOURCES = test/librados/lock.cc
ceph_test_rados_api_lock_LDADD = $(LIBRADOS) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_rados_api_lock_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_api_lock


ceph_test_stress_watch_SOURCES = test/test_stress_watch.cc
ceph_test_stress_watch_LDADD = \
	$(LIBRADOS) $(LIBCOMMON) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
ceph_test_stress_watch_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_stress_watch

librados_test_stub_la_SOURCES = \
	test/librados_test_stub/LibradosTestStub.cc \
	test/librados_test_stub/TestClassHandler.cc \
	test/librados_test_stub/TestIoCtxImpl.cc \
	test/librados_test_stub/TestMemIoCtxImpl.cc \
	test/librados_test_stub/TestMemRadosClient.cc \
	test/librados_test_stub/TestRadosClient.cc \
	test/librados_test_stub/TestWatchNotify.cc
noinst_HEADERS += \
	test/librados_test_stub/LibradosTestStub.h \
	test/librados_test_stub/MockTestMemIoCtxImpl.h \
	test/librados_test_stub/MockTestMemRadosClient.h \
	test/librados_test_stub/TestClassHandler.h \
	test/librados_test_stub/TestRadosClient.h \
	test/librados_test_stub/TestMemRadosClient.h \
	test/librados_test_stub/TestWatchNotify.h \
	test/librados_test_stub/TestMemIoCtxImpl.h \
	test/librados_test_stub/TestIoCtxImpl.h
noinst_LTLIBRARIES += librados_test_stub.la

unittest_journal_SOURCES = \
	test/journal/test_main.cc \
        test/journal/test_Entry.cc \
	test/journal/test_FutureImpl.cc \
	test/journal/test_Journaler.cc \
	test/journal/test_JournalMetadata.cc \
	test/journal/test_JournalPlayer.cc \
	test/journal/test_JournalRecorder.cc \
	test/journal/test_JournalTrimmer.cc \
	test/journal/test_ObjectPlayer.cc \
	test/journal/test_ObjectRecorder.cc \
	test/journal/RadosTestFixture.cc
unittest_journal_CXXFLAGS = $(UNITTEST_CXXFLAGS)
unittest_journal_LDADD = \
	libjournal.la libcls_journal_client.la \
	librados_test_stub.la librados_internal.la \
	$(UNITTEST_LDADD) $(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
check_TESTPROGRAMS += unittest_journal

if WITH_RBD
ceph_smalliobenchrbd_SOURCES = \
	test/bench/small_io_bench_rbd.cc \
	test/bench/rbd_backend.cc \
	test/bench/detailed_stat_collector.cc \
	test/bench/bencher.cc
ceph_smalliobenchrbd_LDADD = $(LIBRBD) $(LIBRADOS) $(BOOST_PROGRAM_OPTIONS_LIBS) $(CEPH_GLOBAL)
bin_DEBUGPROGRAMS += ceph_smalliobenchrbd

unittest_rbd_replay_SOURCES = test/test_rbd_replay.cc
unittest_rbd_replay_LDADD = $(LIBRBD) \
	$(LIBRADOS) \
	$(CEPH_GLOBAL) \
	librbd_replay.la \
	librbd_replay_ios.la \
	$(UNITTEST_LDADD)
unittest_rbd_replay_CXXFLAGS = $(UNITTEST_CXXFLAGS)
check_TESTPROGRAMS += unittest_rbd_replay

librbd_test_la_SOURCES = \
	test/librbd/test_fixture.cc \
	test/librbd/test_support.cc \
	test/librbd/test_librbd.cc \
	test/librbd/test_ImageWatcher.cc \
	test/librbd/test_internal.cc \
	test/librbd/test_JournalEntries.cc \
	test/librbd/test_JournalReplay.cc \
	test/librbd/test_ObjectMap.cc
librbd_test_la_CXXFLAGS = $(UNITTEST_CXXFLAGS)
noinst_LTLIBRARIES += librbd_test.la

unittest_librbd_SOURCES = \
        test/librbd/test_main.cc \
	test/librbd/test_mock_fixture.cc
unittest_librbd_CXXFLAGS = $(UNITTEST_CXXFLAGS) -DTEST_LIBRBD_INTERNALS
unittest_librbd_LDADD = \
	librbd_test.la librbd_api.la librbd_internal.la $(LIBRBD_TYPES) \
	libcls_rbd_client.la libcls_lock_client.la \
	libjournal.la libcls_journal_client.la \
	librados_test_stub.la librados_internal.la \
	$(LIBOSDC) $(UNITTEST_LDADD) \
	$(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
check_PROGRAMS += unittest_librbd
check_SCRIPTS += test/run-rbd-unit-tests.sh

ceph_test_librbd_SOURCES = \
        test/librbd/test_main.cc
ceph_test_librbd_CXXFLAGS = $(UNITTEST_CXXFLAGS) -DTEST_LIBRBD_INTERNALS
ceph_test_librbd_LDADD = \
	librbd_test.la librbd_api.la librbd_internal.la $(LIBRBD_TYPES) \
	libcls_rbd_client.la libcls_lock_client.la \
	libjournal.la libcls_journal_client.la \
	librados_api.la $(LIBRADOS_DEPS) $(UNITTEST_LDADD) \
	$(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
bin_DEBUGPROGRAMS += ceph_test_librbd

ceph_test_librbd_api_SOURCES = \
	test/librbd/test_support.cc \
	test/librbd/test_librbd.cc \
	test/librbd/test_main.cc
ceph_test_librbd_api_CXXFLAGS = $(UNITTEST_CXXFLAGS)
ceph_test_librbd_api_LDADD = \
	$(LIBRBD) $(LIBRADOS) $(LIBCOMMON) $(UNITTEST_LDADD) $(RADOS_TEST_LDADD)
bin_DEBUGPROGRAMS += ceph_test_librbd_api

noinst_HEADERS += \
	test/librbd/test_fixture.h \
	test/librbd/test_mock_fixture.h \
	test/librbd/test_support.h \
	test/librbd/mock/MockContextWQ.h \
	test/librbd/mock/MockImageCtx.h \
	test/librbd/mock/MockImageWatcher.h \
	test/librbd/mock/MockObjectMap.h

if LINUX
ceph_test_librbd_fsx_SOURCES = test/librbd/fsx.cc
ceph_test_librbd_fsx_LDADD = \
	$(LIBKRBD) $(LIBRBD) $(LIBRADOS) \
	$(CRYPTO_LIBS) $(PTHREAD_LIBS)
ceph_test_librbd_fsx_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_librbd_fsx
endif
endif # WITH_RBD


if WITH_RADOSSTRIPER
libradosstripertest_la_SOURCES = test/libradosstriper/TestCase.cc
noinst_LTLIBRARIES += libradosstripertest.la
libradosstripertest_la_LIBADD = $(RADOS_TEST_LDADD)
libradosstripertest_la_CXXFLAGS = $(UNITTEST_CXXFLAGS)
RADOS_STRIPER_TEST_LDADD = libradosstripertest.la

ceph_test_rados_striper_api_io_SOURCES = test/libradosstriper/io.cc
ceph_test_rados_striper_api_io_LDADD = \
	$(LIBRADOS) $(LIBRADOSSTRIPER) $(LIBCOMMON) \
	$(UNITTEST_LDADD) $(RADOS_STRIPER_TEST_LDADD)
ceph_test_rados_striper_api_io_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_striper_api_io

ceph_test_rados_striper_api_aio_SOURCES = test/libradosstriper/aio.cc
ceph_test_rados_striper_api_aio_LDADD = $(LIBRADOS) $(LIBRADOSSTRIPER) $(UNITTEST_LDADD) $(RADOS_STRIPER_TEST_LDADD)
ceph_test_rados_striper_api_aio_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_striper_api_aio

ceph_test_rados_striper_api_striping_SOURCES = test/libradosstriper/striping.cc
ceph_test_rados_striper_api_striping_LDADD = $(LIBRADOS) $(LIBRADOSSTRIPER) $(UNITTEST_LDADD) $(RADOS_STRIPER_TEST_LDADD)
ceph_test_rados_striper_api_striping_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rados_striper_api_striping

endif # WITH_RADOSSTRIPER


if WITH_CEPHFS

if WITH_BUILD_TESTS
# I dont get this one... testing the osdc build but link in libcephfs?
test_build_libcephfs_SOURCES = \
	test/buildtest_skeleton.cc \
	$(libosdc_la_SOURCES)
test_build_libcephfs_LDADD = \
	$(LIBCEPHFS) -lexpat \
	$(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS)
test_build_libcephfs_LDFLAGS = -static-libtool-libs
test_build_libcephfs_CFLAGS = $(AM_CFLAGS)
test_build_libcephfs_CXXFLAGS = $(AM_CXXFLAGS)
bin_DEBUGPROGRAMS += test_build_libcephfs
endif # WITH_BUILD_TESTS

unittest_encoding_LDADD = $(LIBCEPHFS) $(LIBRADOS) $(CEPH_GLOBAL) -lm $(UNITTEST_LDADD)
unittest_encoding_CXXFLAGS = $(UNITTEST_CXXFLAGS) -fno-strict-aliasing
check_TESTPROGRAMS += unittest_encoding

unittest_base64_SOURCES = test/base64.cc
unittest_base64_LDADD = $(LIBCEPHFS) $(CEPH_GLOBAL) -lm $(UNITTEST_LDADD)
unittest_base64_CXXFLAGS = $(UNITTEST_CXXFLAGS)
check_TESTPROGRAMS += unittest_base64

unittest_run_cmd_SOURCES = test/run_cmd.cc
unittest_run_cmd_LDADD = $(LIBCEPHFS) $(CEPH_GLOBAL) $(UNITTEST_LDADD)
unittest_run_cmd_CXXFLAGS = $(UNITTEST_CXXFLAGS)
check_TESTPROGRAMS += unittest_run_cmd

unittest_simple_spin_SOURCES = test/simple_spin.cc
unittest_simple_spin_LDADD = $(LIBCEPHFS) $(CEPH_GLOBAL) $(UNITTEST_LDADD)
unittest_simple_spin_CXXFLAGS = $(UNITTEST_CXXFLAGS)
check_TESTPROGRAMS += unittest_simple_spin

unittest_libcephfs_config_SOURCES = test/libcephfs_config.cc
unittest_libcephfs_config_LDADD = $(LIBCEPHFS) $(CEPH_GLOBAL) $(UNITTEST_LDADD)
unittest_libcephfs_config_CXXFLAGS = $(UNITTEST_CXXFLAGS)
check_TESTPROGRAMS += unittest_libcephfs_config

ceph_test_libcephfs_SOURCES = \
	test/libcephfs/test.cc \
	test/libcephfs/readdir_r_cb.cc \
	test/libcephfs/caps.cc \
	test/libcephfs/multiclient.cc \
	test/libcephfs/access.cc
if LINUX
ceph_test_libcephfs_SOURCES += test/libcephfs/flock.cc
endif # LINUX

ceph_test_libcephfs_LDADD = $(LIBRADOS) $(LIBCEPHFS) $(LIBCOMMON) $(UNITTEST_LDADD)
ceph_test_libcephfs_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_libcephfs

unittest_encoding_SOURCES = test/encoding.cc

ceph_test_c_headers_SOURCES = test/test_c_headers.c
ceph_test_c_headers_LDADD = $(LIBRADOS) $(LIBCEPHFS)
ceph_test_c_headers_CFLAGS = $(AM_CFLAGS) \
	-Wstrict-prototypes \
	-Wredundant-decls \
	-Wall \
	-Wundef \
	-Wwrite-strings \
	-Wmissing-prototypes \
	-Wendif-labels \
	-Wmissing-include-dirs \
	-Wempty-body \
	-Wnested-externs \
	-Wformat-security \
	-Wformat-y2k \
	-Winit-self \
	-Wignored-qualifiers \
	-Wold-style-definition \
	-Wtype-limits
if !CLANG
ceph_test_c_headers_CFLAGS += -Werror -Wold-style-declaration
endif # !CLANG
bin_DEBUGPROGRAMS += ceph_test_c_headers

endif # WITH_CEPHFS


if WITH_RADOSGW

if WITH_BUILD_TESTS
test_build_librgw_SOURCES = \
	test/buildtest_skeleton.cc \
	$(librgw_la_SOURCES)
test_build_librgw_LDADD = \
	$(LIBRGW_DEPS) \
	$(PTHREAD_LIBS) $(CRYPTO_LIBS) $(EXTRALIBS) \
	$(CEPH_GLOBAL)
test_build_librgw_LDFLAGS = -static-libtool-libs
test_build_librgw_CFLAGS = $(AM_CFLAGS)
test_build_librgw_CXXFLAGS = $(AM_CXXFLAGS)
bin_DEBUGPROGRAMS += test_build_librgw
endif # WITH_BUILD_TESTS

#unittest_librgw_link_SOURCES = test/librgw_link.cc
#unittest_librgw_link_LDFLAGS = $(PTHREAD_CFLAGS) ${AM_LDFLAGS}
#unittest_librgw_link_LDADD = $(LIBRGW) ${UNITTEST_LDADD}
#unittest_librgw_link_CXXFLAGS = ${CRYPTO_CFLAGS} ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
#check_TESTPROGRAMS += unittest_librgw_link

#unittest_librgw_SOURCES = test/librgw.cc
#unittest_librgw_LDFLAGS = -lrt $(PTHREAD_CFLAGS) -lcurl ${AM_LDFLAGS}
#unittest_librgw_LDADD =  librgw.la $(LIBRADOS) ${UNITTEST_LDADD} -lexpat $(CEPH_GLOBAL)
#unittest_librgw_CXXFLAGS = ${CRYPTO_CFLAGS} ${AM_CXXFLAGS} ${UNITTEST_CXXFLAGS}
#check_TESTPROGRAMS += unittest_librgw

ceph_test_cors_SOURCES = test/test_cors.cc
ceph_test_cors_LDADD = \
	$(LIBRADOS) $(LIBRGW) $(CEPH_GLOBAL) \
	$(UNITTEST_LDADD) \
	-lcurl -lexpat
ceph_test_cors_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_cors

ceph_test_rgw_manifest_SOURCES = test/rgw/test_rgw_manifest.cc
ceph_test_rgw_manifest_LDADD = \
	$(LIBRADOS) $(LIBRGW) $(LIBRGW_DEPS) $(CEPH_GLOBAL) \
	$(UNITTEST_LDADD) $(CRYPTO_LIBS) \
	-lcurl -lexpat

ceph_test_rgw_manifest_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rgw_manifest

ceph_test_rgw_obj_SOURCES = test/rgw/test_rgw_obj.cc
ceph_test_rgw_obj_LDADD = \
	$(LIBRADOS) $(LIBRGW) $(LIBRGW_DEPS) $(CEPH_GLOBAL) \
	$(UNITTEST_LDADD) $(CRYPTO_LIBS) \
	-lcurl -luuid -lexpat

ceph_test_rgw_obj_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_rgw_obj

ceph_test_cls_rgw_meta_SOURCES = test/test_rgw_admin_meta.cc
ceph_test_cls_rgw_meta_LDADD = \
	$(LIBRADOS) $(LIBRGW) $(CEPH_GLOBAL) \
	$(UNITTEST_LDADD) $(CRYPTO_LIBS) \
	-lcurl -lexpat \
	libcls_version_client.a libcls_log_client.a \
	libcls_statelog_client.a libcls_refcount_client.la \
	libcls_rgw_client.la libcls_user_client.a libcls_lock_client.la
ceph_test_cls_rgw_meta_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_cls_rgw_meta

ceph_test_cls_rgw_log_SOURCES = test/test_rgw_admin_log.cc
ceph_test_cls_rgw_log_LDADD = \
	$(LIBRADOS) $(LIBRGW) $(CEPH_GLOBAL) \
	$(UNITTEST_LDADD) $(CRYPTO_LIBS) \
	-lcurl -lexpat \
	libcls_version_client.a libcls_log_client.a \
	libcls_statelog_client.a libcls_refcount_client.la \
	libcls_rgw_client.la libcls_user_client.a libcls_lock_client.la
ceph_test_cls_rgw_log_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_cls_rgw_log

ceph_test_cls_rgw_opstate_SOURCES = test/test_rgw_admin_opstate.cc
ceph_test_cls_rgw_opstate_LDADD = \
	$(LIBRADOS) $(LIBRGW) $(CEPH_GLOBAL) \
	$(UNITTEST_LDADD) $(CRYPTO_LIBS) \
	-lcurl -lexpat \
	libcls_version_client.a libcls_log_client.a  libcls_timeindex_client.a \
	libcls_statelog_client.a libcls_refcount_client.la \
	libcls_rgw_client.la libcls_user_client.a libcls_lock_client.la \
	$(LIBRADOS)
ceph_test_cls_rgw_opstate_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_cls_rgw_opstate

ceph_test_cls_rgw_SOURCES = test/cls_rgw/test_cls_rgw.cc
ceph_test_cls_rgw_LDADD = \
	$(LIBRADOS) $(CRYPTO_LIBS) libcls_rgw_client.la \
	$(LIBCOMMON) $(UNITTEST_LDADD) $(CEPH_GLOBAL) $(RADOS_TEST_LDADD)
ceph_test_cls_rgw_CXXFLAGS = $(UNITTEST_CXXFLAGS)
bin_DEBUGPROGRAMS += ceph_test_cls_rgw

endif # WITH_RADOSGW


endif # WITH_RADOS