diff options
-rw-r--r-- | site_scons/libdeps_next.py | 2 | ||||
-rw-r--r-- | src/mongo/client/SConscript | 86 | ||||
-rw-r--r-- | src/mongo/db/SConscript | 267 | ||||
-rw-r--r-- | src/mongo/db/catalog/SConscript | 140 | ||||
-rw-r--r-- | src/mongo/db/exec/sbe/SConscript | 9 | ||||
-rw-r--r-- | src/mongo/db/repl/SConscript | 361 | ||||
-rw-r--r-- | src/mongo/db/storage/SConscript | 16 | ||||
-rw-r--r-- | src/mongo/db/storage/wiredtiger/SConscript | 384 | ||||
-rw-r--r-- | src/mongo/dbtests/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/embedded/SConscript | 1 | ||||
-rw-r--r-- | src/mongo/rpc/SConscript | 53 | ||||
-rw-r--r-- | src/mongo/util/SConscript | 5 |
12 files changed, 659 insertions, 666 deletions
diff --git a/site_scons/libdeps_next.py b/site_scons/libdeps_next.py index 33b8ec502c2..847836e60d8 100644 --- a/site_scons/libdeps_next.py +++ b/site_scons/libdeps_next.py @@ -550,7 +550,7 @@ class LibdepLinter: if self._check_for_lint_tags('lint-allow-nonprivate-on-deps-dependents'): return - if (libdep.dependency_type != deptype.Private + if (libdep.dependency_type != deptype.Private and libdep.dependency_type != deptype.Global and len(self._get_deps_dependents()) > 0): target_type = self.target[0].builder.get_name(self.env) diff --git a/src/mongo/client/SConscript b/src/mongo/client/SConscript index 3491d78d05a..e6176fc576c 100644 --- a/src/mongo/client/SConscript +++ b/src/mongo/client/SConscript @@ -2,6 +2,7 @@ Import('env') Import("get_option") +Import('wiredtiger') env = env.Clone() @@ -339,48 +340,49 @@ env.Library( ], ) -env.CppUnitTest( - target='client_test', - source=[ - 'authenticate_test.cpp', - 'connection_string_test.cpp', - 'dbclient_cursor_test.cpp', - 'fetcher_test.cpp', - 'index_spec_test.cpp', - 'mongo_uri_test.cpp', - 'read_preference_test.cpp', - 'remote_command_retry_scheduler_test.cpp', - 'replica_set_monitor_server_parameters_test.cpp', - 'server_discovery_monitor_expedited_test.cpp', - 'server_discovery_monitor_test.cpp', - 'server_ping_monitor_test.cpp', - 'streamable_replica_set_monitor_error_handler_test.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/client/sdam/sdam', - '$BUILD_DIR/mongo/client/sdam/sdam_test', - '$BUILD_DIR/mongo/db/auth/authmocks', - '$BUILD_DIR/mongo/db/service_context_test_fixture', - '$BUILD_DIR/mongo/db/write_concern_options', - '$BUILD_DIR/mongo/dbtests/mocklib', - '$BUILD_DIR/mongo/executor/network_interface_mock', - '$BUILD_DIR/mongo/executor/task_executor_test_fixture', - '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture', - '$BUILD_DIR/mongo/rpc/command_status', - '$BUILD_DIR/mongo/transport/transport_layer_egress_init', - '$BUILD_DIR/mongo/unittest/task_executor_proxy', - '$BUILD_DIR/mongo/util/md5', - '$BUILD_DIR/mongo/util/net/network', - 'authentication', - 'clientdriver_minimal', - 'clientdriver_network', - 'connection_string', - 'fetcher', - 'read_preference', - 'remote_command_retry_scheduler', - 'replica_set_monitor_protocol_test_util', - ], -) +if wiredtiger: + env.CppUnitTest( + target='client_test', + source=[ + 'authenticate_test.cpp', + 'connection_string_test.cpp', + 'dbclient_cursor_test.cpp', + 'fetcher_test.cpp', + 'index_spec_test.cpp', + 'mongo_uri_test.cpp', + 'read_preference_test.cpp', + 'remote_command_retry_scheduler_test.cpp', + 'replica_set_monitor_server_parameters_test.cpp', + 'server_discovery_monitor_expedited_test.cpp', + 'server_discovery_monitor_test.cpp', + 'server_ping_monitor_test.cpp', + 'streamable_replica_set_monitor_error_handler_test.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/client/sdam/sdam', + '$BUILD_DIR/mongo/client/sdam/sdam_test', + '$BUILD_DIR/mongo/db/auth/authmocks', + '$BUILD_DIR/mongo/db/service_context_test_fixture', + '$BUILD_DIR/mongo/db/write_concern_options', + '$BUILD_DIR/mongo/dbtests/mocklib', + '$BUILD_DIR/mongo/executor/network_interface_mock', + '$BUILD_DIR/mongo/executor/task_executor_test_fixture', + '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture', + '$BUILD_DIR/mongo/rpc/command_status', + '$BUILD_DIR/mongo/transport/transport_layer_egress_init', + '$BUILD_DIR/mongo/unittest/task_executor_proxy', + '$BUILD_DIR/mongo/util/md5', + '$BUILD_DIR/mongo/util/net/network', + 'authentication', + 'clientdriver_minimal', + 'clientdriver_network', + 'connection_string', + 'fetcher', + 'read_preference', + 'remote_command_retry_scheduler', + 'replica_set_monitor_protocol_test_util', + ], + ) env.CppIntegrationTest( target='replica_set_monitor_integration_test', diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript index 23a53b5b336..d2c4e1bda40 100644 --- a/src/mongo/db/SConscript +++ b/src/mongo/db/SConscript @@ -2093,6 +2093,7 @@ env.Library( 'stats/top', 'storage/backup_cursor_hooks', 'storage/devnull/storage_devnull', + 'storage/encryption_hooks', 'storage/ephemeral_for_test/storage_ephemeral_for_test', 'storage/flow_control', 'storage/flow_control_parameters', @@ -2101,7 +2102,6 @@ env.Library( 'storage/storage_engine_metadata', 'storage/storage_init_d', 'storage/storage_options', - 'storage/wiredtiger/storage_wiredtiger' if wiredtiger else [], 'system_index', 'traffic_recorder', 'ttl_collection_cache', @@ -2264,138 +2264,139 @@ env.Library( envWithAsio = env.Clone() envWithAsio.InjectThirdParty(libraries=['asio']) -envWithAsio.CppUnitTest( - target='db_unittest_test', - source=[ - 'catalog_raii_test.cpp', - 'client_strand_test.cpp', - 'collection_index_usage_tracker_test.cpp', - 'commands_test.cpp', - 'curop_test.cpp', - 'dbdirectclient_test.cpp', - 'dbmessage_test.cpp', - 'db_raii_test.cpp', - 'field_parser_test.cpp', - 'field_ref_set_test.cpp', - 'field_ref_test.cpp', - 'hasher_test.cpp', - 'index_build_entry_helpers_test.cpp', - 'index_builds_coordinator_mongod_test.cpp', - 'keypattern_test.cpp', - 'keys_collection_document_test.cpp', - 'logical_session_cache_test.cpp', - 'logical_session_id_test.cpp', - 'logical_time_test.cpp', - 'mirroring_sampler_test.cpp', - 'multi_key_path_tracker_test.cpp', - 'namespace_string_test.cpp', - 'op_msg_fuzzer_fixture_test.cpp', - 'op_observer_impl_test.cpp', - 'op_observer_registry_test.cpp', - 'operation_context_test.cpp', - 'operation_cpu_timer_test.cpp', - 'operation_time_tracker_test.cpp', - 'persistent_task_store_test.cpp', - 'range_arithmetic_test.cpp', - 'read_write_concern_defaults_test.cpp', - 'read_write_concern_provenance_test.cpp', - 'record_id_test.cpp', - 'server_options_test.cpp', - 'session_catalog_mongod_test.cpp', - 'session_catalog_test.cpp', - 'startup_warnings_mongod_test.cpp', - 'thread_client_test.cpp', - 'time_proof_service_test.cpp', - 'transaction_history_iterator_test.cpp', - 'transaction_participant_retryable_writes_test.cpp', - 'transaction_participant_test.cpp', - 'update_index_data_test.cpp', - 'vector_clock_mongod_test.cpp', - 'vector_clock_test.cpp', - 'write_concern_options_test.cpp', - 'error_labels_test.cpp', - 'commands_test_example.idl', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/bson/util/bson_extract', - '$BUILD_DIR/mongo/client/read_preference', - '$BUILD_DIR/mongo/db/auth/auth', - '$BUILD_DIR/mongo/db/catalog/catalog_test_fixture', - '$BUILD_DIR/mongo/db/catalog/import_collection_oplog_entry', - '$BUILD_DIR/mongo/db/catalog/index_build_entry_idl', - '$BUILD_DIR/mongo/db/mongohasher', - '$BUILD_DIR/mongo/db/op_msg_fuzzer_fixture', - '$BUILD_DIR/mongo/db/query/query_test_service_context', - '$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger', - '$BUILD_DIR/mongo/executor/async_timer_mock', - '$BUILD_DIR/mongo/idl/idl_parser', - '$BUILD_DIR/mongo/idl/server_parameter', - '$BUILD_DIR/mongo/rpc/command_status', - '$BUILD_DIR/mongo/rpc/rpc', - '$BUILD_DIR/mongo/transport/transport_layer_mock', - '$BUILD_DIR/mongo/util/clock_source_mock', - '$BUILD_DIR/mongo/util/net/network', - '$BUILD_DIR/mongo/util/net/ssl_options_server', - 'auth/authmocks', - 'catalog/database_holder', - 'catalog_raii', - 'collection_index_usage_tracker', - 'commands', - 'common', - 'curop', - 'dbdirectclient', - 'dbmessage', - 'fcv_op_observer', - 'index_build_entry_helpers', - 'index_builds_coordinator_mongod', - 'keys_collection_client_direct', - 'keys_collection_document', - 'logical_session_cache', - 'logical_session_cache_impl', - 'logical_session_id', - 'logical_session_id_helpers', - 'logical_time', - 'mirror_maestro', - 'namespace_string', - 'op_observer', - 'op_observer_impl', - 'query_exec', - 'range_arithmetic', - 'read_write_concern_defaults_mock', - 'repl/mock_repl_coord_server_fixture', - 'repl/oplog_interface_local', - 'repl/repl_coordinator_interface', - 'repl/replica_set_aware_service', - 'repl/replmocks', - 'repl/storage_interface_impl', - 'rw_concern_d', - 's/shard_server_test_fixture', - 'server_options_core', - 'server_options_servers', - 'service_context', - 'service_context_d', - 'service_context_d_test_fixture', - 'service_context_devnull_test_fixture', - 'service_context_test_fixture', - 'service_liaison_mock', - 'session_catalog', - 'sessions_collection', - 'sessions_collection_mock', - 'signed_logical_time', - 'snapshot_window_options', - 'startup_warnings_mongod', - 'stats/fill_locker_info', - 'stats/transaction_stats', - 'time_proof_service', - 'transaction', - 'update_index_data', - 'vector_clock', - 'vector_clock_test_fixture', - 'write_concern_options', - 'write_ops', - ], -) +if wiredtiger: + envWithAsio.CppUnitTest( + target='db_unittest_test', + source=[ + 'catalog_raii_test.cpp', + 'client_strand_test.cpp', + 'collection_index_usage_tracker_test.cpp', + 'commands_test.cpp', + 'curop_test.cpp', + 'dbdirectclient_test.cpp', + 'dbmessage_test.cpp', + 'db_raii_test.cpp', + 'field_parser_test.cpp', + 'field_ref_set_test.cpp', + 'field_ref_test.cpp', + 'hasher_test.cpp', + 'index_build_entry_helpers_test.cpp', + 'index_builds_coordinator_mongod_test.cpp', + 'keypattern_test.cpp', + 'keys_collection_document_test.cpp', + 'logical_session_cache_test.cpp', + 'logical_session_id_test.cpp', + 'logical_time_test.cpp', + 'mirroring_sampler_test.cpp', + 'multi_key_path_tracker_test.cpp', + 'namespace_string_test.cpp', + 'op_msg_fuzzer_fixture_test.cpp', + 'op_observer_impl_test.cpp', + 'op_observer_registry_test.cpp', + 'operation_context_test.cpp', + 'operation_cpu_timer_test.cpp', + 'operation_time_tracker_test.cpp', + 'persistent_task_store_test.cpp', + 'range_arithmetic_test.cpp', + 'read_write_concern_defaults_test.cpp', + 'read_write_concern_provenance_test.cpp', + 'record_id_test.cpp', + 'server_options_test.cpp', + 'session_catalog_mongod_test.cpp', + 'session_catalog_test.cpp', + 'startup_warnings_mongod_test.cpp', + 'thread_client_test.cpp', + 'time_proof_service_test.cpp', + 'transaction_history_iterator_test.cpp', + 'transaction_participant_retryable_writes_test.cpp', + 'transaction_participant_test.cpp', + 'update_index_data_test.cpp', + 'vector_clock_mongod_test.cpp', + 'vector_clock_test.cpp', + 'write_concern_options_test.cpp', + 'error_labels_test.cpp', + 'commands_test_example.idl', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/base', + '$BUILD_DIR/mongo/bson/util/bson_extract', + '$BUILD_DIR/mongo/client/read_preference', + '$BUILD_DIR/mongo/db/auth/auth', + '$BUILD_DIR/mongo/db/catalog/catalog_test_fixture', + '$BUILD_DIR/mongo/db/catalog/import_collection_oplog_entry', + '$BUILD_DIR/mongo/db/catalog/index_build_entry_idl', + '$BUILD_DIR/mongo/db/mongohasher', + '$BUILD_DIR/mongo/db/op_msg_fuzzer_fixture', + '$BUILD_DIR/mongo/db/query/query_test_service_context', + '$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger', + '$BUILD_DIR/mongo/executor/async_timer_mock', + '$BUILD_DIR/mongo/idl/idl_parser', + '$BUILD_DIR/mongo/idl/server_parameter', + '$BUILD_DIR/mongo/rpc/command_status', + '$BUILD_DIR/mongo/rpc/rpc', + '$BUILD_DIR/mongo/transport/transport_layer_mock', + '$BUILD_DIR/mongo/util/clock_source_mock', + '$BUILD_DIR/mongo/util/net/network', + '$BUILD_DIR/mongo/util/net/ssl_options_server', + 'auth/authmocks', + 'catalog/database_holder', + 'catalog_raii', + 'collection_index_usage_tracker', + 'commands', + 'common', + 'curop', + 'dbdirectclient', + 'dbmessage', + 'fcv_op_observer', + 'index_build_entry_helpers', + 'index_builds_coordinator_mongod', + 'keys_collection_client_direct', + 'keys_collection_document', + 'logical_session_cache', + 'logical_session_cache_impl', + 'logical_session_id', + 'logical_session_id_helpers', + 'logical_time', + 'mirror_maestro', + 'namespace_string', + 'op_observer', + 'op_observer_impl', + 'query_exec', + 'range_arithmetic', + 'read_write_concern_defaults_mock', + 'repl/mock_repl_coord_server_fixture', + 'repl/oplog_interface_local', + 'repl/repl_coordinator_interface', + 'repl/replica_set_aware_service', + 'repl/replmocks', + 'repl/storage_interface_impl', + 'rw_concern_d', + 's/shard_server_test_fixture', + 'server_options_core', + 'server_options_servers', + 'service_context', + 'service_context_d', + 'service_context_d_test_fixture', + 'service_context_devnull_test_fixture', + 'service_context_test_fixture', + 'service_liaison_mock', + 'session_catalog', + 'sessions_collection', + 'sessions_collection_mock', + 'signed_logical_time', + 'snapshot_window_options', + 'startup_warnings_mongod', + 'stats/fill_locker_info', + 'stats/transaction_stats', + 'time_proof_service', + 'transaction', + 'update_index_data', + 'vector_clock', + 'vector_clock_test_fixture', + 'write_concern_options', + 'write_ops', + ], + ) # These unit tests rely on the config_server_test_fixture, which # globally alters the state of the system to be in config server diff --git a/src/mongo/db/catalog/SConscript b/src/mongo/db/catalog/SConscript index a400607ae70..962b274060a 100644 --- a/src/mongo/db/catalog/SConscript +++ b/src/mongo/db/catalog/SConscript @@ -1,6 +1,7 @@ # -*- mode: python; -*- Import("env") +Import('wiredtiger') env = env.Clone() @@ -510,72 +511,73 @@ env.Library( ], ) -env.CppUnitTest( - target='db_catalog_test', - source=[ - 'capped_utils_test.cpp', - 'catalog_control_test.cpp', - 'collection_catalog_test.cpp', - 'collection_options_test.cpp', - 'collection_test.cpp', - 'collection_validation_test.cpp', - 'collection_writer_test.cpp', - 'commit_quorum_options_test.cpp', - 'create_collection_test.cpp', - 'database_test.cpp', - 'drop_database_test.cpp', - 'index_build_entry_test.cpp', - 'index_builds_manager_test.cpp', - 'index_key_validate_test.cpp', - 'index_signature_test.cpp', - 'index_spec_validate_test.cpp', - 'multi_index_block_test.cpp', - 'rename_collection_test.cpp', - 'throttle_cursor_test.cpp', - 'validate_state_test.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/db/auth/authmocks', - '$BUILD_DIR/mongo/db/commands/test_commands_enabled', - '$BUILD_DIR/mongo/db/concurrency/lock_manager', - '$BUILD_DIR/mongo/db/db_raii', - '$BUILD_DIR/mongo/db/index_builds_coordinator_mongod', - '$BUILD_DIR/mongo/db/matcher/expressions', - '$BUILD_DIR/mongo/db/namespace_string', - '$BUILD_DIR/mongo/db/op_observer', - '$BUILD_DIR/mongo/db/op_observer_impl', - '$BUILD_DIR/mongo/db/query/datetime/date_time_support', - '$BUILD_DIR/mongo/db/query/query_test_service_context', - '$BUILD_DIR/mongo/db/repl/drop_pending_collection_reaper', - '$BUILD_DIR/mongo/db/repl/oplog', - '$BUILD_DIR/mongo/db/repl/optime', - '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', - '$BUILD_DIR/mongo/db/repl/replmocks', - '$BUILD_DIR/mongo/db/repl/storage_interface_impl', - '$BUILD_DIR/mongo/db/service_context', - '$BUILD_DIR/mongo/db/service_context_d_test_fixture', - '$BUILD_DIR/mongo/db/service_context_test_fixture', - '$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger', - '$BUILD_DIR/mongo/unittest/unittest', - '$BUILD_DIR/mongo/util/clock_source_mock', - '$BUILD_DIR/mongo/util/fail_point', - 'catalog_control', - 'catalog_helpers', - 'catalog_test_fixture', - 'collection', - 'collection_catalog', - 'collection_catalog_helper', - 'collection_options', - 'collection_validation', - 'commit_quorum_options', - 'database_holder', - 'index_build_block', - 'index_build_entry_idl', - 'index_builds_manager', - 'index_key_validate', - 'multi_index_block', - 'throttle_cursor', - 'validate_idl', - 'validate_state', - ], -) +if wiredtiger: + env.CppUnitTest( + target='db_catalog_test', + source=[ + 'capped_utils_test.cpp', + 'catalog_control_test.cpp', + 'collection_catalog_test.cpp', + 'collection_options_test.cpp', + 'collection_test.cpp', + 'collection_validation_test.cpp', + 'collection_writer_test.cpp', + 'commit_quorum_options_test.cpp', + 'create_collection_test.cpp', + 'database_test.cpp', + 'drop_database_test.cpp', + 'index_build_entry_test.cpp', + 'index_builds_manager_test.cpp', + 'index_key_validate_test.cpp', + 'index_signature_test.cpp', + 'index_spec_validate_test.cpp', + 'multi_index_block_test.cpp', + 'rename_collection_test.cpp', + 'throttle_cursor_test.cpp', + 'validate_state_test.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/auth/authmocks', + '$BUILD_DIR/mongo/db/commands/test_commands_enabled', + '$BUILD_DIR/mongo/db/concurrency/lock_manager', + '$BUILD_DIR/mongo/db/db_raii', + '$BUILD_DIR/mongo/db/index_builds_coordinator_mongod', + '$BUILD_DIR/mongo/db/matcher/expressions', + '$BUILD_DIR/mongo/db/namespace_string', + '$BUILD_DIR/mongo/db/op_observer', + '$BUILD_DIR/mongo/db/op_observer_impl', + '$BUILD_DIR/mongo/db/query/datetime/date_time_support', + '$BUILD_DIR/mongo/db/query/query_test_service_context', + '$BUILD_DIR/mongo/db/repl/drop_pending_collection_reaper', + '$BUILD_DIR/mongo/db/repl/oplog', + '$BUILD_DIR/mongo/db/repl/optime', + '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', + '$BUILD_DIR/mongo/db/repl/replmocks', + '$BUILD_DIR/mongo/db/repl/storage_interface_impl', + '$BUILD_DIR/mongo/db/service_context', + '$BUILD_DIR/mongo/db/service_context_d_test_fixture', + '$BUILD_DIR/mongo/db/service_context_test_fixture', + '$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger', + '$BUILD_DIR/mongo/unittest/unittest', + '$BUILD_DIR/mongo/util/clock_source_mock', + '$BUILD_DIR/mongo/util/fail_point', + 'catalog_control', + 'catalog_helpers', + 'catalog_test_fixture', + 'collection', + 'collection_catalog', + 'collection_catalog_helper', + 'collection_options', + 'collection_validation', + 'commit_quorum_options', + 'database_holder', + 'index_build_block', + 'index_build_entry_idl', + 'index_builds_manager', + 'index_key_validate', + 'multi_index_block', + 'throttle_cursor', + 'validate_idl', + 'validate_state', + ], + ) diff --git a/src/mongo/db/exec/sbe/SConscript b/src/mongo/db/exec/sbe/SConscript index 6a8226789a7..18d2c7819eb 100644 --- a/src/mongo/db/exec/sbe/SConscript +++ b/src/mongo/db/exec/sbe/SConscript @@ -104,13 +104,16 @@ env.Library( target='sbe_plan_stage_test', source=[ 'sbe_plan_stage_test.cpp', - ], + ], LIBDEPS=[ '$BUILD_DIR/mongo/db/query/sbe_stage_builder_helpers', '$BUILD_DIR/mongo/unittest/unittest', 'query_sbe', - ] - ) + ], + LIBDEPS_TYPEINFO=[ + '$BUILD_DIR/mongo/db/service_context_test_fixture' + ], +) env.CppUnitTest( target='db_sbe_test', diff --git a/src/mongo/db/repl/SConscript b/src/mongo/db/repl/SConscript index 07e99bfd554..bae691f94ef 100644 --- a/src/mongo/db/repl/SConscript +++ b/src/mongo/db/repl/SConscript @@ -1,6 +1,7 @@ # -*- mode: python -*- Import("env") +Import("wiredtiger") env = env.Clone() @@ -596,37 +597,6 @@ env.Library( ) env.Library( - target='idempotency_test_fixture', - source=[ - 'idempotency_test_fixture.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/db/auth/authmocks', - '$BUILD_DIR/mongo/db/catalog/collection_validation', - '$BUILD_DIR/mongo/db/index_builds_coordinator_interface', - 'oplog_applier_impl_test_fixture', - 'oplog_entry_test_helpers', - ], -) - -env.Library( - target='oplog_applier_impl_test_fixture', - source=[ - 'oplog_applier_impl_test_fixture.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/db/catalog/database_holder', - '$BUILD_DIR/mongo/db/catalog/document_validation', - '$BUILD_DIR/mongo/db/service_context_d_test_fixture', - '$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger', - 'drop_pending_collection_reaper', - 'oplog_application', - 'replmocks', - 'storage_interface_impl', - ], -) - -env.Library( target='idempotency_test_util', source=[ 'idempotency_document_structure.cpp', @@ -1455,142 +1425,187 @@ env.Library( ] ) -env.CppUnitTest( - target='db_repl_test', - source=[ - 'abstract_async_component_test.cpp', - 'apply_ops_test.cpp', - 'check_quorum_for_config_change_test.cpp', - 'drop_pending_collection_reaper_test.cpp', - 'idempotency_document_structure_test.cpp', - 'idempotency_update_sequence_test.cpp', - 'initial_syncer_test.cpp', - 'isself_test.cpp', - 'member_config_test.cpp', - 'multiapplier_test.cpp', - 'oplog_applier_impl_test.cpp', - 'oplog_applier_test.cpp', - 'oplog_batcher_test_fixture.cpp', - 'oplog_buffer_collection_test.cpp', - 'oplog_buffer_proxy_test.cpp', - 'oplog_entry_test.cpp', - 'oplog_fetcher_mock.cpp', - 'oplog_fetcher_test.cpp', - 'oplog_test.cpp', - 'optime_extract_test.cpp', - 'primary_only_service_test.cpp', - 'read_concern_args_test.cpp', - 'repl_set_config_checks_test.cpp', - 'repl_set_config_test.cpp', - 'repl_set_heartbeat_response_test.cpp', - 'repl_set_tag_test.cpp', - 'repl_set_write_concern_mode_definitions_test.cpp', - 'replication_consistency_markers_impl_test.cpp', - 'replication_process_test.cpp', - 'replication_recovery_test.cpp', - 'reporter_test.cpp', - 'roll_back_local_operations_test.cpp', - 'rollback_checker_test.cpp', - 'rollback_impl_test.cpp', - 'rs_rollback_test.cpp', - 'scatter_gather_test.cpp', - 'speculative_majority_read_info_test.cpp', - 'split_horizon_test.cpp', - 'storage_interface_impl_test.cpp', - 'sync_source_resolver_test.cpp', - 'task_runner_test.cpp', - 'task_runner_test_fixture.cpp', - 'tenant_oplog_applier_test.cpp', - 'tenant_oplog_batcher_test.cpp', - 'vote_requester_test.cpp', - 'wait_for_majority_service_test.cpp', - 'tenant_migration_recipient_access_blocker_test.cpp', - 'tenant_migration_recipient_entry_helpers_test.cpp', - 'tenant_migration_recipient_service_test.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/bson/mutable/mutable_bson', - '$BUILD_DIR/mongo/client/replica_set_monitor_protocol_test_util', - '$BUILD_DIR/mongo/db/auth/authmocks', - '$BUILD_DIR/mongo/db/auth/authorization_manager_global', - '$BUILD_DIR/mongo/db/catalog_raii', - '$BUILD_DIR/mongo/db/commands/feature_compatibility_parsers', - '$BUILD_DIR/mongo/db/commands/mongod_fcv', - '$BUILD_DIR/mongo/db/commands/txn_cmd_request', - '$BUILD_DIR/mongo/db/dbdirectclient', - '$BUILD_DIR/mongo/db/index/index_access_methods', - '$BUILD_DIR/mongo/db/index_builds_coordinator_mongod', - '$BUILD_DIR/mongo/db/logical_session_id_helpers', - '$BUILD_DIR/mongo/db/logical_time', - '$BUILD_DIR/mongo/db/op_observer', - '$BUILD_DIR/mongo/db/query/command_request_response', - '$BUILD_DIR/mongo/db/service_context_d', - '$BUILD_DIR/mongo/db/service_context_d_test_fixture', - '$BUILD_DIR/mongo/db/service_context_test_fixture', - '$BUILD_DIR/mongo/db/stats/counters', - '$BUILD_DIR/mongo/db/storage/ephemeral_for_test/storage_ephemeral_for_test_core', - '$BUILD_DIR/mongo/db/transaction', - '$BUILD_DIR/mongo/db/update/update_test_helpers', - '$BUILD_DIR/mongo/dbtests/mocklib', - '$BUILD_DIR/mongo/executor/network_interface_factory', - '$BUILD_DIR/mongo/executor/network_interface_mock', - '$BUILD_DIR/mongo/executor/network_interface_thread_pool', - '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture', - '$BUILD_DIR/mongo/rpc/command_status', - '$BUILD_DIR/mongo/transport/transport_layer_mock', - '$BUILD_DIR/mongo/unittest/task_executor_proxy', - '$BUILD_DIR/mongo/unittest/unittest', - '$BUILD_DIR/mongo/util/clock_source_mock', - '$BUILD_DIR/mongo/util/concurrency/thread_pool', - 'abstract_async_component', - 'data_replicator_external_state_mock', - 'drop_pending_collection_reaper', - 'idempotency_test_fixture', - 'idempotency_test_util', - 'initial_syncer', - 'isself', - 'multiapplier', - 'oplog', - 'oplog_application_interface', - 'oplog_applier_impl_test_fixture', - 'oplog_buffer_collection', - 'oplog_buffer_proxy', - 'oplog_entry', - 'oplog_entry_test_helpers', - 'oplog_fetcher', - 'oplog_interface_local', - 'oplog_interface_mock', - 'oplog_interface_remote', - 'optime', - 'primary_only_service', - 'repl_coordinator_impl', - 'repl_server_parameters', - 'replica_set_messages', - 'replication_consistency_markers_impl', - 'replication_process', - 'replication_recovery', - 'replmocks', - 'reporter', - 'roll_back_local_operations', - 'rollback_checker', - 'rollback_impl', - 'rollback_test_fixture', - 'rs_rollback', - 'scatter_gather', - 'speculative_majority_read_info', - 'split_horizon', - 'storage_interface_impl', - 'sync_source_resolver', - 'sync_source_selector_mock', - 'task_executor_mock', - 'task_runner', - 'tenant_migration_recipient_service', - 'tenant_migration_utils', - 'tenant_oplog_processing', - 'wait_for_majority_service', - ], -) +if wiredtiger: + + env.Library( + target='oplog_applier_impl_test_fixture', + source=[ + 'oplog_applier_impl_test_fixture.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/catalog/database_holder', + '$BUILD_DIR/mongo/db/catalog/document_validation', + '$BUILD_DIR/mongo/db/service_context_d_test_fixture', + '$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger', + 'drop_pending_collection_reaper', + 'oplog_application', + 'replmocks', + 'storage_interface_impl', + ], + ) + + env.Library( + target='idempotency_test_fixture', + source=[ + 'idempotency_test_fixture.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/auth/authmocks', + '$BUILD_DIR/mongo/db/catalog/collection_validation', + '$BUILD_DIR/mongo/db/index_builds_coordinator_interface', + 'oplog_applier_impl_test_fixture', + 'oplog_entry_test_helpers', + ], + ) + + env.CppUnitTest( + target='db_repl_idempotency_test', + source=[ + 'idempotency_test.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/update/update_test_helpers', + 'idempotency_test_fixture', + 'idempotency_test_util', + ], + ) + + env.CppUnitTest( + target='db_repl_test', + source=[ + 'abstract_async_component_test.cpp', + 'apply_ops_test.cpp', + 'check_quorum_for_config_change_test.cpp', + 'drop_pending_collection_reaper_test.cpp', + 'idempotency_document_structure_test.cpp', + 'idempotency_update_sequence_test.cpp', + 'initial_syncer_test.cpp', + 'isself_test.cpp', + 'member_config_test.cpp', + 'multiapplier_test.cpp', + 'oplog_applier_impl_test.cpp', + 'oplog_applier_test.cpp', + 'oplog_batcher_test_fixture.cpp', + 'oplog_buffer_collection_test.cpp', + 'oplog_buffer_proxy_test.cpp', + 'oplog_entry_test.cpp', + 'oplog_fetcher_mock.cpp', + 'oplog_fetcher_test.cpp', + 'oplog_test.cpp', + 'optime_extract_test.cpp', + 'primary_only_service_test.cpp', + 'read_concern_args_test.cpp', + 'repl_set_config_checks_test.cpp', + 'repl_set_config_test.cpp', + 'repl_set_heartbeat_response_test.cpp', + 'repl_set_tag_test.cpp', + 'repl_set_write_concern_mode_definitions_test.cpp', + 'replication_consistency_markers_impl_test.cpp', + 'replication_process_test.cpp', + 'replication_recovery_test.cpp', + 'reporter_test.cpp', + 'roll_back_local_operations_test.cpp', + 'rollback_checker_test.cpp', + 'rollback_impl_test.cpp', + 'rs_rollback_test.cpp', + 'scatter_gather_test.cpp', + 'speculative_majority_read_info_test.cpp', + 'split_horizon_test.cpp', + 'storage_interface_impl_test.cpp', + 'sync_source_resolver_test.cpp', + 'task_runner_test.cpp', + 'task_runner_test_fixture.cpp', + 'tenant_oplog_applier_test.cpp', + 'tenant_oplog_batcher_test.cpp', + 'vote_requester_test.cpp', + 'wait_for_majority_service_test.cpp', + 'tenant_migration_recipient_access_blocker_test.cpp', + 'tenant_migration_recipient_entry_helpers_test.cpp', + 'tenant_migration_recipient_service_test.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/base', + '$BUILD_DIR/mongo/bson/mutable/mutable_bson', + '$BUILD_DIR/mongo/client/replica_set_monitor_protocol_test_util', + '$BUILD_DIR/mongo/db/auth/authmocks', + '$BUILD_DIR/mongo/db/auth/authorization_manager_global', + '$BUILD_DIR/mongo/db/catalog_raii', + '$BUILD_DIR/mongo/db/commands/feature_compatibility_parsers', + '$BUILD_DIR/mongo/db/commands/mongod_fcv', + '$BUILD_DIR/mongo/db/commands/txn_cmd_request', + '$BUILD_DIR/mongo/db/dbdirectclient', + '$BUILD_DIR/mongo/db/index/index_access_methods', + '$BUILD_DIR/mongo/db/index_builds_coordinator_mongod', + '$BUILD_DIR/mongo/db/logical_session_id_helpers', + '$BUILD_DIR/mongo/db/logical_time', + '$BUILD_DIR/mongo/db/op_observer', + '$BUILD_DIR/mongo/db/query/command_request_response', + '$BUILD_DIR/mongo/db/service_context_d', + '$BUILD_DIR/mongo/db/service_context_d_test_fixture', + '$BUILD_DIR/mongo/db/service_context_test_fixture', + '$BUILD_DIR/mongo/db/stats/counters', + '$BUILD_DIR/mongo/db/storage/ephemeral_for_test/storage_ephemeral_for_test_core', + '$BUILD_DIR/mongo/db/transaction', + '$BUILD_DIR/mongo/db/update/update_test_helpers', + '$BUILD_DIR/mongo/dbtests/mocklib', + '$BUILD_DIR/mongo/executor/network_interface_factory', + '$BUILD_DIR/mongo/executor/network_interface_mock', + '$BUILD_DIR/mongo/executor/network_interface_thread_pool', + '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture', + '$BUILD_DIR/mongo/rpc/command_status', + '$BUILD_DIR/mongo/transport/transport_layer_mock', + '$BUILD_DIR/mongo/unittest/task_executor_proxy', + '$BUILD_DIR/mongo/unittest/unittest', + '$BUILD_DIR/mongo/util/clock_source_mock', + '$BUILD_DIR/mongo/util/concurrency/thread_pool', + 'abstract_async_component', + 'data_replicator_external_state_mock', + 'drop_pending_collection_reaper', + 'idempotency_test_fixture', + 'idempotency_test_util', + 'initial_syncer', + 'isself', + 'multiapplier', + 'oplog', + 'oplog_application_interface', + 'oplog_applier_impl_test_fixture', + 'oplog_buffer_collection', + 'oplog_buffer_proxy', + 'oplog_entry', + 'oplog_entry_test_helpers', + 'oplog_fetcher', + 'oplog_interface_local', + 'oplog_interface_mock', + 'oplog_interface_remote', + 'optime', + 'primary_only_service', + 'repl_coordinator_impl', + 'repl_server_parameters', + 'replica_set_messages', + 'replication_consistency_markers_impl', + 'replication_process', + 'replication_recovery', + 'replmocks', + 'reporter', + 'roll_back_local_operations', + 'rollback_checker', + 'rollback_impl', + 'rollback_test_fixture', + 'rs_rollback', + 'scatter_gather', + 'speculative_majority_read_info', + 'split_horizon', + 'storage_interface_impl', + 'sync_source_resolver', + 'sync_source_selector_mock', + 'task_executor_mock', + 'task_runner', + 'tenant_migration_recipient_service', + 'tenant_migration_utils', + 'tenant_oplog_processing', + 'wait_for_majority_service', + ], + ) # The following two tests appear to clash when combined with the above list. @@ -1668,18 +1683,6 @@ env.CppUnitTest( ], ) -env.CppUnitTest( - target='db_repl_idempotency_test', - source=[ - 'idempotency_test.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/db/update/update_test_helpers', - 'idempotency_test_fixture', - 'idempotency_test_util', - ], -) - env.Library( target='replication_metrics', source=[ diff --git a/src/mongo/db/storage/SConscript b/src/mongo/db/storage/SConscript index 0754221bec8..0d5409af7af 100644 --- a/src/mongo/db/storage/SConscript +++ b/src/mongo/db/storage/SConscript @@ -191,14 +191,7 @@ env.Library( '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/service_context' ], - LIBDEPS_DEPENDENTS=[ - '$BUILD_DIR/mongo/db/mongod_initializers', - '$BUILD_DIR/mongo/s/mongos_initializers', - ], - LIBDEPS_TAGS=[ - 'lint-allow-nonprivate-on-deps-dependents', - 'lint-allow-bidirectional-edges', - ]) +) env.Library( target='backup_cursor_hooks', @@ -209,13 +202,6 @@ env.Library( '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/service_context', ], - LIBDEPS_DEPENDENTS=[ - '$BUILD_DIR/mongo/db/mongod_initializers', - ], - LIBDEPS_TAGS=[ - 'lint-allow-nonprivate-on-deps-dependents', - 'lint-allow-bidirectional-edges', - ] ) env.Library( diff --git a/src/mongo/db/storage/wiredtiger/SConscript b/src/mongo/db/storage/wiredtiger/SConscript index efc97da2658..b7cbddb0e96 100644 --- a/src/mongo/db/storage/wiredtiger/SConscript +++ b/src/mongo/db/storage/wiredtiger/SConscript @@ -1,14 +1,11 @@ # -*- mode: python -*- Import("env") Import("wiredtiger") -Import("get_option") -env = env.Clone() +if not wiredtiger: + Return() -using_ubsan = False -sanitizer_list = get_option('sanitize') -if sanitizer_list: - using_ubsan = 'undefined' in sanitizer_list.split(',') +env = env.Clone() env.Library( target='storage_wiredtiger_customization_hooks', @@ -16,11 +13,110 @@ env.Library( 'wiredtiger_customization_hooks.cpp', 'wiredtiger_extensions.cpp', ], - LIBDEPS= ['$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/db/service_context'], + LIBDEPS= [ + '$BUILD_DIR/mongo/base', + '$BUILD_DIR/mongo/db/service_context' + ], +) + +wtEnv = env.Clone() +wtEnv.InjectThirdParty(libraries=['wiredtiger']) +wtEnv.InjectThirdParty(libraries=['zlib']) +wtEnv.InjectThirdParty(libraries=['valgrind']) + +# This is the smallest possible set of files that wraps WT +wtEnv.Library( + target='storage_wiredtiger_core', + source= [ + 'oplog_stones_server_status_section.cpp', + 'wiredtiger_begin_transaction_block.cpp', + 'wiredtiger_cursor.cpp', + 'wiredtiger_cursor_helpers.cpp', + 'wiredtiger_global_options.cpp', + 'wiredtiger_index.cpp', + 'wiredtiger_kv_engine.cpp', + 'wiredtiger_oplog_manager.cpp', + 'wiredtiger_parameters.cpp', + 'wiredtiger_prepare_conflict.cpp', + 'wiredtiger_record_store.cpp', + 'wiredtiger_recovery_unit.cpp', + 'wiredtiger_session_cache.cpp', + 'wiredtiger_snapshot_manager.cpp', + 'wiredtiger_size_storer.cpp', + 'wiredtiger_util.cpp', + 'wiredtiger_parameters.idl', + ], + LIBDEPS= [ + '$BUILD_DIR/mongo/base', + '$BUILD_DIR/mongo/db/bson/dotted_path_support', + '$BUILD_DIR/mongo/db/catalog/collection', + '$BUILD_DIR/mongo/db/catalog/collection_options', + '$BUILD_DIR/mongo/db/concurrency/lock_manager', + '$BUILD_DIR/mongo/db/concurrency/write_conflict_exception', + '$BUILD_DIR/mongo/db/curop', + '$BUILD_DIR/mongo/db/global_settings', + '$BUILD_DIR/mongo/db/index/index_descriptor', + '$BUILD_DIR/mongo/db/namespace_string', + '$BUILD_DIR/mongo/db/prepare_conflict_tracker', + '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', + '$BUILD_DIR/mongo/db/repl/repl_settings', + '$BUILD_DIR/mongo/db/server_options_core', + '$BUILD_DIR/mongo/db/service_context', + '$BUILD_DIR/mongo/db/storage/index_entry_comparison', + '$BUILD_DIR/mongo/db/storage/key_string', + '$BUILD_DIR/mongo/db/storage/oplog_hack', + '$BUILD_DIR/mongo/db/storage/recovery_unit_base', + '$BUILD_DIR/mongo/db/storage/storage_file_util', + '$BUILD_DIR/mongo/db/storage/storage_options', + '$BUILD_DIR/mongo/util/concurrency/ticketholder', + '$BUILD_DIR/mongo/util/elapsed_tracker', + '$BUILD_DIR/mongo/util/processinfo', + '$BUILD_DIR/third_party/shim_snappy', + '$BUILD_DIR/third_party/shim_wiredtiger', + '$BUILD_DIR/third_party/shim_zlib', + 'storage_wiredtiger_customization_hooks', + ], + LIBDEPS_PRIVATE= [ + '$BUILD_DIR/mongo/db/catalog/database_holder', + '$BUILD_DIR/mongo/db/commands/server_status', + '$BUILD_DIR/mongo/db/db_raii', + '$BUILD_DIR/mongo/db/snapshot_window_options', + '$BUILD_DIR/mongo/db/storage/storage_repair_observer', + '$BUILD_DIR/mongo/util/log_and_backoff', + '$BUILD_DIR/mongo/util/options_parser/options_parser', + 'oplog_stone_parameters', + ], +) + +wtEnv.Library( + target='storage_wiredtiger', + source=[ + 'wiredtiger_init.cpp', + 'wiredtiger_options_init.cpp', + 'wiredtiger_server_status.cpp', + 'wiredtiger_global_options.idl', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/db_raii', + '$BUILD_DIR/mongo/db/storage/storage_engine_impl', + '$BUILD_DIR/mongo/db/storage/storage_engine_lock_file', + '$BUILD_DIR/mongo/db/storage/storage_engine_metadata', + 'storage_wiredtiger_core', + 'storage_wiredtiger_customization_hooks', + ], + LIBDEPS_PRIVATE=[ + '$BUILD_DIR/mongo/db/catalog/database_holder', + '$BUILD_DIR/mongo/db/commands/server_status', + '$BUILD_DIR/mongo/db/concurrency/lock_manager', + '$BUILD_DIR/mongo/db/storage/storage_engine_common', + '$BUILD_DIR/mongo/util/options_parser/options_parser', + ], LIBDEPS_DEPENDENTS=[ '$BUILD_DIR/mongo/db/mongod_initializers', - '$BUILD_DIR/mongo/s/mongos_initializers', + '$BUILD_DIR/mongo/embedded/embedded', + ], + PROGDEPS_DEPENDENTS=[ + '$BUILD_DIR/mongo/dbtests/dbtest', ], LIBDEPS_TAGS=[ 'lint-allow-nonprivate-on-deps-dependents', @@ -28,193 +124,95 @@ env.Library( ], ) -if wiredtiger: - wtEnv = env.Clone() - wtEnv.InjectThirdParty(libraries=['wiredtiger']) - wtEnv.InjectThirdParty(libraries=['zlib']) - wtEnv.InjectThirdParty(libraries=['valgrind']) - - # This is the smallest possible set of files that wraps WT - wtEnv.Library( - target='storage_wiredtiger_core', - source= [ - 'oplog_stones_server_status_section.cpp', - 'wiredtiger_begin_transaction_block.cpp', - 'wiredtiger_cursor.cpp', - 'wiredtiger_cursor_helpers.cpp', - 'wiredtiger_global_options.cpp', - 'wiredtiger_index.cpp', - 'wiredtiger_kv_engine.cpp', - 'wiredtiger_oplog_manager.cpp', - 'wiredtiger_parameters.cpp', - 'wiredtiger_prepare_conflict.cpp', - 'wiredtiger_record_store.cpp', - 'wiredtiger_recovery_unit.cpp', - 'wiredtiger_session_cache.cpp', - 'wiredtiger_snapshot_manager.cpp', - 'wiredtiger_size_storer.cpp', - 'wiredtiger_util.cpp', - 'wiredtiger_parameters.idl', - ], - LIBDEPS= [ - '$BUILD_DIR/mongo/base', - '$BUILD_DIR/mongo/db/bson/dotted_path_support', - '$BUILD_DIR/mongo/db/catalog/collection', - '$BUILD_DIR/mongo/db/catalog/collection_options', - '$BUILD_DIR/mongo/db/concurrency/lock_manager', - '$BUILD_DIR/mongo/db/concurrency/write_conflict_exception', - '$BUILD_DIR/mongo/db/curop', - '$BUILD_DIR/mongo/db/global_settings', - '$BUILD_DIR/mongo/db/index/index_descriptor', - '$BUILD_DIR/mongo/db/namespace_string', - '$BUILD_DIR/mongo/db/prepare_conflict_tracker', - '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', - '$BUILD_DIR/mongo/db/repl/repl_settings', - '$BUILD_DIR/mongo/db/server_options_core', - '$BUILD_DIR/mongo/db/service_context', - '$BUILD_DIR/mongo/db/storage/index_entry_comparison', - '$BUILD_DIR/mongo/db/storage/key_string', - '$BUILD_DIR/mongo/db/storage/oplog_hack', - '$BUILD_DIR/mongo/db/storage/recovery_unit_base', - '$BUILD_DIR/mongo/db/storage/storage_file_util', - '$BUILD_DIR/mongo/db/storage/storage_options', - '$BUILD_DIR/mongo/util/concurrency/ticketholder', - '$BUILD_DIR/mongo/util/elapsed_tracker', - '$BUILD_DIR/mongo/util/processinfo', - '$BUILD_DIR/third_party/shim_snappy', - '$BUILD_DIR/third_party/shim_wiredtiger', - '$BUILD_DIR/third_party/shim_zlib', - 'storage_wiredtiger_customization_hooks', - ], - LIBDEPS_PRIVATE= [ - '$BUILD_DIR/mongo/db/catalog/database_holder', - '$BUILD_DIR/mongo/db/commands/server_status', - '$BUILD_DIR/mongo/db/db_raii', - '$BUILD_DIR/mongo/db/snapshot_window_options', - '$BUILD_DIR/mongo/db/storage/storage_repair_observer', - '$BUILD_DIR/mongo/util/log_and_backoff', - '$BUILD_DIR/mongo/util/options_parser/options_parser', - 'oplog_stone_parameters', - ], - ) - - wtEnv.Library( - target='storage_wiredtiger', - source=[ - 'wiredtiger_init.cpp', - 'wiredtiger_options_init.cpp', - 'wiredtiger_server_status.cpp', - 'wiredtiger_global_options.idl', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/db/db_raii', - '$BUILD_DIR/mongo/db/storage/storage_engine_impl', - '$BUILD_DIR/mongo/db/storage/storage_engine_lock_file', - '$BUILD_DIR/mongo/db/storage/storage_engine_metadata', - 'storage_wiredtiger_core', - 'storage_wiredtiger_customization_hooks', - ], - LIBDEPS_PRIVATE=[ - '$BUILD_DIR/mongo/db/catalog/database_holder', - '$BUILD_DIR/mongo/db/commands/server_status', - '$BUILD_DIR/mongo/db/concurrency/lock_manager', - '$BUILD_DIR/mongo/db/storage/storage_engine_common', - '$BUILD_DIR/mongo/util/options_parser/options_parser', - ], - ) +wtEnv.CppUnitTest( + target='storage_wiredtiger_test', + source=[ + 'wiredtiger_init_test.cpp', + 'wiredtiger_kv_engine_test.cpp', + 'wiredtiger_recovery_unit_test.cpp', + 'wiredtiger_session_cache_test.cpp', + 'wiredtiger_util_test.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/auth/authmocks', + '$BUILD_DIR/mongo/db/index/index_access_methods', + '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', + '$BUILD_DIR/mongo/db/repl/replmocks', + '$BUILD_DIR/mongo/db/service_context', + '$BUILD_DIR/mongo/db/service_context_d', + '$BUILD_DIR/mongo/db/service_context_test_fixture', + '$BUILD_DIR/mongo/db/storage/checkpointer', + '$BUILD_DIR/mongo/db/storage/durable_catalog_impl', + '$BUILD_DIR/mongo/db/storage/kv/kv_engine_test_harness', + '$BUILD_DIR/mongo/db/storage/recovery_unit_test_harness', + '$BUILD_DIR/mongo/db/storage/storage_engine_metadata', + '$BUILD_DIR/mongo/db/storage/storage_options', + '$BUILD_DIR/mongo/util/clock_source_mock', + 'storage_wiredtiger', + 'storage_wiredtiger_core', + ] +) - wtEnv.CppUnitTest( - target='storage_wiredtiger_test', - source=[ - 'wiredtiger_init_test.cpp', - 'wiredtiger_kv_engine_test.cpp', - 'wiredtiger_recovery_unit_test.cpp', - 'wiredtiger_session_cache_test.cpp', - 'wiredtiger_util_test.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/db/auth/authmocks', - '$BUILD_DIR/mongo/db/index/index_access_methods', - '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', - '$BUILD_DIR/mongo/db/repl/replmocks', - '$BUILD_DIR/mongo/db/service_context', - '$BUILD_DIR/mongo/db/service_context_d', - '$BUILD_DIR/mongo/db/service_context_test_fixture', - '$BUILD_DIR/mongo/db/storage/checkpointer', - '$BUILD_DIR/mongo/db/storage/durable_catalog_impl', - '$BUILD_DIR/mongo/db/storage/kv/kv_engine_test_harness', - '$BUILD_DIR/mongo/db/storage/recovery_unit_test_harness', - '$BUILD_DIR/mongo/db/storage/storage_engine_metadata', - '$BUILD_DIR/mongo/db/storage/storage_options', - '$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger', - '$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger_core', - '$BUILD_DIR/mongo/util/clock_source_mock', - ] - ) +wtEnv.Library( + target='additional_wiredtiger_record_store_tests', + source=[ + 'wiredtiger_record_store_test.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/storage/durable_catalog_impl', + '$BUILD_DIR/mongo/db/storage/record_store_test_harness', + '$BUILD_DIR/mongo/util/clock_source_mock', + 'storage_wiredtiger_core', + ], +) - wtEnv.Library( - target='additional_wiredtiger_record_store_tests', - source=[ - 'wiredtiger_record_store_test.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/db/storage/durable_catalog_impl', - '$BUILD_DIR/mongo/db/storage/record_store_test_harness', - '$BUILD_DIR/mongo/util/clock_source_mock', - 'storage_wiredtiger_core', - ], - ) +wtEnv.Library( + target='additional_wiredtiger_index_tests', + source=[ + 'wiredtiger_index_test.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/storage/durable_catalog_impl', + '$BUILD_DIR/mongo/db/storage/sorted_data_interface_test_harness', + 'storage_wiredtiger_core', + ], +) - wtEnv.Library( - target='additional_wiredtiger_index_tests', - source=[ - 'wiredtiger_index_test.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/db/storage/durable_catalog_impl', - '$BUILD_DIR/mongo/db/storage/sorted_data_interface_test_harness', - 'storage_wiredtiger_core', - ], - ) +wtEnv.Library( + target='oplog_stone_parameters', + source=[ + 'oplog_stone_parameters.idl', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/idl/server_parameter', + ], +) - wtEnv.Library( - target='oplog_stone_parameters', - source=[ - 'oplog_stone_parameters.idl', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/idl/server_parameter', - ], - ) - # All of these tests fail to compile under undefined behavior - # sanitizer due to unexpressed circular dependency edges. In particular - # they all need a definition from the 'catalog'. - if not using_ubsan: - wtEnv.CppUnitTest( - target='storage_wiredtiger_record_store_and_index_test', - source=[ - 'wiredtiger_standard_index_test.cpp', - 'wiredtiger_standard_record_store_test.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/db/auth/authmocks', - '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', - '$BUILD_DIR/mongo/db/repl/replmocks', - '$BUILD_DIR/mongo/db/service_context_test_fixture', - 'additional_wiredtiger_index_tests', - 'additional_wiredtiger_record_store_tests', - ], - ) +wtEnv.CppUnitTest( + target='storage_wiredtiger_record_store_and_index_test', + source=[ + 'wiredtiger_standard_index_test.cpp', + 'wiredtiger_standard_record_store_test.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/db/auth/authmocks', + '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', + '$BUILD_DIR/mongo/db/repl/replmocks', + '$BUILD_DIR/mongo/db/service_context_test_fixture', + 'additional_wiredtiger_index_tests', + 'additional_wiredtiger_record_store_tests', + ], +) - wtEnv.Benchmark( - target='storage_wiredtiger_begin_transaction_block_bm', - source='wiredtiger_begin_transaction_block_bm.cpp', - LIBDEPS=[ - '$BUILD_DIR/mongo/db/service_context', - '$BUILD_DIR/mongo/db/storage/durable_catalog_impl', - '$BUILD_DIR/mongo/unittest/unittest', - '$BUILD_DIR/mongo/util/clock_source_mock', - 'storage_wiredtiger_core', - ], - ) +wtEnv.Benchmark( + target='storage_wiredtiger_begin_transaction_block_bm', + source='wiredtiger_begin_transaction_block_bm.cpp', + LIBDEPS=[ + '$BUILD_DIR/mongo/db/service_context', + '$BUILD_DIR/mongo/db/storage/durable_catalog_impl', + '$BUILD_DIR/mongo/unittest/unittest', + '$BUILD_DIR/mongo/util/clock_source_mock', + 'storage_wiredtiger_core', + ], +) diff --git a/src/mongo/dbtests/SConscript b/src/mongo/dbtests/SConscript index d8752a237b2..acae12935c9 100644 --- a/src/mongo/dbtests/SConscript +++ b/src/mongo/dbtests/SConscript @@ -171,7 +171,6 @@ if not has_option('noshell') and usemozjs: "$BUILD_DIR/mongo/db/storage/ephemeral_for_test/storage_ephemeral_for_test", "$BUILD_DIR/mongo/db/storage/storage_debug_util", "$BUILD_DIR/mongo/db/storage/storage_engine_impl", - "$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger" if wiredtiger else [], "$BUILD_DIR/mongo/db/traffic_reader", "$BUILD_DIR/mongo/db/transaction", "$BUILD_DIR/mongo/db/vector_clock", diff --git a/src/mongo/embedded/SConscript b/src/mongo/embedded/SConscript index ac924ca6a0f..b9eec500f88 100644 --- a/src/mongo/embedded/SConscript +++ b/src/mongo/embedded/SConscript @@ -110,7 +110,6 @@ env.Library( '$BUILD_DIR/mongo/db/storage/storage_engine_metadata', '$BUILD_DIR/mongo/db/storage/storage_init_d', '$BUILD_DIR/mongo/db/storage/storage_options', - '$BUILD_DIR/mongo/db/storage/wiredtiger/storage_wiredtiger' if wiredtiger else [], '$BUILD_DIR/mongo/db/vector_clock_trivial', '$BUILD_DIR/mongo/db/wire_version', '$BUILD_DIR/mongo/rpc/client_metadata', diff --git a/src/mongo/rpc/SConscript b/src/mongo/rpc/SConscript index d9f13bcfeb7..957647e5721 100644 --- a/src/mongo/rpc/SConscript +++ b/src/mongo/rpc/SConscript @@ -147,32 +147,33 @@ env.Library( ], ) -env.CppUnitTest( - target='rpc_test', - source=[ - 'get_status_from_command_result_test.cpp', - 'legacy_request_test.cpp', - 'metadata/client_metadata_test.cpp', - 'metadata/config_server_metadata_test.cpp', - 'metadata/egress_metadata_hook_list_test.cpp', - 'metadata/oplog_query_metadata_test.cpp', - 'metadata/repl_set_metadata_test.cpp', - 'metadata/sharding_metadata_test.cpp', - 'metadata/tracking_metadata_test.cpp', - 'metadata_test.cpp', - 'object_check_test.cpp', - 'op_msg_test.cpp', - 'protocol_test.cpp', - 'reply_builder_test.cpp', - ], - LIBDEPS=[ - '$BUILD_DIR/mongo/client/clientdriver_minimal', - '$BUILD_DIR/third_party/wiredtiger/wiredtiger_checksum', - 'client_metadata', - 'metadata', - 'rpc', - ] -) +if wiredtiger: + env.CppUnitTest( + target='rpc_test', + source=[ + 'get_status_from_command_result_test.cpp', + 'legacy_request_test.cpp', + 'metadata/client_metadata_test.cpp', + 'metadata/config_server_metadata_test.cpp', + 'metadata/egress_metadata_hook_list_test.cpp', + 'metadata/oplog_query_metadata_test.cpp', + 'metadata/repl_set_metadata_test.cpp', + 'metadata/sharding_metadata_test.cpp', + 'metadata/tracking_metadata_test.cpp', + 'metadata_test.cpp', + 'object_check_test.cpp', + 'op_msg_test.cpp', + 'protocol_test.cpp', + 'reply_builder_test.cpp', + ], + LIBDEPS=[ + '$BUILD_DIR/mongo/client/clientdriver_minimal', + '$BUILD_DIR/third_party/wiredtiger/wiredtiger_checksum', + 'client_metadata', + 'metadata', + 'rpc', + ] + ) env.CppIntegrationTest( target='rpc_integration_test', diff --git a/src/mongo/util/SConscript b/src/mongo/util/SConscript index 65325c565e9..1bff532b04b 100644 --- a/src/mongo/util/SConscript +++ b/src/mongo/util/SConscript @@ -318,11 +318,11 @@ if env['MONGO_ALLOCATOR'] in ['tcmalloc', 'tcmalloc-experimental']: 'heap_profiler.cpp', ], LIBDEPS=[ - '$BUILD_DIR/mongo/transport/service_executor', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/commands/server_status', '$BUILD_DIR/mongo/idl/server_parameter', + '$BUILD_DIR/mongo/transport/service_executor', 'processinfo', ], LIBDEPS_DEPENDENTS=[ @@ -331,8 +331,7 @@ if env['MONGO_ALLOCATOR'] in ['tcmalloc', 'tcmalloc-experimental']: ], LIBDEPS_TAGS=[ 'lint-allow-nonprivate-on-deps-dependents', - ] - + ], ) env.Library( |