]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/TARGETS
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / rocksdb / TARGETS
1 load("@fbcode_macros//build_defs:auto_headers.bzl", "AutoHeaders")
2
3 REPO_PATH = package_name() + "/"
4
5 BUCK_BINS = "buck-out/gen/" + REPO_PATH
6
7 TEST_RUNNER = REPO_PATH + "buckifier/rocks_test_runner.sh"
8
9 rocksdb_compiler_flags = [
10 "-fno-builtin-memcmp",
11 "-DROCKSDB_PLATFORM_POSIX",
12 "-DROCKSDB_LIB_IO_POSIX",
13 "-DROCKSDB_FALLOCATE_PRESENT",
14 "-DROCKSDB_MALLOC_USABLE_SIZE",
15 "-DROCKSDB_RANGESYNC_PRESENT",
16 "-DROCKSDB_SCHED_GETCPU_PRESENT",
17 "-DROCKSDB_SUPPORT_THREAD_LOCAL",
18 "-DOS_LINUX",
19 # Flags to enable libs we include
20 "-DSNAPPY",
21 "-DZLIB",
22 "-DBZIP2",
23 "-DLZ4",
24 "-DZSTD",
25 "-DGFLAGS=gflags",
26 "-DNUMA",
27 "-DTBB",
28 # Needed to compile in fbcode
29 "-Wno-expansion-to-defined",
30 # Added missing flags from output of build_detect_platform
31 "-DROCKSDB_PTHREAD_ADAPTIVE_MUTEX",
32 "-DROCKSDB_BACKTRACE",
33 "-Wnarrowing",
34 ]
35
36 rocksdb_external_deps = [
37 ("bzip2", None, "bz2"),
38 ("snappy", None, "snappy"),
39 ("zlib", None, "z"),
40 ("gflags", None, "gflags"),
41 ("lz4", None, "lz4"),
42 ("zstd", None),
43 ("tbb", None),
44 ("numa", None, "numa"),
45 ("googletest", None, "gtest"),
46 ]
47
48 rocksdb_preprocessor_flags = [
49 # Directories with files for #include
50 "-I" + REPO_PATH + "include/",
51 "-I" + REPO_PATH,
52 ]
53
54 rocksdb_arch_preprocessor_flags = {
55 "x86_64": [
56 "-DHAVE_SSE42",
57 "-DHAVE_PCLMUL",
58 ],
59 }
60
61 build_mode = read_config("fbcode", "build_mode")
62
63 is_opt_mode = build_mode.startswith("opt")
64
65 # -DNDEBUG is added by default in opt mode in fbcode. But adding it twice
66 # doesn't harm and avoid forgetting to add it.
67 if is_opt_mode:
68 rocksdb_compiler_flags.append("-DNDEBUG")
69
70 cpp_library(
71 name = "rocksdb_lib",
72 srcs = [
73 "cache/clock_cache.cc",
74 "cache/lru_cache.cc",
75 "cache/sharded_cache.cc",
76 "db/builder.cc",
77 "db/c.cc",
78 "db/column_family.cc",
79 "db/compacted_db_impl.cc",
80 "db/compaction.cc",
81 "db/compaction_iterator.cc",
82 "db/compaction_job.cc",
83 "db/compaction_picker.cc",
84 "db/compaction_picker_universal.cc",
85 "db/convenience.cc",
86 "db/db_filesnapshot.cc",
87 "db/db_impl.cc",
88 "db/db_impl_compaction_flush.cc",
89 "db/db_impl_debug.cc",
90 "db/db_impl_experimental.cc",
91 "db/db_impl_files.cc",
92 "db/db_impl_open.cc",
93 "db/db_impl_readonly.cc",
94 "db/db_impl_write.cc",
95 "db/db_info_dumper.cc",
96 "db/db_iter.cc",
97 "db/dbformat.cc",
98 "db/error_handler.cc",
99 "db/event_helpers.cc",
100 "db/experimental.cc",
101 "db/external_sst_file_ingestion_job.cc",
102 "db/file_indexer.cc",
103 "db/flush_job.cc",
104 "db/flush_scheduler.cc",
105 "db/forward_iterator.cc",
106 "db/internal_stats.cc",
107 "db/log_reader.cc",
108 "db/log_writer.cc",
109 "db/logs_with_prep_tracker.cc",
110 "db/malloc_stats.cc",
111 "db/memtable.cc",
112 "db/memtable_list.cc",
113 "db/merge_helper.cc",
114 "db/merge_operator.cc",
115 "db/range_del_aggregator.cc",
116 "db/repair.cc",
117 "db/snapshot_impl.cc",
118 "db/table_cache.cc",
119 "db/table_properties_collector.cc",
120 "db/transaction_log_impl.cc",
121 "db/version_builder.cc",
122 "db/version_edit.cc",
123 "db/version_set.cc",
124 "db/wal_manager.cc",
125 "db/write_batch.cc",
126 "db/write_batch_base.cc",
127 "db/write_controller.cc",
128 "db/write_thread.cc",
129 "env/env.cc",
130 "env/env_chroot.cc",
131 "env/env_encryption.cc",
132 "env/env_hdfs.cc",
133 "env/env_posix.cc",
134 "env/io_posix.cc",
135 "env/mock_env.cc",
136 "memtable/alloc_tracker.cc",
137 "memtable/hash_cuckoo_rep.cc",
138 "memtable/hash_linklist_rep.cc",
139 "memtable/hash_skiplist_rep.cc",
140 "memtable/skiplistrep.cc",
141 "memtable/vectorrep.cc",
142 "memtable/write_buffer_manager.cc",
143 "monitoring/histogram.cc",
144 "monitoring/histogram_windowing.cc",
145 "monitoring/instrumented_mutex.cc",
146 "monitoring/iostats_context.cc",
147 "monitoring/perf_context.cc",
148 "monitoring/perf_level.cc",
149 "monitoring/statistics.cc",
150 "monitoring/thread_status_impl.cc",
151 "monitoring/thread_status_updater.cc",
152 "monitoring/thread_status_updater_debug.cc",
153 "monitoring/thread_status_util.cc",
154 "monitoring/thread_status_util_debug.cc",
155 "options/cf_options.cc",
156 "options/db_options.cc",
157 "options/options.cc",
158 "options/options_helper.cc",
159 "options/options_parser.cc",
160 "options/options_sanity_check.cc",
161 "port/port_posix.cc",
162 "port/stack_trace.cc",
163 "table/adaptive_table_factory.cc",
164 "table/block.cc",
165 "table/block_based_filter_block.cc",
166 "table/block_based_table_builder.cc",
167 "table/block_based_table_factory.cc",
168 "table/block_based_table_reader.cc",
169 "table/block_builder.cc",
170 "table/block_fetcher.cc",
171 "table/block_prefix_index.cc",
172 "table/bloom_block.cc",
173 "table/cuckoo_table_builder.cc",
174 "table/cuckoo_table_factory.cc",
175 "table/cuckoo_table_reader.cc",
176 "table/data_block_footer.cc",
177 "table/data_block_hash_index.cc",
178 "table/flush_block_policy.cc",
179 "table/format.cc",
180 "table/full_filter_block.cc",
181 "table/get_context.cc",
182 "table/index_builder.cc",
183 "table/iterator.cc",
184 "table/merging_iterator.cc",
185 "table/meta_blocks.cc",
186 "table/partitioned_filter_block.cc",
187 "table/persistent_cache_helper.cc",
188 "table/plain_table_builder.cc",
189 "table/plain_table_factory.cc",
190 "table/plain_table_index.cc",
191 "table/plain_table_key_coding.cc",
192 "table/plain_table_reader.cc",
193 "table/sst_file_writer.cc",
194 "table/table_properties.cc",
195 "table/two_level_iterator.cc",
196 "tools/dump/db_dump_tool.cc",
197 "tools/ldb_cmd.cc",
198 "tools/ldb_tool.cc",
199 "tools/sst_dump_tool.cc",
200 "util/arena.cc",
201 "util/auto_roll_logger.cc",
202 "util/bloom.cc",
203 "util/build_version.cc",
204 "util/coding.cc",
205 "util/compaction_job_stats_impl.cc",
206 "util/comparator.cc",
207 "util/compression_context_cache.cc",
208 "util/concurrent_arena.cc",
209 "util/crc32c.cc",
210 "util/delete_scheduler.cc",
211 "util/dynamic_bloom.cc",
212 "util/event_logger.cc",
213 "util/file_reader_writer.cc",
214 "util/file_util.cc",
215 "util/filename.cc",
216 "util/filter_policy.cc",
217 "util/hash.cc",
218 "util/log_buffer.cc",
219 "util/murmurhash.cc",
220 "util/random.cc",
221 "util/rate_limiter.cc",
222 "util/slice.cc",
223 "util/sst_file_manager_impl.cc",
224 "util/status.cc",
225 "util/string_util.cc",
226 "util/sync_point.cc",
227 "util/sync_point_impl.cc",
228 "util/thread_local.cc",
229 "util/threadpool_imp.cc",
230 "util/trace_replay.cc",
231 "util/transaction_test_util.cc",
232 "util/xxhash.cc",
233 "utilities/backupable/backupable_db.cc",
234 "utilities/blob_db/blob_compaction_filter.cc",
235 "utilities/blob_db/blob_db.cc",
236 "utilities/blob_db/blob_db_impl.cc",
237 "utilities/blob_db/blob_db_impl_filesnapshot.cc",
238 "utilities/blob_db/blob_dump_tool.cc",
239 "utilities/blob_db/blob_file.cc",
240 "utilities/blob_db/blob_log_format.cc",
241 "utilities/blob_db/blob_log_reader.cc",
242 "utilities/blob_db/blob_log_writer.cc",
243 "utilities/cassandra/cassandra_compaction_filter.cc",
244 "utilities/cassandra/format.cc",
245 "utilities/cassandra/merge_operator.cc",
246 "utilities/checkpoint/checkpoint_impl.cc",
247 "utilities/compaction_filters/remove_emptyvalue_compactionfilter.cc",
248 "utilities/convenience/info_log_finder.cc",
249 "utilities/date_tiered/date_tiered_db_impl.cc",
250 "utilities/debug.cc",
251 "utilities/document/document_db.cc",
252 "utilities/document/json_document.cc",
253 "utilities/document/json_document_builder.cc",
254 "utilities/env_mirror.cc",
255 "utilities/env_timed.cc",
256 "utilities/geodb/geodb_impl.cc",
257 "utilities/leveldb_options/leveldb_options.cc",
258 "utilities/lua/rocks_lua_compaction_filter.cc",
259 "utilities/memory/memory_util.cc",
260 "utilities/merge_operators/bytesxor.cc",
261 "utilities/merge_operators/max.cc",
262 "utilities/merge_operators/put.cc",
263 "utilities/merge_operators/string_append/stringappend.cc",
264 "utilities/merge_operators/string_append/stringappend2.cc",
265 "utilities/merge_operators/uint64add.cc",
266 "utilities/option_change_migration/option_change_migration.cc",
267 "utilities/options/options_util.cc",
268 "utilities/persistent_cache/block_cache_tier.cc",
269 "utilities/persistent_cache/block_cache_tier_file.cc",
270 "utilities/persistent_cache/block_cache_tier_metadata.cc",
271 "utilities/persistent_cache/persistent_cache_tier.cc",
272 "utilities/persistent_cache/volatile_tier_impl.cc",
273 "utilities/redis/redis_lists.cc",
274 "utilities/simulator_cache/sim_cache.cc",
275 "utilities/spatialdb/spatial_db.cc",
276 "utilities/table_properties_collectors/compact_on_deletion_collector.cc",
277 "utilities/trace/file_trace_reader_writer.cc",
278 "utilities/transactions/optimistic_transaction.cc",
279 "utilities/transactions/optimistic_transaction_db_impl.cc",
280 "utilities/transactions/pessimistic_transaction.cc",
281 "utilities/transactions/pessimistic_transaction_db.cc",
282 "utilities/transactions/snapshot_checker.cc",
283 "utilities/transactions/transaction_base.cc",
284 "utilities/transactions/transaction_db_mutex_impl.cc",
285 "utilities/transactions/transaction_lock_mgr.cc",
286 "utilities/transactions/transaction_util.cc",
287 "utilities/transactions/write_prepared_txn.cc",
288 "utilities/transactions/write_prepared_txn_db.cc",
289 "utilities/transactions/write_unprepared_txn.cc",
290 "utilities/transactions/write_unprepared_txn_db.cc",
291 "utilities/ttl/db_ttl_impl.cc",
292 "utilities/write_batch_with_index/write_batch_with_index.cc",
293 "utilities/write_batch_with_index/write_batch_with_index_internal.cc",
294 ],
295 auto_headers = AutoHeaders.RECURSIVE_GLOB,
296 arch_preprocessor_flags = rocksdb_arch_preprocessor_flags,
297 compiler_flags = rocksdb_compiler_flags,
298 preprocessor_flags = rocksdb_preprocessor_flags,
299 deps = [],
300 external_deps = rocksdb_external_deps,
301 )
302
303 cpp_library(
304 name = "rocksdb_test_lib",
305 srcs = [
306 "db/db_test_util.cc",
307 "table/mock_table.cc",
308 "tools/trace_analyzer_tool.cc",
309 "util/fault_injection_test_env.cc",
310 "util/testharness.cc",
311 "util/testutil.cc",
312 "utilities/cassandra/test_utils.cc",
313 "utilities/col_buf_decoder.cc",
314 "utilities/col_buf_encoder.cc",
315 "utilities/column_aware_encoding_util.cc",
316 ],
317 auto_headers = AutoHeaders.RECURSIVE_GLOB,
318 arch_preprocessor_flags = rocksdb_arch_preprocessor_flags,
319 compiler_flags = rocksdb_compiler_flags,
320 preprocessor_flags = rocksdb_preprocessor_flags,
321 deps = [":rocksdb_lib"],
322 external_deps = rocksdb_external_deps,
323 )
324
325 cpp_library(
326 name = "rocksdb_tools_lib",
327 srcs = [
328 "tools/db_bench_tool.cc",
329 "tools/trace_analyzer_tool.cc",
330 "util/testutil.cc",
331 ],
332 auto_headers = AutoHeaders.RECURSIVE_GLOB,
333 arch_preprocessor_flags = rocksdb_arch_preprocessor_flags,
334 compiler_flags = rocksdb_compiler_flags,
335 preprocessor_flags = rocksdb_preprocessor_flags,
336 deps = [":rocksdb_lib"],
337 external_deps = rocksdb_external_deps,
338 )
339
340 cpp_library(
341 name = "env_basic_test_lib",
342 srcs = ["env/env_basic_test.cc"],
343 auto_headers = AutoHeaders.RECURSIVE_GLOB,
344 arch_preprocessor_flags = rocksdb_arch_preprocessor_flags,
345 compiler_flags = rocksdb_compiler_flags,
346 preprocessor_flags = rocksdb_preprocessor_flags,
347 deps = [":rocksdb_test_lib"],
348 external_deps = rocksdb_external_deps,
349 )
350
351 # [test_name, test_src, test_type]
352 ROCKS_TESTS = [
353 [
354 "arena_test",
355 "util/arena_test.cc",
356 "serial",
357 ],
358 [
359 "auto_roll_logger_test",
360 "util/auto_roll_logger_test.cc",
361 "serial",
362 ],
363 [
364 "autovector_test",
365 "util/autovector_test.cc",
366 "serial",
367 ],
368 [
369 "backupable_db_test",
370 "utilities/backupable/backupable_db_test.cc",
371 "parallel",
372 ],
373 [
374 "blob_db_test",
375 "utilities/blob_db/blob_db_test.cc",
376 "serial",
377 ],
378 [
379 "block_based_filter_block_test",
380 "table/block_based_filter_block_test.cc",
381 "serial",
382 ],
383 [
384 "block_test",
385 "table/block_test.cc",
386 "serial",
387 ],
388 [
389 "bloom_test",
390 "util/bloom_test.cc",
391 "serial",
392 ],
393 [
394 "c_test",
395 "db/c_test.c",
396 "serial",
397 ],
398 [
399 "cache_test",
400 "cache/cache_test.cc",
401 "serial",
402 ],
403 [
404 "cassandra_format_test",
405 "utilities/cassandra/cassandra_format_test.cc",
406 "serial",
407 ],
408 [
409 "cassandra_functional_test",
410 "utilities/cassandra/cassandra_functional_test.cc",
411 "serial",
412 ],
413 [
414 "cassandra_row_merge_test",
415 "utilities/cassandra/cassandra_row_merge_test.cc",
416 "serial",
417 ],
418 [
419 "cassandra_serialize_test",
420 "utilities/cassandra/cassandra_serialize_test.cc",
421 "serial",
422 ],
423 [
424 "checkpoint_test",
425 "utilities/checkpoint/checkpoint_test.cc",
426 "serial",
427 ],
428 [
429 "cleanable_test",
430 "table/cleanable_test.cc",
431 "serial",
432 ],
433 [
434 "coding_test",
435 "util/coding_test.cc",
436 "serial",
437 ],
438 [
439 "column_aware_encoding_test",
440 "utilities/column_aware_encoding_test.cc",
441 "serial",
442 ],
443 [
444 "column_family_test",
445 "db/column_family_test.cc",
446 "serial",
447 ],
448 [
449 "compact_files_test",
450 "db/compact_files_test.cc",
451 "serial",
452 ],
453 [
454 "compact_on_deletion_collector_test",
455 "utilities/table_properties_collectors/compact_on_deletion_collector_test.cc",
456 "serial",
457 ],
458 [
459 "compaction_iterator_test",
460 "db/compaction_iterator_test.cc",
461 "serial",
462 ],
463 [
464 "compaction_job_stats_test",
465 "db/compaction_job_stats_test.cc",
466 "serial",
467 ],
468 [
469 "compaction_job_test",
470 "db/compaction_job_test.cc",
471 "serial",
472 ],
473 [
474 "compaction_picker_test",
475 "db/compaction_picker_test.cc",
476 "serial",
477 ],
478 [
479 "comparator_db_test",
480 "db/comparator_db_test.cc",
481 "serial",
482 ],
483 [
484 "corruption_test",
485 "db/corruption_test.cc",
486 "serial",
487 ],
488 [
489 "crc32c_test",
490 "util/crc32c_test.cc",
491 "serial",
492 ],
493 [
494 "cuckoo_table_builder_test",
495 "table/cuckoo_table_builder_test.cc",
496 "serial",
497 ],
498 [
499 "cuckoo_table_db_test",
500 "db/cuckoo_table_db_test.cc",
501 "serial",
502 ],
503 [
504 "cuckoo_table_reader_test",
505 "table/cuckoo_table_reader_test.cc",
506 "serial",
507 ],
508 [
509 "data_block_hash_index_test",
510 "table/data_block_hash_index_test.cc",
511 "serial",
512 ],
513 [
514 "date_tiered_test",
515 "utilities/date_tiered/date_tiered_test.cc",
516 "serial",
517 ],
518 [
519 "db_basic_test",
520 "db/db_basic_test.cc",
521 "serial",
522 ],
523 [
524 "db_blob_index_test",
525 "db/db_blob_index_test.cc",
526 "serial",
527 ],
528 [
529 "db_block_cache_test",
530 "db/db_block_cache_test.cc",
531 "serial",
532 ],
533 [
534 "db_bloom_filter_test",
535 "db/db_bloom_filter_test.cc",
536 "serial",
537 ],
538 [
539 "db_compaction_filter_test",
540 "db/db_compaction_filter_test.cc",
541 "parallel",
542 ],
543 [
544 "db_compaction_test",
545 "db/db_compaction_test.cc",
546 "parallel",
547 ],
548 [
549 "db_dynamic_level_test",
550 "db/db_dynamic_level_test.cc",
551 "serial",
552 ],
553 [
554 "db_encryption_test",
555 "db/db_encryption_test.cc",
556 "serial",
557 ],
558 [
559 "db_flush_test",
560 "db/db_flush_test.cc",
561 "serial",
562 ],
563 [
564 "db_inplace_update_test",
565 "db/db_inplace_update_test.cc",
566 "serial",
567 ],
568 [
569 "db_io_failure_test",
570 "db/db_io_failure_test.cc",
571 "serial",
572 ],
573 [
574 "db_iter_stress_test",
575 "db/db_iter_stress_test.cc",
576 "serial",
577 ],
578 [
579 "db_iter_test",
580 "db/db_iter_test.cc",
581 "serial",
582 ],
583 [
584 "db_iterator_test",
585 "db/db_iterator_test.cc",
586 "serial",
587 ],
588 [
589 "db_log_iter_test",
590 "db/db_log_iter_test.cc",
591 "serial",
592 ],
593 [
594 "db_memtable_test",
595 "db/db_memtable_test.cc",
596 "serial",
597 ],
598 [
599 "db_merge_operator_test",
600 "db/db_merge_operator_test.cc",
601 "parallel",
602 ],
603 [
604 "db_options_test",
605 "db/db_options_test.cc",
606 "serial",
607 ],
608 [
609 "db_properties_test",
610 "db/db_properties_test.cc",
611 "serial",
612 ],
613 [
614 "db_range_del_test",
615 "db/db_range_del_test.cc",
616 "serial",
617 ],
618 [
619 "db_sst_test",
620 "db/db_sst_test.cc",
621 "parallel",
622 ],
623 [
624 "db_statistics_test",
625 "db/db_statistics_test.cc",
626 "serial",
627 ],
628 [
629 "db_table_properties_test",
630 "db/db_table_properties_test.cc",
631 "serial",
632 ],
633 [
634 "db_tailing_iter_test",
635 "db/db_tailing_iter_test.cc",
636 "serial",
637 ],
638 [
639 "db_test",
640 "db/db_test.cc",
641 "parallel",
642 ],
643 [
644 "db_test2",
645 "db/db_test2.cc",
646 "serial",
647 ],
648 [
649 "db_universal_compaction_test",
650 "db/db_universal_compaction_test.cc",
651 "parallel",
652 ],
653 [
654 "db_wal_test",
655 "db/db_wal_test.cc",
656 "parallel",
657 ],
658 [
659 "db_write_test",
660 "db/db_write_test.cc",
661 "serial",
662 ],
663 [
664 "dbformat_test",
665 "db/dbformat_test.cc",
666 "serial",
667 ],
668 [
669 "delete_scheduler_test",
670 "util/delete_scheduler_test.cc",
671 "serial",
672 ],
673 [
674 "deletefile_test",
675 "db/deletefile_test.cc",
676 "serial",
677 ],
678 [
679 "document_db_test",
680 "utilities/document/document_db_test.cc",
681 "serial",
682 ],
683 [
684 "dynamic_bloom_test",
685 "util/dynamic_bloom_test.cc",
686 "serial",
687 ],
688 [
689 "env_basic_test",
690 "env/env_basic_test.cc",
691 "serial",
692 ],
693 [
694 "env_test",
695 "env/env_test.cc",
696 "serial",
697 ],
698 [
699 "env_timed_test",
700 "utilities/env_timed_test.cc",
701 "serial",
702 ],
703 [
704 "error_handler_test",
705 "db/error_handler_test.cc",
706 "serial",
707 ],
708 [
709 "event_logger_test",
710 "util/event_logger_test.cc",
711 "serial",
712 ],
713 [
714 "external_sst_file_basic_test",
715 "db/external_sst_file_basic_test.cc",
716 "serial",
717 ],
718 [
719 "external_sst_file_test",
720 "db/external_sst_file_test.cc",
721 "parallel",
722 ],
723 [
724 "fault_injection_test",
725 "db/fault_injection_test.cc",
726 "parallel",
727 ],
728 [
729 "file_indexer_test",
730 "db/file_indexer_test.cc",
731 "serial",
732 ],
733 [
734 "file_reader_writer_test",
735 "util/file_reader_writer_test.cc",
736 "serial",
737 ],
738 [
739 "filelock_test",
740 "util/filelock_test.cc",
741 "serial",
742 ],
743 [
744 "filename_test",
745 "db/filename_test.cc",
746 "serial",
747 ],
748 [
749 "flush_job_test",
750 "db/flush_job_test.cc",
751 "serial",
752 ],
753 [
754 "full_filter_block_test",
755 "table/full_filter_block_test.cc",
756 "serial",
757 ],
758 [
759 "geodb_test",
760 "utilities/geodb/geodb_test.cc",
761 "serial",
762 ],
763 [
764 "hash_table_test",
765 "utilities/persistent_cache/hash_table_test.cc",
766 "serial",
767 ],
768 [
769 "hash_test",
770 "util/hash_test.cc",
771 "serial",
772 ],
773 [
774 "heap_test",
775 "util/heap_test.cc",
776 "serial",
777 ],
778 [
779 "histogram_test",
780 "monitoring/histogram_test.cc",
781 "serial",
782 ],
783 [
784 "inlineskiplist_test",
785 "memtable/inlineskiplist_test.cc",
786 "parallel",
787 ],
788 [
789 "iostats_context_test",
790 "monitoring/iostats_context_test.cc",
791 "serial",
792 ],
793 [
794 "json_document_test",
795 "utilities/document/json_document_test.cc",
796 "serial",
797 ],
798 [
799 "ldb_cmd_test",
800 "tools/ldb_cmd_test.cc",
801 "serial",
802 ],
803 [
804 "listener_test",
805 "db/listener_test.cc",
806 "serial",
807 ],
808 [
809 "log_test",
810 "db/log_test.cc",
811 "serial",
812 ],
813 [
814 "lru_cache_test",
815 "cache/lru_cache_test.cc",
816 "serial",
817 ],
818 [
819 "manual_compaction_test",
820 "db/manual_compaction_test.cc",
821 "parallel",
822 ],
823 [
824 "memory_test",
825 "utilities/memory/memory_test.cc",
826 "serial",
827 ],
828 [
829 "memtable_list_test",
830 "db/memtable_list_test.cc",
831 "serial",
832 ],
833 [
834 "merge_helper_test",
835 "db/merge_helper_test.cc",
836 "serial",
837 ],
838 [
839 "merge_test",
840 "db/merge_test.cc",
841 "serial",
842 ],
843 [
844 "merger_test",
845 "table/merger_test.cc",
846 "serial",
847 ],
848 [
849 "mock_env_test",
850 "env/mock_env_test.cc",
851 "serial",
852 ],
853 [
854 "object_registry_test",
855 "utilities/object_registry_test.cc",
856 "serial",
857 ],
858 [
859 "obsolete_files_test",
860 "db/obsolete_files_test.cc",
861 "serial",
862 ],
863 [
864 "optimistic_transaction_test",
865 "utilities/transactions/optimistic_transaction_test.cc",
866 "serial",
867 ],
868 [
869 "option_change_migration_test",
870 "utilities/option_change_migration/option_change_migration_test.cc",
871 "serial",
872 ],
873 [
874 "options_file_test",
875 "db/options_file_test.cc",
876 "serial",
877 ],
878 [
879 "options_settable_test",
880 "options/options_settable_test.cc",
881 "serial",
882 ],
883 [
884 "options_test",
885 "options/options_test.cc",
886 "serial",
887 ],
888 [
889 "options_util_test",
890 "utilities/options/options_util_test.cc",
891 "serial",
892 ],
893 [
894 "partitioned_filter_block_test",
895 "table/partitioned_filter_block_test.cc",
896 "serial",
897 ],
898 [
899 "perf_context_test",
900 "db/perf_context_test.cc",
901 "serial",
902 ],
903 [
904 "persistent_cache_test",
905 "utilities/persistent_cache/persistent_cache_test.cc",
906 "parallel",
907 ],
908 [
909 "plain_table_db_test",
910 "db/plain_table_db_test.cc",
911 "serial",
912 ],
913 [
914 "prefix_test",
915 "db/prefix_test.cc",
916 "serial",
917 ],
918 [
919 "range_del_aggregator_test",
920 "db/range_del_aggregator_test.cc",
921 "serial",
922 ],
923 [
924 "rate_limiter_test",
925 "util/rate_limiter_test.cc",
926 "serial",
927 ],
928 [
929 "reduce_levels_test",
930 "tools/reduce_levels_test.cc",
931 "serial",
932 ],
933 [
934 "repair_test",
935 "db/repair_test.cc",
936 "serial",
937 ],
938 [
939 "repeatable_thread_test",
940 "util/repeatable_thread_test.cc",
941 "serial",
942 ],
943 [
944 "sim_cache_test",
945 "utilities/simulator_cache/sim_cache_test.cc",
946 "serial",
947 ],
948 [
949 "skiplist_test",
950 "memtable/skiplist_test.cc",
951 "serial",
952 ],
953 [
954 "slice_transform_test",
955 "util/slice_transform_test.cc",
956 "serial",
957 ],
958 [
959 "spatial_db_test",
960 "utilities/spatialdb/spatial_db_test.cc",
961 "serial",
962 ],
963 [
964 "sst_dump_test",
965 "tools/sst_dump_test.cc",
966 "serial",
967 ],
968 [
969 "statistics_test",
970 "monitoring/statistics_test.cc",
971 "serial",
972 ],
973 [
974 "stringappend_test",
975 "utilities/merge_operators/string_append/stringappend_test.cc",
976 "serial",
977 ],
978 [
979 "table_properties_collector_test",
980 "db/table_properties_collector_test.cc",
981 "serial",
982 ],
983 [
984 "table_test",
985 "table/table_test.cc",
986 "parallel",
987 ],
988 [
989 "thread_list_test",
990 "util/thread_list_test.cc",
991 "serial",
992 ],
993 [
994 "thread_local_test",
995 "util/thread_local_test.cc",
996 "serial",
997 ],
998 [
999 "timer_queue_test",
1000 "util/timer_queue_test.cc",
1001 "serial",
1002 ],
1003 [
1004 "trace_analyzer_test",
1005 "tools/trace_analyzer_test.cc",
1006 "serial",
1007 ],
1008 [
1009 "transaction_test",
1010 "utilities/transactions/transaction_test.cc",
1011 "parallel",
1012 ],
1013 [
1014 "ttl_test",
1015 "utilities/ttl/ttl_test.cc",
1016 "serial",
1017 ],
1018 [
1019 "util_merge_operators_test",
1020 "utilities/util_merge_operators_test.cc",
1021 "serial",
1022 ],
1023 [
1024 "version_builder_test",
1025 "db/version_builder_test.cc",
1026 "serial",
1027 ],
1028 [
1029 "version_edit_test",
1030 "db/version_edit_test.cc",
1031 "serial",
1032 ],
1033 [
1034 "version_set_test",
1035 "db/version_set_test.cc",
1036 "serial",
1037 ],
1038 [
1039 "wal_manager_test",
1040 "db/wal_manager_test.cc",
1041 "serial",
1042 ],
1043 [
1044 "write_batch_test",
1045 "db/write_batch_test.cc",
1046 "serial",
1047 ],
1048 [
1049 "write_batch_with_index_test",
1050 "utilities/write_batch_with_index/write_batch_with_index_test.cc",
1051 "serial",
1052 ],
1053 [
1054 "write_buffer_manager_test",
1055 "memtable/write_buffer_manager_test.cc",
1056 "serial",
1057 ],
1058 [
1059 "write_callback_test",
1060 "db/write_callback_test.cc",
1061 "serial",
1062 ],
1063 [
1064 "write_controller_test",
1065 "db/write_controller_test.cc",
1066 "serial",
1067 ],
1068 [
1069 "write_prepared_transaction_test",
1070 "utilities/transactions/write_prepared_transaction_test.cc",
1071 "parallel",
1072 ],
1073 [
1074 "write_unprepared_transaction_test",
1075 "utilities/transactions/write_unprepared_transaction_test.cc",
1076 "parallel",
1077 ],
1078 ]
1079
1080 # Generate a test rule for each entry in ROCKS_TESTS
1081 # Do not build the tests in opt mode, since SyncPoint and other test code
1082 # will not be included.
1083 if not is_opt_mode:
1084 for test_cfg in ROCKS_TESTS:
1085 test_name = test_cfg[0]
1086 test_cc = test_cfg[1]
1087 ttype = "gtest" if test_cfg[2] == "parallel" else "simple"
1088 test_bin = test_name + "_bin"
1089
1090 cpp_binary(
1091 name = test_bin,
1092 srcs = [test_cc],
1093 arch_preprocessor_flags = rocksdb_arch_preprocessor_flags,
1094 compiler_flags = rocksdb_compiler_flags,
1095 preprocessor_flags = rocksdb_preprocessor_flags,
1096 deps = [":rocksdb_test_lib"],
1097 external_deps = rocksdb_external_deps,
1098 )
1099
1100 custom_unittest(
1101 name = test_name,
1102 command = [TEST_RUNNER, BUCK_BINS + test_bin],
1103 type = ttype,
1104 deps = [":" + test_bin],
1105 )