summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mongo/base/SConscript73
-rw-r--r--src/mongo/bson/SConscript66
-rw-r--r--src/mongo/bson/mutable/SConscript15
-rw-r--r--src/mongo/bson/util/SConscript26
-rw-r--r--src/mongo/client/SConscript179
-rw-r--r--src/mongo/crypto/SConscript36
-rw-r--r--src/mongo/db/SConscript595
-rw-r--r--src/mongo/db/auth/SConscript188
-rw-r--r--src/mongo/db/bson/SConscript2
-rw-r--r--src/mongo/db/catalog/SConscript207
-rw-r--r--src/mongo/db/catalog/util/SConscript2
-rw-r--r--src/mongo/db/commands/SConscript79
-rw-r--r--src/mongo/db/concurrency/SConscript13
-rw-r--r--src/mongo/db/exec/SConscript66
-rw-r--r--src/mongo/db/free_mon/SConscript2
-rw-r--r--src/mongo/db/ftdc/SConscript2
-rw-r--r--src/mongo/db/fts/SConscript45
-rw-r--r--src/mongo/db/fts/unicode/SConscript31
-rw-r--r--src/mongo/db/geo/SConscript30
-rw-r--r--src/mongo/db/index/SConscript36
-rw-r--r--src/mongo/db/matcher/SConscript106
-rw-r--r--src/mongo/db/ops/SConscript26
-rw-r--r--src/mongo/db/pipeline/SConscript338
-rw-r--r--src/mongo/db/query/SConscript258
-rw-r--r--src/mongo/db/query/collation/SConscript74
-rw-r--r--src/mongo/db/query/datetime/SConscript2
-rw-r--r--src/mongo/db/repl/SConscript741
-rw-r--r--src/mongo/db/s/SConscript114
-rw-r--r--src/mongo/db/sorter/SConscript23
-rw-r--r--src/mongo/db/stats/SConscript56
-rw-r--r--src/mongo/db/storage/SConscript59
-rw-r--r--src/mongo/db/storage/kv/SConscript37
-rw-r--r--src/mongo/db/update/SConscript110
-rw-r--r--src/mongo/db/views/SConscript2
-rw-r--r--src/mongo/executor/SConscript111
-rw-r--r--src/mongo/idl/SConscript40
-rw-r--r--src/mongo/logger/SConscript49
-rw-r--r--src/mongo/platform/SConscript25
-rw-r--r--src/mongo/rpc/SConscript80
-rw-r--r--src/mongo/s/SConscript181
-rw-r--r--src/mongo/s/catalog/SConscript17
-rw-r--r--src/mongo/s/client/SConscript41
-rw-r--r--src/mongo/s/commands/SConscript14
-rw-r--r--src/mongo/s/query/SConscript116
-rw-r--r--src/mongo/s/write_ops/SConscript30
-rw-r--r--src/mongo/scripting/SConscript14
-rw-r--r--src/mongo/shell/SConscript44
-rw-r--r--src/mongo/transport/SConscript132
-rw-r--r--src/mongo/unittest/SConscript29
-rw-r--r--src/mongo/util/SConscript489
-rw-r--r--src/mongo/util/concurrency/SConscript34
-rw-r--r--src/mongo/util/net/SConscript4
-rw-r--r--src/mongo/util/options_parser/SConscript18
53 files changed, 1251 insertions, 3856 deletions
diff --git a/src/mongo/base/SConscript b/src/mongo/base/SConscript
index 490017258da..f6ee4e7e1d8 100644
--- a/src/mongo/base/SConscript
+++ b/src/mongo/base/SConscript
@@ -29,30 +29,6 @@ generateErrorCodes = env_for_error_codes.Command(
env.Alias('generated-sources', generateErrorCodes)
-env.CppUnitTest('base_test',
- ['counter_test.cpp',
- 'data_builder_test.cpp',
- 'data_cursor_test.cpp',
- 'data_range_cursor_test.cpp',
- 'data_range_test.cpp',
- 'data_type_string_data_test.cpp',
- 'data_type_terminated_test.cpp',
- 'data_type_validated_test.cpp',
- 'data_view_test.cpp',
- 'encoded_value_storage_test.cpp',
- 'initializer_dependency_graph_test.cpp',
- 'initializer_test.cpp',
- 'murmurhash3_test.cpp',
- 'owned_pointer_map_test.cpp',
- 'owned_pointer_vector_test.cpp',
- 'parse_number_test.cpp',
- 'status_test.cpp',
- 'status_with_test.cpp',
- 'string_data_test.cpp',
- 'transaction_error_test.cpp',
- 'uuid_test.cpp',
- ])
-
env.Library(
target=[
'system_error'
@@ -79,27 +55,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target=[
- 'system_error_test',
- ],
- source=[
- 'system_error_test.cpp',
- ],
- LIBDEPS=[
- 'system_error',
- ],
-)
-
-env.CppUnitTest(
- target=[
- 'clonable_ptr_test',
- ],
- source=[
- 'clonable_ptr_test.cpp',
- ],
-)
-
env.Library(
target=[
'secure_allocator'
@@ -116,13 +71,35 @@ env.Library(
)
env.CppUnitTest(
- target=[
- 'secure_allocator_test',
- ],
+ target='base_test',
source=[
+ 'clonable_ptr_test.cpp',
+ 'counter_test.cpp',
+ 'data_builder_test.cpp',
+ 'data_cursor_test.cpp',
+ 'data_range_cursor_test.cpp',
+ 'data_range_test.cpp',
+ 'data_type_string_data_test.cpp',
+ 'data_type_terminated_test.cpp',
+ 'data_type_validated_test.cpp',
+ 'data_view_test.cpp',
+ 'encoded_value_storage_test.cpp',
+ 'initializer_dependency_graph_test.cpp',
+ 'initializer_test.cpp',
+ 'murmurhash3_test.cpp',
+ 'owned_pointer_map_test.cpp',
+ 'owned_pointer_vector_test.cpp',
+ 'parse_number_test.cpp',
'secure_allocator_test.cpp',
+ 'status_test.cpp',
+ 'status_with_test.cpp',
+ 'string_data_test.cpp',
+ 'system_error_test.cpp',
+ 'transaction_error_test.cpp',
+ 'uuid_test.cpp',
],
LIBDEPS=[
'secure_allocator',
+ 'system_error',
],
)
diff --git a/src/mongo/bson/SConscript b/src/mongo/bson/SConscript
index 68a5ba0ad00..6ae361e687e 100644
--- a/src/mongo/bson/SConscript
+++ b/src/mongo/bson/SConscript
@@ -15,50 +15,16 @@ env.SConscript(
)
env.CppUnitTest(
- target='bson_field_test',
+ target='bson_test',
source=[
'bson_field_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
-)
-
-env.CppUnitTest(
- target='bson_obj_test',
- source=[
- 'bson_obj_test.cpp',
- 'simple_bsonobj_comparator_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
-)
-
-env.CppUnitTest(
- target='bson_obj_data_type_test',
- source=[
'bson_obj_data_type_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ]
-)
-
-env.CppUnitTest(
- target='bson_validate_test',
- source=[
+ 'bson_obj_test.cpp',
'bson_validate_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
-)
-
-env.CppUnitTest(
- target='bsonobjbuilder_test',
- source=[
+ 'bsonelement_test.cpp',
'bsonobjbuilder_test.cpp',
+ 'oid_test.cpp',
+ 'simple_bsonobj_comparator_test.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/base',
@@ -75,31 +41,11 @@ env.Benchmark(
],
)
-env.CppUnitTest(
- target='bsonelement_test',
- source=[
- 'bsonelement_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
-)
-
-env.CppUnitTest(
- target='oid_test',
- source=[
- 'oid_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
-)
-
asioEnv = env.Clone()
asioEnv.InjectThirdParty('asio')
asioEnv.CppIntegrationTest(
- target='ugly_bson_integration_test',
+ target='bson_integration_test',
source=[
'ugly_bson_integration_test.cpp'
],
diff --git a/src/mongo/bson/mutable/SConscript b/src/mongo/bson/mutable/SConscript
index a9054d6c6de..37e0557656c 100644
--- a/src/mongo/bson/mutable/SConscript
+++ b/src/mongo/bson/mutable/SConscript
@@ -29,19 +29,9 @@ env.Library(
)
env.CppUnitTest(
- target='mutable_bson_test',
- source=[
- 'mutable_bson_test.cpp'
- ],
- LIBDEPS=[
- 'mutable_bson',
- 'mutable_bson_test_utils',
- ],
-)
-
-env.CppUnitTest(
- target='mutable_bson_algo_test',
+ target='bson_mutable_test',
source=[
+ 'mutable_bson_test.cpp',
'mutable_bson_algo_test.cpp',
],
LIBDEPS=[
@@ -50,4 +40,3 @@ env.CppUnitTest(
'mutable_bson_test_utils',
],
)
-
diff --git a/src/mongo/bson/util/SConscript b/src/mongo/bson/util/SConscript
index 4e589e7aa6e..b43d850db83 100644
--- a/src/mongo/bson/util/SConscript
+++ b/src/mongo/bson/util/SConscript
@@ -15,32 +15,14 @@ env.Library(
)
env.CppUnitTest(
- target='bson_extract_test',
- source=[
- 'bson_extract_test.cpp'
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- 'bson_extract',
- ],
-)
-
-env.CppUnitTest(
- target='builder_test',
- source=[
- 'builder_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
-)
-
-env.CppUnitTest(
- target='bson_check_test',
+ target='bson_util_test',
source=[
'bson_check_test.cpp',
+ 'bson_extract_test.cpp',
+ 'builder_test.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/base',
+ 'bson_extract',
],
)
diff --git a/src/mongo/client/SConscript b/src/mongo/client/SConscript
index d1502b181bc..2c86930eead 100644
--- a/src/mongo/client/SConscript
+++ b/src/mongo/client/SConscript
@@ -20,28 +20,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='connection_string_test',
- source=[
- 'connection_string_test.cpp',
- ],
- LIBDEPS=[
- 'connection_string',
- ],
-)
-
-env.CppUnitTest(
- target='mongo_uri_test',
- source=[
- 'mongo_uri_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/transport/transport_layer_egress_init',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- 'clientdriver_network',
- ],
-)
-
env.Library(
target=[
'read_preference',
@@ -55,18 +33,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target=[
- 'read_preference_test',
- ],
- source=[
- 'read_preference_test.cpp',
- ],
- LIBDEPS=[
- 'read_preference',
- ],
-)
-
saslClientEnv = env.Clone()
saslLibs = []
saslClientSource = [
@@ -123,21 +89,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target=[
- 'authenticate_test',
- ],
- source=[
- 'authenticate_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/rpc/command_status',
- '$BUILD_DIR/mongo/util/net/network',
- '$BUILD_DIR/mongo/util/md5',
- 'authentication',
- ],
-)
-
env.Library(
target='client_query',
source=[
@@ -208,30 +159,6 @@ clientDriverEnv.Library(
]
)
-env.CppIntegrationTest(
- target='connpool_integration_test',
- source=[
- 'connpool_integration_test.cpp',
- ],
- LIBDEPS=[
- 'clientdriver_network',
- '$BUILD_DIR/mongo/transport/transport_layer_egress_init',
- '$BUILD_DIR/mongo/util/version_impl',
- ],
-)
-
-env.CppIntegrationTest(
- target='dbclient_connection_integration_test',
- source=[
- 'dbclient_connection_integration_test.cpp',
- ],
- LIBDEPS=[
- 'clientdriver_network',
- '$BUILD_DIR/mongo/transport/transport_layer_egress_init',
- '$BUILD_DIR/mongo/util/version_impl',
- ],
-)
-
env.Library(
target='async_client',
source=[
@@ -288,43 +215,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='replica_set_monitor_test',
- source=[
- 'replica_set_monitor_test_fixture.cpp',
- 'replica_set_monitor_internal_test.cpp',
- 'replica_set_monitor_read_preference_test.cpp',
- 'replica_set_monitor_scan_test.cpp',
- 'replica_set_monitor_test_concurrent.cpp',
- ],
- LIBDEPS=[
- '$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',
- 'clientdriver_network',
- ],
-)
-
-env.CppUnitTest('dbclient_rs_test',
- ['dbclient_rs_test.cpp'],
- LIBDEPS=[
- 'clientdriver_network',
- '$BUILD_DIR/mongo/dbtests/mocklib',
- ],
-)
-
-env.CppUnitTest(
- target='index_spec_test',
- source=[
- 'index_spec_test.cpp',
- ],
- LIBDEPS=[
- 'clientdriver_minimal',
- ],
-)
-
env.Library(
target='fetcher',
source=[
@@ -339,16 +229,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='fetcher_test',
- source='fetcher_test.cpp',
- LIBDEPS=[
- 'fetcher',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
- ],
-)
-
env.Library(
target='remote_command_retry_scheduler',
source=[
@@ -361,21 +241,68 @@ env.Library(
)
env.CppUnitTest(
- target='remote_command_retry_scheduler_test',
- source='remote_command_retry_scheduler_test.cpp',
+ 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_internal_test.cpp',
+ 'replica_set_monitor_read_preference_test.cpp',
+ 'replica_set_monitor_scan_test.cpp',
+ 'replica_set_monitor_test_concurrent.cpp',
+ 'replica_set_monitor_test_fixture.cpp',
+ ],
LIBDEPS=[
- 'remote_command_retry_scheduler',
+ '$BUILD_DIR/mongo/client/clientdriver_network',
+ '$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',
],
)
+# Cannot be combined with the above unit test due to an explicit call to
+# ReplicaSetMonitor::disableRefreshRetries_forTest.
env.CppUnitTest(
- target='dbclient_cursor_test',
+ target='client_rs_test',
source=[
- 'dbclient_cursor_test.cpp',
+ 'dbclient_rs_test.cpp'
],
LIBDEPS=[
- '$BUILD_DIR/mongo/client/clientdriver_network',
+ '$BUILD_DIR/mongo/dbtests/mocklib',
+ 'clientdriver_network',
+ ],
+)
+
+env.CppIntegrationTest(
+ target='client_integration_test',
+ source=[
+ 'connpool_integration_test.cpp',
+ 'dbclient_connection_integration_test.cpp',
+ ],
+ LIBDEPS=[
+ 'clientdriver_network',
+ '$BUILD_DIR/mongo/transport/transport_layer_egress_init',
+ '$BUILD_DIR/mongo/util/version_impl',
],
)
diff --git a/src/mongo/crypto/SConscript b/src/mongo/crypto/SConscript
index 5cc05d65e2d..1054d909f3e 100644
--- a/src/mongo/crypto/SConscript
+++ b/src/mongo/crypto/SConscript
@@ -57,27 +57,6 @@ else:
'sha256_block',
])
-env.CppUnitTest('sha1_block_test',
- ['sha1_block_test.cpp'],
- LIBDEPS=['sha_block_${MONGO_CRYPTO}'])
-
-env.CppUnitTest('sha256_block_test',
- ['sha256_block_test.cpp'],
- LIBDEPS=['sha_block_${MONGO_CRYPTO}'])
-
-env.CppUnitTest('sha512_block_test',
- ['sha512_block_test.cpp'],
- LIBDEPS=['sha_block_${MONGO_CRYPTO}'])
-
-env.CppUnitTest('mechanism_scram_test',
- ['mechanism_scram_test.cpp'],
- LIBDEPS_PRIVATE=[
- '$BUILD_DIR/mongo/base',
- '$BUILD_DIR/mongo/base/secure_allocator',
- 'sha_block_${MONGO_CRYPTO}',
- ])
-
-
env.Library(target='symmetric_crypto',
source=[
'symmetric_crypto.cpp',
@@ -103,9 +82,18 @@ env.Library(
)
env.CppUnitTest(
- target='aead_encryption_test',
- source='aead_encryption_test.cpp',
+ target='crypto_test',
+ source=[
+ 'aead_encryption_test.cpp',
+ 'mechanism_scram_test.cpp',
+ 'sha1_block_test.cpp',
+ 'sha256_block_test.cpp',
+ 'sha512_block_test.cpp',
+ ],
LIBDEPS=[
+ '$BUILD_DIR/mongo/base',
+ '$BUILD_DIR/mongo/base/secure_allocator',
'aead_encryption',
- ]
+ 'sha_block_${MONGO_CRYPTO}',
+ ],
)
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript
index 9b71106974e..cdd4fa310b7 100644
--- a/src/mongo/db/SConscript
+++ b/src/mongo/db/SConscript
@@ -72,72 +72,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target= 'field_ref_test',
- source= 'field_ref_test.cpp',
- LIBDEPS=[
- 'common',
- ],
-)
-
-env.CppUnitTest(
- target= 'field_ref_set_test',
- source = 'field_ref_set_test.cpp',
- LIBDEPS=[
- 'common',
- ],
-)
-
-env.CppUnitTest(
- target= 'field_parser_test',
- source= 'field_parser_test.cpp',
- LIBDEPS=[
- 'common',
- ],
-)
-
-env.CppUnitTest(
- target= 'hasher_test',
- source= [
- 'hasher_test.cpp',
- ],
- LIBDEPS=[
- 'common',
- '$BUILD_DIR/mongo/db/mongohasher',
- ],
-)
-
-env.CppUnitTest(
- target= 'keypattern_test',
- source= 'keypattern_test.cpp',
- LIBDEPS=[
- 'common'
- ],
-)
-
-env.CppUnitTest(
- target= 'op_observer_registry_test',
- source= 'op_observer_registry_test.cpp',
- LIBDEPS=[
- 'common',
- 'op_observer',
- 'service_context',
- ],
-)
-
-env.CppUnitTest(
- target='op_observer_impl_test',
- source='op_observer_impl_test.cpp',
- LIBDEPS=[
- 'auth/authmocks',
- 'common',
- 'op_observer_impl',
- 'repl/oplog_interface_local',
- 'repl/replmocks',
- 'service_context_d_test_fixture',
- 'transaction',
- ],
-)
env.Library(
target="dbmessage",
@@ -151,17 +85,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target="dbmessage_test",
- source=[
- "dbmessage_test.cpp"
- ],
- LIBDEPS=[
- "dbmessage",
- ],
-)
-env.CppUnitTest('record_id_test', 'record_id_test.cpp', LIBDEPS=[])
-
env.Library(
target='startup_warnings_common',
source=[
@@ -186,16 +109,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='startup_warnings_mongod_test',
- source=[
- 'startup_warnings_mongod_test.cpp',
- ],
- LIBDEPS=[
- 'startup_warnings_mongod',
- ],
-)
-
env.Library(
target='curop',
source=[
@@ -216,17 +129,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='curop_test',
- source=[
- 'curop_test.cpp',
- ],
- LIBDEPS=[
- 'curop',
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- ],
-)
-
env.Library(
target='curop_failpoint_helpers',
source=[
@@ -238,20 +140,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='operation_context_test',
- source=[
- 'operation_context_test.cpp',
- ],
- LIBDEPS=[
- 'logical_session_id',
- 'logical_session_id_helpers',
- 'service_context',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/util/clock_source_mock',
- ],
-)
-
env.Library(
target='index_names',
source=[
@@ -285,16 +173,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='range_arithmetic_test',
- source=[
- 'range_arithmetic_test.cpp',
- ],
- LIBDEPS=[
- 'range_arithmetic',
- ],
-)
-
env.Library(
target='namespace_string',
source=[
@@ -306,16 +184,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='namespace_string_test',
- source=[
- 'namespace_string_test.cpp',
- ],
- LIBDEPS=[
- 'namespace_string',
- ],
-)
-
env.Library(
target='update_index_data',
source=[
@@ -326,18 +194,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='update_index_data_test',
- source=[
- 'update_index_data_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- 'common',
- 'update_index_data',
- ],
-)
-
env.Library(
target='collection_index_usage_tracker',
source=[
@@ -348,17 +204,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='collection_index_usage_tracker_test',
- source=[
- 'collection_index_usage_tracker_test.cpp',
- ],
- LIBDEPS=[
- "$BUILD_DIR/mongo/util/clock_source_mock",
- 'collection_index_usage_tracker',
- ],
-)
-
# This library exists because some libraries, such as our networking library, need access to server
# options, but not to the helpers to set them from the command line. libserver_options_core.a just
# has the structure for storing the server options, while libserver_options.a has the code to set
@@ -437,17 +282,6 @@ env.Clone().InjectModule("enterprise").Library(
],
)
-env.CppUnitTest(
- target='server_options_test',
- source=[
- 'server_options_test.cpp',
- ],
- LIBDEPS_PRIVATE=[
- 'server_options_servers',
- '$BUILD_DIR/mongo/util/net/ssl_options_server',
- ],
-)
-
# This library is linked into mongos and mongod only, not into the shell or any tools.
env.Library(
target="initialize_server_security_state",
@@ -527,14 +361,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target= 'write_concern_options_test',
- source= 'write_concern_options_test.cpp',
- LIBDEPS=[
- 'write_concern_options',
- ],
-)
-
env.Library(
target='service_context',
source=[
@@ -572,20 +398,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target= 'thread_client_test',
- source= 'thread_client_test.cpp',
- LIBDEPS=[
- 'common',
- ],
- LIBDEPS_PRIVATE=[
- 'service_context_test_fixture',
- '$BUILD_DIR/mongo/transport/transport_layer_common',
- '$BUILD_DIR/mongo/transport/transport_layer_mock',
- '$BUILD_DIR/mongo/unittest/unittest',
- ],
-)
-
env.Library(
target='multi_key_path_tracker',
source=[
@@ -659,23 +471,6 @@ env.Library(
],
)
-
-env.CppUnitTest(
- target="commands_test",
- source=[
- "commands_test.cpp",
- env.Idlc('commands_test_example.idl')[0],
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/idl/idl_parser',
- '$BUILD_DIR/mongo/rpc/rpc',
- "commands",
- "auth/authmocks",
- "repl/replmocks",
- "service_context_test_fixture",
- ],
-)
-
env.Library(
target='db_raii',
source=[
@@ -764,20 +559,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='catalog_raii_test',
- source=[
- 'catalog_raii_test.cpp',
- ],
- LIBDEPS=[
- 'auth/authmocks',
- 'catalog_raii',
- 'catalog/database_holder',
- 'service_context_test_fixture',
- 'stats/fill_locker_info',
- ],
-)
-
env.Library(
target='dbdirectclient',
source=[
@@ -988,18 +769,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="index_builds_coordinator_mongod_test",
- source=[
- "index_builds_coordinator_mongod_test.cpp",
- ],
- LIBDEPS=[
- "index_builds_coordinator_mongod",
- "$BUILD_DIR/mongo/db/catalog/catalog_test_fixture",
- ]
-)
-
-
env.Library(
target='index_build_entry_helpers',
source=[
@@ -1023,19 +792,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='index_build_entry_helpers_test',
- source=[
- 'index_build_entry_helpers_test.cpp',
- ],
- LIBDEPS=[
- 'index_build_entry_helpers',
- '$BUILD_DIR/mongo/db/catalog/catalog_test_fixture',
- '$BUILD_DIR/mongo/db/catalog/index_build_entry_idl',
- '$BUILD_DIR/mongo/util/net/network',
- ],
-)
-
env.Library(
target="cloner",
source=[
@@ -1360,26 +1116,6 @@ env.Library(
envWithAsio = env.Clone()
envWithAsio.InjectThirdParty(libraries=['asio'])
-envWithAsio.CppUnitTest(
- target='logical_session_id_test',
- source=[
- 'logical_session_id_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- '$BUILD_DIR/mongo/db/auth/auth',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/transport/transport_layer_mock',
- 'logical_session_cache',
- 'logical_session_cache_impl',
- 'logical_session_id',
- 'logical_session_id_helpers',
- 'service_context_test_fixture',
- 'service_liaison_mock',
- 'sessions_collection_mock',
- ],
-)
-
envWithAsio.Library(
target='service_liaison_mock',
source=[
@@ -1558,30 +1294,6 @@ env.Library(
],
)
-envWithAsio.CppUnitTest(
- target='logical_session_cache_test',
- source=[
- 'logical_session_cache_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/executor/async_timer_mock',
- '$BUILD_DIR/mongo/util/clock_source_mock',
- 'auth/authmocks',
- 'dbdirectclient',
- 'keys_collection_document',
- 'keys_collection_manager',
- 'logical_clock',
- 'logical_session_cache_impl',
- 'logical_session_id_helpers',
- 'logical_session_id',
- 'repl/replmocks',
- 'service_context_d_test_fixture',
- 'service_liaison_mock',
- 'sessions_collection_mock',
- 'transaction',
- ],
-)
-
envWithAsio.Library(
target='logical_session_cache_factory_mongod',
source=[
@@ -1693,19 +1405,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='snapshot_window_util_test',
- source=[
- 'snapshot_window_util_test.cpp',
- ],
- LIBDEPS_PRIVATE=[
- 'service_context_d',
- 'service_context_devnull_test_fixture',
- 'snapshot_window_options',
- 'snapshot_window_util',
- ],
-)
-
env.Library(
target='signed_logical_time',
source=[
@@ -1811,62 +1510,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='keys_collection_document_test',
- source=[
- 'keys_collection_document_test.cpp',
- ],
- LIBDEPS=[
- 'keys_collection_document',
- ],
-)
-
-env.CppUnitTest(
- target='operation_time_tracker_test',
- source=[
- 'operation_time_tracker_test.cpp',
- ],
- LIBDEPS=[
- 'logical_time',
- ],
-)
-
-env.CppUnitTest(
- target='logical_time_test',
- source=[
- 'logical_time_test.cpp',
- ],
- LIBDEPS=[
- 'logical_time',
- 'signed_logical_time',
- 'time_proof_service',
- ],
-)
-
-env.CppUnitTest(
- target='logical_clock_test',
- source=[
- 'logical_clock_test.cpp',
- ],
- LIBDEPS=[
- 'logical_clock_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target='logical_time_validator_test',
- source=[
- 'logical_time_validator_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/s/catalog/dist_lock_manager_mock',
- '$BUILD_DIR/mongo/s/config_server_test_fixture',
- 'auth/authmocks',
- 'keys_collection_manager',
- 'logical_time_validator',
- ],
-)
-
env.Library(
target= 'logical_time_metadata_hook',
source= [
@@ -1893,31 +1536,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='time_proof_service_test',
- source=[
- 'time_proof_service_test.cpp',
- ],
- LIBDEPS=[
- 'time_proof_service',
- ],
-)
-
-env.CppUnitTest(
- target='keys_collection_manager_sharding_test',
- source=[
- 'key_generator_update_test.cpp',
- 'keys_collection_cache_test.cpp',
- 'keys_collection_manager_sharding_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/s/catalog/dist_lock_manager_mock',
- '$BUILD_DIR/mongo/s/config_server_test_fixture',
- 'keys_collection_manager',
- ],
-)
-
env.Library(
target='service_context_test_fixture',
source=[
@@ -2029,17 +1647,6 @@ env.Library(
asioEnv = env.Clone()
asioEnv.InjectThirdParty('asio')
-asioEnv.CppIntegrationTest(
- target='nesting_depth_test',
- source=[
- 'nesting_depth_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/executor/network_interface_fixture',
- '$BUILD_DIR/mongo/transport/transport_layer_egress_init',
- ],
-)
-
env.Library(
target='write_ops',
source=[
@@ -2064,109 +1671,183 @@ env.Library(
],
)
-env.CppUnitTest(
- target='session_catalog_test',
+env.Library(
+ target='traffic_recorder',
source=[
- 'session_catalog_test.cpp',
+ 'traffic_recorder.cpp',
+ 'traffic_recorder_validators.cpp',
+ env.Idlc('traffic_recorder.idl')[0],
],
LIBDEPS=[
- 'auth/authmocks',
- 'service_context_test_fixture',
- 'session_catalog',
+ '$BUILD_DIR/mongo/base',
+ ],
+ LIBDEPS_PRIVATE=[
+ "$BUILD_DIR/mongo/db/commands/server_status",
+ '$BUILD_DIR/mongo/db/service_context',
+ '$BUILD_DIR/mongo/idl/server_parameter',
+ "$BUILD_DIR/mongo/rpc/rpc",
],
)
-env.CppUnitTest(
- target='transaction_participant_test',
+env.Library(
+ target='traffic_reader',
source=[
- 'transaction_participant_test.cpp',
- 'transaction_participant_retryable_writes_test.cpp',
- 'session_catalog_mongod_test.cpp',
+ "traffic_reader.cpp",
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/base',
],
LIBDEPS_PRIVATE=[
+ '$BUILD_DIR/mongo/rpc/protocol',
+ "$BUILD_DIR/mongo/rpc/rpc",
+ ],
+)
+
+envWithAsio = env.Clone()
+envWithAsio.InjectThirdParty(libraries=['asio'])
+
+envWithAsio.CppUnitTest(
+ target='db_test',
+ source=[
+ 'catalog_raii_test.cpp',
+ 'collection_index_usage_tracker_test.cpp',
+ 'commands_test.cpp',
+ 'curop_test.cpp',
+ 'dbmessage_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_clock_test.cpp',
+ 'logical_session_cache_test.cpp',
+ 'logical_session_id_test.cpp',
+ 'logical_time_test.cpp',
+ 'multi_key_path_tracker_test.cpp',
+ 'namespace_string_test.cpp',
+ 'op_observer_impl_test.cpp',
+ 'op_observer_registry_test.cpp',
+ 'operation_context_test.cpp',
+ 'operation_time_tracker_test.cpp',
+ 'range_arithmetic_test.cpp',
+ 'record_id_test.cpp',
+ 'server_options_test.cpp',
+ 'session_catalog_mongod_test.cpp',
+ 'session_catalog_test.cpp',
+ 'snapshot_window_util_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',
+ 'write_concern_options_test.cpp',
+ env.Idlc('commands_test_example.idl')[0],
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/base',
'$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/index_build_entry_idl',
+ '$BUILD_DIR/mongo/db/mongohasher',
+ '$BUILD_DIR/mongo/db/query/query_test_service_context',
+ '$BUILD_DIR/mongo/executor/async_timer_mock',
+ '$BUILD_DIR/mongo/idl/idl_parser',
'$BUILD_DIR/mongo/idl/server_parameter',
+ '$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',
+ 'index_build_entry_helpers',
+ 'index_builds_coordinator_mongod',
+ 'keys_collection_document',
+ 'keys_collection_manager',
+ 'logical_clock',
+ 'logical_clock_test_fixture',
+ 'logical_session_cache',
+ 'logical_session_cache_impl',
'logical_session_id',
+ 'logical_session_id_helpers',
+ 'logical_time',
+ 'namespace_string',
'op_observer',
+ 'op_observer_impl',
'query_exec',
+ 'range_arithmetic',
'repl/mock_repl_coord_server_fixture',
+ 'repl/oplog_interface_local',
'repl/repl_coordinator_interface',
+ 'repl/replmocks',
+ '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',
- 'sessions_collection_mock',
+ 'session_catalog',
'sessions_collection',
+ 'sessions_collection_mock',
+ 'signed_logical_time',
+ 'snapshot_window_options',
+ 'snapshot_window_util',
+ 'startup_warnings_mongod',
+ 'stats/fill_locker_info',
+ 'time_proof_service',
'transaction',
+ 'update_index_data',
+ 'write_concern_options',
'write_ops',
],
)
-env.CppUnitTest(
- target='transaction_history_iterator_test',
+# These unit tests rely on the config_server_test_fixture, which
+# globally alters the state of the system to be in config server
+# mode. The other tests are not compatible with that setting.
+envWithAsio.CppUnitTest(
+ target='db_test_with_config_server_test_fixture',
source=[
- 'transaction_history_iterator_test.cpp',
+ 'key_generator_update_test.cpp',
+ 'keys_collection_cache_test.cpp',
+ 'keys_collection_manager_sharding_test.cpp',
+ 'logical_time_validator_test.cpp',
],
LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/repl/mock_repl_coord_server_fixture',
- 'query_exec',
- 'service_context_d',
- 'write_ops',
- ],
-)
-
-env.CppUnitTest(
- target='multi_key_path_tracker_test',
- source=[
- 'multi_key_path_tracker_test.cpp',
- ],
- LIBDEPS_PRIVATE=[
- 'service_context',
+ '$BUILD_DIR/mongo/s/catalog/dist_lock_manager_mock',
+ '$BUILD_DIR/mongo/s/config_server_test_fixture',
+ 'auth/authmocks',
+ 'keys_collection_manager',
+ 'logical_time_validator',
],
)
-env.CppIntegrationTest(
- target='exhaust_cursor_currentop_integration_test',
+asioEnv.CppIntegrationTest(
+ target='db_integration_test',
source=[
+ 'nesting_depth_test.cpp',
'exhaust_cursor_currentop_integration_test.cpp',
],
LIBDEPS=[
+ '$BUILD_DIR/mongo/executor/network_interface_fixture',
+ '$BUILD_DIR/mongo/transport/transport_layer_egress_init',
'$BUILD_DIR/mongo/client/clientdriver_network',
'$BUILD_DIR/mongo/transport/transport_layer_egress_init',
'$BUILD_DIR/mongo/rpc/protocol',
'$BUILD_DIR/mongo/util/version_impl',
],
)
-
-env.Library(
- target='traffic_recorder',
- source=[
- 'traffic_recorder.cpp',
- 'traffic_recorder_validators.cpp',
- env.Idlc('traffic_recorder.idl')[0],
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
- LIBDEPS_PRIVATE=[
- "$BUILD_DIR/mongo/db/commands/server_status",
- '$BUILD_DIR/mongo/db/service_context',
- '$BUILD_DIR/mongo/idl/server_parameter',
- "$BUILD_DIR/mongo/rpc/rpc",
- ],
-)
-
-env.Library(
- target='traffic_reader',
- source=[
- "traffic_reader.cpp",
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
- LIBDEPS_PRIVATE=[
- '$BUILD_DIR/mongo/rpc/protocol',
- "$BUILD_DIR/mongo/rpc/rpc",
- ],
-)
diff --git a/src/mongo/db/auth/SConscript b/src/mongo/db/auth/SConscript
index f77549b799b..580367c9016 100644
--- a/src/mongo/db/auth/SConscript
+++ b/src/mongo/db/auth/SConscript
@@ -28,17 +28,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='restriction_test',
- source=[
- 'restriction_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- 'authentication_restriction',
- ],
-)
-
# The Auth library should consist only of the shimmed API for Auth usage and the implementations of
# the data structures used in that API. No actual Auth subsystem implementation should exist in
# this library.
@@ -73,20 +62,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='auth_op_observer_test',
- source='auth_op_observer_test.cpp',
- LIBDEPS=[
- 'authmocks',
- 'auth_op_observer',
- '$BUILD_DIR/mongo/db/common',
- '$BUILD_DIR/mongo/db/repl/oplog',
- '$BUILD_DIR/mongo/db/repl/oplog_interface_local',
- '$BUILD_DIR/mongo/db/repl/replmocks',
- '$BUILD_DIR/mongo/db/service_context_d_test_fixture',
- ],
-)
-
env.Library(
target='user',
source=[
@@ -249,19 +224,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='security_key_test',
- source=[
- 'security_key_test.cpp',
- ],
- LIBDEPS=[
- 'auth',
- 'security_file',
- 'security_key',
- 'user',
- ],
-)
-
env.Library(
target='authservercommon',
source=[
@@ -324,7 +286,7 @@ env.Library(
'$BUILD_DIR/mongo/util/options_parser/options_parser',
'$BUILD_DIR/mongo/util/net/network',
],
-)
+)
env.Library(
target='saslauth',
@@ -348,16 +310,6 @@ env.Library(
],
)
-env.CppUnitTest(target='sasl_mechanism_registry_test',
- source=[
- 'sasl_mechanism_registry_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- 'authmocks',
- 'saslauth',
- ])
-
env.Library(
target='authmongod',
source=[
@@ -411,97 +363,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='action_set_test',
- source=[
- 'action_set_test.cpp'
- ],
- LIBDEPS=[
- 'auth',
- 'authmocks',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target='privilege_parser_test',
- source=[
- 'privilege_parser_test.cpp',
- ],
- LIBDEPS=[
- 'auth',
- 'authmocks',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target='role_graph_test',
- source=[
- 'role_graph_test.cpp',
- ],
- LIBDEPS=[
- 'auth',
- 'authmocks',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target='user_document_parser_test',
- source=[
- 'user_document_parser_test.cpp',
- ],
- LIBDEPS=[
- 'auth',
- 'authmocks',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target='user_set_test',
- source=[
- 'user_set_test.cpp',
- ],
- LIBDEPS=[
- 'auth',
- 'authmocks',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target='authorization_manager_test',
- source=[
- 'authorization_manager_test.cpp',
- ],
- LIBDEPS=[
- 'auth',
- 'authmocks',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- '$BUILD_DIR/mongo/transport/transport_layer_common',
- '$BUILD_DIR/mongo/transport/transport_layer_mock',
- ],
-)
-
-env.CppUnitTest(
- target='authorization_session_test',
- source=[
- 'authorization_session_test.cpp',
- 'authorization_session_for_test.cpp',
- ],
- LIBDEPS=[
- 'auth',
- 'authmocks',
- 'auth_impl_internal',
- 'saslauth',
- '$BUILD_DIR/mongo/db/pipeline/pipeline',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- '$BUILD_DIR/mongo/transport/transport_layer_mock',
- ],
-)
-
env.Library(
target='address_restriction',
source=[
@@ -517,29 +378,46 @@ env.Library(
)
env.CppUnitTest(
- target='address_restriction_test',
+ target='db_auth_test',
source=[
+ 'action_set_test.cpp',
'address_restriction_test.cpp',
+ 'auth_op_observer_test.cpp',
+ 'authorization_manager_test.cpp',
+ 'authorization_session_for_test.cpp',
+ 'authorization_session_test.cpp',
+ 'privilege_parser_test.cpp',
+ 'restriction_test.cpp',
+ 'role_graph_test.cpp',
+ 'sasl_authentication_session_test.cpp',
+ 'sasl_mechanism_registry_test.cpp',
+ 'sasl_scram_test.cpp',
+ 'security_key_test.cpp',
+ 'user_document_parser_test.cpp',
+ 'user_set_test.cpp',
],
LIBDEPS=[
- 'address_restriction',
'$BUILD_DIR/mongo/base',
+ '$BUILD_DIR/mongo/client/sasl_client',
+ '$BUILD_DIR/mongo/db/common',
+ '$BUILD_DIR/mongo/db/pipeline/pipeline',
+ '$BUILD_DIR/mongo/db/repl/oplog',
+ '$BUILD_DIR/mongo/db/repl/oplog_interface_local',
+ '$BUILD_DIR/mongo/db/repl/replmocks',
+ '$BUILD_DIR/mongo/db/service_context_d_test_fixture',
'$BUILD_DIR/mongo/db/service_context_test_fixture',
+ '$BUILD_DIR/mongo/transport/transport_layer_common',
+ '$BUILD_DIR/mongo/transport/transport_layer_mock',
'$BUILD_DIR/mongo/util/net/network',
- ],
-)
-
-env.CppUnitTest(
- target='sasl_scram_test',
- source=[
- 'sasl_authentication_session_test.cpp',
- 'sasl_scram_test.cpp',
- ],
- LIBDEPS_PRIVATE=[
+ 'address_restriction',
+ 'auth',
+ 'auth_impl_internal',
+ 'auth_op_observer',
+ 'authentication_restriction',
'authmocks',
'saslauth',
- '$BUILD_DIR/mongo/client/sasl_client',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
+ 'security_file',
+ 'security_key',
+ 'user',
],
)
-
diff --git a/src/mongo/db/bson/SConscript b/src/mongo/db/bson/SConscript
index e021674662f..eec3a4f5c3a 100644
--- a/src/mongo/db/bson/SConscript
+++ b/src/mongo/db/bson/SConscript
@@ -15,7 +15,7 @@ env.Library(
)
env.CppUnitTest(
- target="dotted_path_support_test",
+ target="db_bson_test",
source=[
"dotted_path_support_test.cpp",
],
diff --git a/src/mongo/db/catalog/SConscript b/src/mongo/db/catalog/SConscript
index 4de2692e67a..a25c8f9d6b8 100644
--- a/src/mongo/db/catalog/SConscript
+++ b/src/mongo/db/catalog/SConscript
@@ -25,9 +25,6 @@ env.Library(
],
)
-env.CppUnitTest('collection_options_test', ['collection_options_test.cpp'],
- LIBDEPS=['collection_options'])
-
env.Library(
target = 'catalog_test_fixture',
source =[
@@ -44,15 +41,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target = 'collection_test',
- source = 'collection_test.cpp',
- LIBDEPS=[
- 'catalog_test_fixture',
- '$BUILD_DIR/mongo/db/db_raii',
- ],
-)
-
env.Library(
target='document_validation',
source=[
@@ -73,14 +61,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='commit_quorum_options_test',
- source='commit_quorum_options_test.cpp',
- LIBDEPS=[
- 'commit_quorum_options',
- ],
-)
-
env.Library(
target='commit_quorum_idl',
source=[
@@ -104,17 +84,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='index_build_entry_test',
- source=[
- 'index_build_entry_test.cpp',
- ],
- LIBDEPS=[
- 'index_build_entry_idl',
- '$BUILD_DIR/mongo/unittest/unittest',
- ],
-)
-
env.Library(
target='health_log',
source=[
@@ -144,17 +113,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='index_builds_manager_test',
- source=[
- 'index_builds_manager_test.cpp',
- ],
- LIBDEPS=[
- 'catalog_test_fixture',
- 'index_builds_manager',
- ]
-)
-
env.Library(
target='disable_index_spec_namespace_generation',
source=[
@@ -185,20 +143,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='index_key_validate_test',
- source=[
- 'index_key_validate_test.cpp',
- 'index_spec_validate_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/commands/test_commands_enabled',
- '$BUILD_DIR/mongo/db/matcher/expressions',
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- 'index_key_validate',
- ],
-)
-
env.Library(
target='index_catalog',
source=[
@@ -246,26 +190,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='database_test',
- source=[
- 'database_test.cpp',
- ],
- LIBDEPS=[
- 'multi_index_block',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/concurrency/lock_manager',
- '$BUILD_DIR/mongo/db/db_raii',
- '$BUILD_DIR/mongo/db/namespace_string',
- '$BUILD_DIR/mongo/db/repl/drop_pending_collection_reaper',
- '$BUILD_DIR/mongo/db/repl/optime',
- '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface',
- '$BUILD_DIR/mongo/db/repl/replmocks',
- '$BUILD_DIR/mongo/db/s/op_observer_sharding_impl',
- '$BUILD_DIR/mongo/db/service_context_d_test_fixture',
- ],
-)
-
env.Library(
target='database_holder',
source=[
@@ -305,20 +229,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='multi_index_block_test',
- source=[
- 'multi_index_block_test.cpp'
- ],
- LIBDEPS=[
- 'collection',
- 'multi_index_block',
- '$BUILD_DIR/mongo/db/namespace_string',
- '$BUILD_DIR/mongo/db/repl/replmocks',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- ],
-)
-
env.Library(
target='collection_catalog',
source=[
@@ -346,20 +256,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='collection_catalog_test',
- source=[
- 'collection_catalog_test.cpp',
- ],
- LIBDEPS=[
- 'catalog_test_fixture',
- 'collection_catalog',
- 'collection_catalog_helper',
- '$BUILD_DIR/mongo/db/service_context',
- '$BUILD_DIR/mongo/db/storage/kv/kv_prefix',
- ],
-)
-
env.Library(
target='catalog_control',
source=[
@@ -375,19 +271,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='catalog_control_test',
- source=[
- 'catalog_control_test.cpp'
- ],
- LIBDEPS=[
- 'catalog_control',
- 'database_holder',
- '$BUILD_DIR/mongo/db/index_builds_coordinator_mongod',
- '$BUILD_DIR/mongo/db/service_context',
- ],
-)
-
env.Library(
target='catalog_impl',
source=[
@@ -475,78 +358,58 @@ env.Library(
)
env.CppUnitTest(
- target='capped_utils_test',
+ target='db_catalog_test',
source=[
'capped_utils_test.cpp',
- ],
- LIBDEPS=[
- 'catalog_helpers',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/db_raii',
- '$BUILD_DIR/mongo/db/namespace_string',
- '$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_d_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target='create_collection_test',
- source=[
+ 'catalog_control_test.cpp',
+ 'collection_catalog_test.cpp',
+ 'collection_options_test.cpp',
+ 'collection_test.cpp',
+ 'commit_quorum_options_test.cpp',
'create_collection_test.cpp',
- ],
- LIBDEPS=[
- 'catalog_helpers',
- 'collection_catalog',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/db_raii',
- '$BUILD_DIR/mongo/db/namespace_string',
- '$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_d_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target='rename_collection_test',
- source=[
+ 'database_test.cpp',
+ 'drop_database_test.cpp',
+ 'index_build_entry_test.cpp',
+ 'index_builds_manager_test.cpp',
+ 'index_key_validate_test.cpp',
+ 'index_spec_validate_test.cpp',
+ 'multi_index_block_test.cpp',
'rename_collection_test.cpp',
],
LIBDEPS=[
- 'catalog_helpers',
- 'database_holder',
'$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/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/s/op_observer_sharding_impl',
+ '$BUILD_DIR/mongo/db/service_context',
'$BUILD_DIR/mongo/db/service_context_d_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target='drop_database_test',
- source=[
- 'drop_database_test.cpp',
- ],
- LIBDEPS=[
+ '$BUILD_DIR/mongo/db/service_context_test_fixture',
+ '$BUILD_DIR/mongo/db/storage/kv/kv_prefix',
+ '$BUILD_DIR/mongo/unittest/unittest',
+ 'catalog_control',
'catalog_helpers',
+ 'catalog_test_fixture',
+ 'collection',
+ 'collection_catalog',
+ 'collection_catalog_helper',
+ 'collection_options',
+ 'commit_quorum_options',
'database_holder',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/db_raii',
- '$BUILD_DIR/mongo/db/namespace_string',
- '$BUILD_DIR/mongo/db/op_observer',
- '$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/service_context_d_test_fixture',
+ 'index_build_entry_idl',
+ 'index_builds_manager',
+ 'index_key_validate',
+ 'multi_index_block',
],
)
diff --git a/src/mongo/db/catalog/util/SConscript b/src/mongo/db/catalog/util/SConscript
index 320ea3396cf..e6f8b00c3c9 100644
--- a/src/mongo/db/catalog/util/SConscript
+++ b/src/mongo/db/catalog/util/SConscript
@@ -5,7 +5,7 @@ Import("env")
env = env.Clone()
env.CppUnitTest(
- target='partitioned_test',
+ target='db_catalog_util_test',
source=[
'partitioned_test.cpp'
],
diff --git a/src/mongo/db/commands/SConscript b/src/mongo/db/commands/SConscript
index 61c39a599cd..92f872ff445 100644
--- a/src/mongo/db/commands/SConscript
+++ b/src/mongo/db/commands/SConscript
@@ -470,61 +470,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="list_collections_filter_test",
- source=[
- "list_collections_filter_test.cpp"
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/commands/list_collections_filter',
- ],
-)
-
-env.CppUnitTest(
- target="index_filter_commands_test",
- source=[
- "index_filter_commands_test.cpp",
- ],
- LIBDEPS=[
- "$BUILD_DIR/mongo/db/auth/authmocks",
- "$BUILD_DIR/mongo/db/query/query_planner",
- "$BUILD_DIR/mongo/db/query/query_test_service_context",
- "$BUILD_DIR/mongo/db/service_context_d",
- "standalone",
- ],
-)
-
-env.CppUnitTest(
- target="mr_test",
- source=[
- "mr_test.cpp",
- ],
- LIBDEPS=[
- "$BUILD_DIR/mongo/db/auth/authmocks",
- "$BUILD_DIR/mongo/db/repl/drop_pending_collection_reaper",
- "$BUILD_DIR/mongo/db/repl/replmocks",
- "$BUILD_DIR/mongo/db/repl/storage_interface_impl",
- "$BUILD_DIR/mongo/db/service_context_d",
- "$BUILD_DIR/mongo/db/service_context_d_test_fixture",
- "mongod",
- "servers",
- ],
-)
-
-env.CppUnitTest(
- target="plan_cache_commands_test",
- source=[
- "plan_cache_commands_test.cpp",
- ],
- LIBDEPS=[
- "$BUILD_DIR/mongo/db/auth/authmocks",
- "$BUILD_DIR/mongo/db/query/query_planner",
- "$BUILD_DIR/mongo/db/query/query_test_service_context",
- "$BUILD_DIR/mongo/db/service_context_d",
- "standalone",
- ],
-)
-
env.Library(
target='txn_cmd_request',
source=[
@@ -553,3 +498,27 @@ if has_option('use-cpu-profiler'):
'$BUILD_DIR/mongo/mongod',
],
)
+
+env.CppUnitTest(
+ target="db_commands_test",
+ source=[
+ "index_filter_commands_test.cpp",
+ "list_collections_filter_test.cpp",
+ "mr_test.cpp",
+ "plan_cache_commands_test.cpp",
+ ],
+ LIBDEPS=[
+ "$BUILD_DIR/mongo/db/auth/authmocks",
+ "$BUILD_DIR/mongo/db/commands/list_collections_filter",
+ "$BUILD_DIR/mongo/db/query/query_planner",
+ "$BUILD_DIR/mongo/db/query/query_test_service_context",
+ "$BUILD_DIR/mongo/db/repl/drop_pending_collection_reaper",
+ "$BUILD_DIR/mongo/db/repl/replmocks",
+ "$BUILD_DIR/mongo/db/repl/storage_interface_impl",
+ "$BUILD_DIR/mongo/db/service_context_d",
+ "$BUILD_DIR/mongo/db/service_context_d_test_fixture",
+ "mongod",
+ "servers",
+ "standalone",
+ ],
+)
diff --git a/src/mongo/db/concurrency/SConscript b/src/mongo/db/concurrency/SConscript
index 558dff39364..752fe830f1f 100644
--- a/src/mongo/db/concurrency/SConscript
+++ b/src/mongo/db/concurrency/SConscript
@@ -79,12 +79,13 @@ env.Benchmark(
])
env.CppUnitTest(
- target='lock_manager_test',
- source=['d_concurrency_test.cpp',
- 'fast_map_noalloc_test.cpp',
- 'lock_manager_test.cpp',
- 'lock_state_test.cpp',
- 'lock_stats_test.cpp',
+ target='db_concurrency_test',
+ source=[
+ 'd_concurrency_test.cpp',
+ 'fast_map_noalloc_test.cpp',
+ 'lock_manager_test.cpp',
+ 'lock_state_test.cpp',
+ 'lock_stats_test.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/auth/authmocks',
diff --git a/src/mongo/db/exec/SConscript b/src/mongo/db/exec/SConscript
index a7cee4d1ebe..a790d0e21a1 100644
--- a/src/mongo/db/exec/SConscript
+++ b/src/mongo/db/exec/SConscript
@@ -18,16 +18,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target = "working_set_test",
- source = [
- "working_set_test.cpp"
- ],
- LIBDEPS = [
- "working_set",
- ],
-)
-
env.Library(
target = "scoped_timer",
source = [
@@ -53,56 +43,26 @@ env.Library(
)
env.CppUnitTest(
- target = "queued_data_stage_test",
- source = [
+ target='db_exec_test',
+ source=[
+ "projection_exec_agg_test.cpp",
+ "projection_exec_test.cpp",
"queued_data_stage_test.cpp",
- ],
- LIBDEPS = [
- "$BUILD_DIR/mongo/db/auth/authmocks",
- "$BUILD_DIR/mongo/db/query_exec",
- "$BUILD_DIR/mongo/db/service_context_d_test_fixture",
- "$BUILD_DIR/mongo/dbtests/mocklib",
- "$BUILD_DIR/mongo/util/clock_source_mock",
- ],
-)
-
-env.CppUnitTest(
- target = "sort_test",
- source = [
"sort_test.cpp",
+ "working_set_test.cpp",
],
- LIBDEPS = [
+ LIBDEPS=[
+ "$BUILD_DIR/mongo/base",
"$BUILD_DIR/mongo/db/auth/authmocks",
- "$BUILD_DIR/mongo/db/query_exec",
- "$BUILD_DIR/mongo/db/service_context_d_test_fixture",
- "$BUILD_DIR/mongo/dbtests/mocklib",
+ "$BUILD_DIR/mongo/db/projection_exec_agg",
"$BUILD_DIR/mongo/db/query/collation/collator_factory_mock",
"$BUILD_DIR/mongo/db/query/collation/collator_interface_mock",
- "$BUILD_DIR/mongo/util/clock_source_mock",
- ],
-)
-
-env.CppUnitTest(
- target = "projection_exec_test",
- source = [
- "projection_exec_test.cpp",
- ],
- LIBDEPS = [
- "$BUILD_DIR/mongo/db/auth/authmocks",
- "$BUILD_DIR/mongo/db/query_exec",
- "$BUILD_DIR/mongo/db/query/collation/collator_interface_mock",
"$BUILD_DIR/mongo/db/query/query_test_service_context",
+ "$BUILD_DIR/mongo/db/query_exec",
"$BUILD_DIR/mongo/db/service_context_d",
- ],
-)
-
-env.CppUnitTest(
- target='projection_exec_agg_test',
- source=[
- 'projection_exec_agg_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- '$BUILD_DIR/mongo/db/projection_exec_agg',
+ "$BUILD_DIR/mongo/db/service_context_d_test_fixture",
+ "$BUILD_DIR/mongo/dbtests/mocklib",
+ "$BUILD_DIR/mongo/util/clock_source_mock",
+ "working_set",
],
)
diff --git a/src/mongo/db/free_mon/SConscript b/src/mongo/db/free_mon/SConscript
index cc266679206..41afebd22e3 100644
--- a/src/mongo/db/free_mon/SConscript
+++ b/src/mongo/db/free_mon/SConscript
@@ -70,7 +70,7 @@ else:
fmEnv.CppUnitTest(
- target='free_mon_test',
+ target='db_free_mon_test',
source=[
'free_mon_controller_test.cpp',
'free_mon_queue_test.cpp',
diff --git a/src/mongo/db/ftdc/SConscript b/src/mongo/db/ftdc/SConscript
index 45852f61159..fbe7aa01fea 100644
--- a/src/mongo/db/ftdc/SConscript
+++ b/src/mongo/db/ftdc/SConscript
@@ -92,7 +92,7 @@ env.Library(
)
env.CppUnitTest(
- target='ftdc_test',
+ target='db_ftdc_test',
source=[
'compressor_test.cpp',
'controller_test.cpp',
diff --git a/src/mongo/db/fts/SConscript b/src/mongo/db/fts/SConscript
index 72d3ca6aff8..219871dadf5 100644
--- a/src/mongo/db/fts/SConscript
+++ b/src/mongo/db/fts/SConscript
@@ -79,26 +79,27 @@ env.Library('ftsmongod', [
'ftsmongod.cpp',
], LIBDEPS=["base_fts","$BUILD_DIR/mongo/base"])
-env.CppUnitTest(target='fts_test',
- source=[
- "fts_basic_phrase_matcher_test.cpp",
- "fts_basic_tokenizer_test.cpp",
- "fts_element_iterator_test.cpp",
- "fts_index_format_test.cpp",
- "fts_language_test.cpp",
- "fts_matcher_test.cpp",
- "fts_query_impl_test.cpp",
- "fts_query_noop_test.cpp",
- "fts_spec_test.cpp",
- "fts_unicode_phrase_matcher_test.cpp",
- "fts_unicode_tokenizer_test.cpp",
- "stemmer_test.cpp",
- "stop_words_test.cpp",
- "tokenizer_test.cpp",
- ],
- LIBDEPS=[
- "$BUILD_DIR/mongo/db/fts/fts_query_noop",
- "$BUILD_DIR/mongo/db/matcher/expressions",
- "base_fts",
- ],
+env.CppUnitTest(
+ target='db_fts_test',
+ source=[
+ "fts_basic_phrase_matcher_test.cpp",
+ "fts_basic_tokenizer_test.cpp",
+ "fts_element_iterator_test.cpp",
+ "fts_index_format_test.cpp",
+ "fts_language_test.cpp",
+ "fts_matcher_test.cpp",
+ "fts_query_impl_test.cpp",
+ "fts_query_noop_test.cpp",
+ "fts_spec_test.cpp",
+ "fts_unicode_phrase_matcher_test.cpp",
+ "fts_unicode_tokenizer_test.cpp",
+ "stemmer_test.cpp",
+ "stop_words_test.cpp",
+ "tokenizer_test.cpp",
+ ],
+ LIBDEPS=[
+ "$BUILD_DIR/mongo/db/fts/fts_query_noop",
+ "$BUILD_DIR/mongo/db/matcher/expressions",
+ "base_fts",
+ ],
)
diff --git a/src/mongo/db/fts/unicode/SConscript b/src/mongo/db/fts/unicode/SConscript
index 32ad0b92417..85f71077606 100644
--- a/src/mongo/db/fts/unicode/SConscript
+++ b/src/mongo/db/fts/unicode/SConscript
@@ -38,8 +38,8 @@ env.Command(
env.Alias('generated-sources', "codepoints_diacritic_list.cpp")
env.Library(
- target='unicode',
- source=[
+ target='unicode',
+ source=[
'codepoints_casefold.cpp',
'codepoints_delimiter_list.cpp',
'codepoints_diacritic_list.cpp',
@@ -53,30 +53,13 @@ env.Library(
)
env.CppUnitTest(
- target='string_test',
+ target='db_fts_unicode_test',
source=[
- 'string_test.cpp'
+ 'byte_vector_test.cpp',
+ 'codepoints_test.cpp',
+ 'string_test.cpp',
],
LIBDEPS=[
- 'unicode',
- ]
-)
-
-env.CppUnitTest(
- target='codepoints_test',
- source=[
- 'codepoints_test.cpp'
+ 'unicode',
],
- LIBDEPS=[
- 'unicode',
- ]
-)
-
-env.CppUnitTest(
- target='byte_vector_test',
- source=[
- 'byte_vector_test.cpp'
- ],
- LIBDEPS=[
- ]
)
diff --git a/src/mongo/db/geo/SConscript b/src/mongo/db/geo/SConscript
index 83a185ec13c..0feb1e4888a 100644
--- a/src/mongo/db/geo/SConscript
+++ b/src/mongo/db/geo/SConscript
@@ -21,19 +21,17 @@ env.Library("geoparser", [ "geoparser.cpp",
"$BUILD_DIR/mongo/db/bson/dotted_path_support",
"$BUILD_DIR/third_party/s2/s2" ])
-env.CppUnitTest("hash_test", [ "hash_test.cpp" ],
- LIBDEPS = ["geometry",
- "$BUILD_DIR/mongo/db/common" ]) # db/common needed for field parsing
-
-env.CppUnitTest("geoparser_test", [ "geoparser_test.cpp" ],
- LIBDEPS = [ "geoparser",
- "$BUILD_DIR/mongo/db/common" ]) # db/common needed for field parsing
-
-env.CppUnitTest("r2_region_coverer_test", [ "r2_region_coverer_test.cpp" ],
- LIBDEPS = [ "geometry",
- "geoparser",
- "$BUILD_DIR/mongo/db/common" ]) # db/common needed for field parsing
-
-env.CppUnitTest("big_polygon_test", [ "big_polygon_test.cpp" ],
- LIBDEPS = [ "geometry",
- "$BUILD_DIR/mongo/db/common" ]) # db/common needed for field parsing
+env.CppUnitTest(
+ target="db_geo_test",
+ source=[
+ "hash_test.cpp",
+ "big_polygon_test.cpp",
+ "geoparser_test.cpp",
+ "r2_region_coverer_test.cpp",
+ ],
+ LIBDEPS=[
+ "geometry",
+ "geoparser",
+ "$BUILD_DIR/mongo/db/common"
+ ]
+)
diff --git a/src/mongo/db/index/SConscript b/src/mongo/db/index/SConscript
index b9e79ee6116..1760685c85d 100644
--- a/src/mongo/db/index/SConscript
+++ b/src/mongo/db/index/SConscript
@@ -75,24 +75,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='key_generator_test',
- source=[
- '2d_key_generator_test.cpp',
- 'btree_key_generator_test.cpp',
- 'hash_key_generator_test.cpp',
- 's2_key_generator_test.cpp',
- 'sort_key_generator_test.cpp',
- 'wildcard_key_generator_test.cpp',
- ],
- LIBDEPS=[
- 'key_generator',
- "$BUILD_DIR/mongo/db/matcher/expressions",
- '$BUILD_DIR/mongo/db/mongohasher',
- '$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
- ],
-)
-
env.Library(
target='index_access_method_factory',
source=[
@@ -165,3 +147,21 @@ env.Library(
'index_access_methods',
],
)
+
+env.CppUnitTest(
+ target='db_index_test',
+ source=[
+ '2d_key_generator_test.cpp',
+ 'btree_key_generator_test.cpp',
+ 'hash_key_generator_test.cpp',
+ 's2_key_generator_test.cpp',
+ 'sort_key_generator_test.cpp',
+ 'wildcard_key_generator_test.cpp',
+ ],
+ LIBDEPS=[
+ 'key_generator',
+ "$BUILD_DIR/mongo/db/matcher/expressions",
+ '$BUILD_DIR/mongo/db/mongohasher',
+ '$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
+ ],
+)
diff --git a/src/mongo/db/matcher/SConscript b/src/mongo/db/matcher/SConscript
index 30531150031..0bdd51b8c07 100644
--- a/src/mongo/db/matcher/SConscript
+++ b/src/mongo/db/matcher/SConscript
@@ -16,16 +16,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='path_test',
- source=[
- 'path_test.cpp',
- ],
- LIBDEPS=[
- 'path',
- ],
-)
-
env.Library(
target='expressions',
source=[
@@ -85,27 +75,28 @@ env.Library(
],
)
-env.CppUnitTest(
- target='encrypt_schema_types_test',
+env.Library(
+ target='expressions_mongod_only',
source=[
- 'schema/encrypt_schema_types_test.cpp'
+ 'extensions_callback_real.cpp',
+ 'expression_text.cpp',
+ 'expression_where.cpp',
],
LIBDEPS=[
+ '$BUILD_DIR/mongo/db/concurrency/lock_manager',
+ '$BUILD_DIR/mongo/db/fts/base_fts',
+ '$BUILD_DIR/mongo/scripting/scripting_server',
'expressions',
+ '$BUILD_DIR/mongo/db/catalog/collection',
+ '$BUILD_DIR/mongo/db/catalog/index_catalog',
+ '$BUILD_DIR/mongo/db/catalog_raii',
],
)
env.CppUnitTest(
- target='json_pointer_test',
- source=['schema/json_pointer_test.cpp'],
- LIBDEPS=[
- 'expressions'
- ]
-)
-
-env.CppUnitTest(
- target='expression_test',
+ target='db_matcher_test',
source=[
+ 'expression_algo_test.cpp',
'expression_always_boolean_test.cpp',
'expression_array_test.cpp',
'expression_expr_test.cpp',
@@ -113,12 +104,21 @@ env.CppUnitTest(
'expression_internal_expr_eq_test.cpp',
'expression_leaf_test.cpp',
'expression_optimize_test.cpp',
+ 'expression_parser_array_test.cpp',
'expression_parser_geo_test.cpp',
+ 'expression_parser_leaf_test.cpp',
+ 'expression_parser_test.cpp',
+ 'expression_parser_tree_test.cpp',
+ 'expression_serialization_test.cpp',
'expression_test.cpp',
'expression_tree_test.cpp',
'expression_type_test.cpp',
'expression_with_placeholder_test.cpp',
+ 'matcher_type_set_test.cpp',
'path_accepting_keyword_test.cpp',
+ 'path_test.cpp',
+ 'rewrite_expr_test.cpp',
+ 'schema/encrypt_schema_types_test.cpp',
'schema/expression_internal_schema_all_elem_match_from_index_test.cpp',
'schema/expression_internal_schema_allowed_properties_test.cpp',
'schema/expression_internal_schema_cond_test.cpp',
@@ -135,71 +135,15 @@ env.CppUnitTest(
'schema/expression_internal_schema_root_doc_eq_test.cpp',
'schema/expression_internal_schema_unique_items_test.cpp',
'schema/expression_internal_schema_xor_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
- '$BUILD_DIR/mongo/db/query/query_planner',
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- 'expressions',
- ],
-)
-
-env.CppUnitTest(
- target='expression_parser_test',
- source=[
- 'expression_parser_array_test.cpp',
- 'expression_parser_leaf_test.cpp',
- 'expression_parser_test.cpp',
- 'expression_parser_tree_test.cpp',
- 'matcher_type_set_test.cpp',
'schema/expression_parser_schema_test.cpp',
+ 'schema/json_pointer_test.cpp',
'schema/json_schema_parser_test.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
+ '$BUILD_DIR/mongo/db/query/query_planner',
'$BUILD_DIR/mongo/db/query/query_test_service_context',
'expressions',
- ],
-)
-
-env.CppUnitTest(
- target='expression_algo_test',
- source=[
- 'expression_algo_test.cpp',
- 'rewrite_expr_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- 'expressions',
- ],
-)
-
-env.Library(
- target='expressions_mongod_only',
- source=[
- 'extensions_callback_real.cpp',
- 'expression_text.cpp',
- 'expression_where.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/concurrency/lock_manager',
- '$BUILD_DIR/mongo/db/fts/base_fts',
- '$BUILD_DIR/mongo/scripting/scripting_server',
- 'expressions',
- '$BUILD_DIR/mongo/db/catalog/collection',
- '$BUILD_DIR/mongo/db/catalog/index_catalog',
- '$BUILD_DIR/mongo/db/catalog_raii',
- ],
-)
-
-env.CppUnitTest(
- target='expression_serialization_test',
- source=[
- 'expression_serialization_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- 'expressions',
+ 'path',
],
)
diff --git a/src/mongo/db/ops/SConscript b/src/mongo/db/ops/SConscript
index 6ca1e089132..d23505ba751 100644
--- a/src/mongo/db/ops/SConscript
+++ b/src/mongo/db/ops/SConscript
@@ -63,16 +63,24 @@ env.Library(
)
env.CppUnitTest(
- target='write_ops_parsers_test',
- source='write_ops_parsers_test.cpp',
+ target='db_ops_test',
+ source=[
+ 'write_ops_parsers_test.cpp',
+ 'write_ops_retryability_test.cpp',
+ ],
LIBDEPS=[
+ '$BUILD_DIR/mongo/db/auth/authmocks',
+ '$BUILD_DIR/mongo/db/query_exec',
+ '$BUILD_DIR/mongo/db/repl/mock_repl_coord_server_fixture',
+ '$BUILD_DIR/mongo/db/repl/oplog_entry',
+ '$BUILD_DIR/mongo/db/write_ops',
'write_ops_parsers',
'write_ops_parsers_test_helpers',
],
)
env.CppIntegrationTest(
- target='write_ops_document_stream_integration_test',
+ target='db_ops_integration_test',
source='write_ops_document_stream_integration_test.cpp',
LIBDEPS=[
'$BUILD_DIR/mongo/client/clientdriver_network',
@@ -80,15 +88,3 @@ env.CppIntegrationTest(
'$BUILD_DIR/mongo/util/version_impl',
],
)
-
-env.CppUnitTest(
- target='write_ops_retryability_test',
- source='write_ops_retryability_test.cpp',
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/query_exec',
- '$BUILD_DIR/mongo/db/repl/mock_repl_coord_server_fixture',
- '$BUILD_DIR/mongo/db/repl/oplog_entry',
- '$BUILD_DIR/mongo/db/write_ops',
- ],
-)
diff --git a/src/mongo/db/pipeline/SConscript b/src/mongo/db/pipeline/SConscript
index f425c77be64..e2f5c372b31 100644
--- a/src/mongo/db/pipeline/SConscript
+++ b/src/mongo/db/pipeline/SConscript
@@ -26,14 +26,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='field_path_test',
- source='field_path_test.cpp',
- LIBDEPS=[
- 'field_path',
- ],
- )
-
env.Library(
target='document_value',
source=[
@@ -62,22 +54,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='document_value_test',
- source=[
- 'document_comparator_test.cpp',
- 'document_value_test.cpp',
- 'document_path_support_test.cpp',
- 'document_value_test_util_self_test.cpp',
- 'value_comparator_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
- 'document_value',
- 'document_value_test_util',
- ],
- )
-
env.Library(
target='aggregation_request',
source=[
@@ -97,15 +73,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='aggregation_request_test',
- source='aggregation_request_test.cpp',
- LIBDEPS=[
- 'aggregation_request',
- 'document_value_test_util',
- ],
-)
-
env.Library(
target='expression_context',
source=[
@@ -209,70 +176,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='document_source_test',
- source=[
- 'document_source_add_fields_test.cpp',
- 'document_source_bucket_auto_test.cpp',
- 'document_source_bucket_test.cpp',
- 'document_source_change_stream_test.cpp',
- 'document_source_check_resume_token_test.cpp',
- 'document_source_count_test.cpp',
- 'document_source_current_op_test.cpp',
- 'document_source_exchange_test.cpp',
- 'document_source_geo_near_test.cpp',
- 'document_source_graph_lookup_test.cpp',
- 'document_source_group_test.cpp',
- 'document_source_internal_split_pipeline_test.cpp',
- 'document_source_limit_test.cpp',
- 'document_source_lookup_change_post_image_test.cpp',
- 'document_source_lookup_test.cpp',
- 'document_source_match_test.cpp',
- 'document_source_merge_cursors_test.cpp',
- 'document_source_merge_test.cpp',
- 'document_source_mock_test.cpp',
- 'document_source_out_test.cpp',
- 'document_source_plan_cache_stats_test.cpp',
- 'document_source_project_test.cpp',
- 'document_source_redact_test.cpp',
- 'document_source_replace_root_test.cpp',
- 'document_source_sample_test.cpp',
- 'document_source_internal_shard_filter_test.cpp',
- 'document_source_skip_test.cpp',
- 'document_source_sort_by_count_test.cpp',
- 'document_source_sort_test.cpp',
- 'document_source_test.cpp',
- 'document_source_unwind_test.cpp',
- 'sequential_document_cache_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/repl/oplog_entry',
- '$BUILD_DIR/mongo/db/repl/replmocks',
- '$BUILD_DIR/mongo/db/service_context',
- '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
- '$BUILD_DIR/mongo/s/query/router_exec_stage',
- '$BUILD_DIR/mongo/s/sharding_router_test_fixture',
- '$BUILD_DIR/mongo/util/clock_source_mock',
- 'document_source_mock',
- 'document_value_test_util',
- 'pipeline',
- ],
-)
-
-env.CppUnitTest(
- target='document_source_facet_test',
- source='document_source_facet_test.cpp',
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- '$BUILD_DIR/mongo/s/is_mongos',
- 'pipeline',
- 'document_source_mock',
- 'document_value_test_util',
- ],
-)
-
env.Library(
target='lite_parsed_document_source',
source=[
@@ -459,76 +362,6 @@ pipelineeEnv.Library(
]
)
-env.CppUnitTest(
- target='tee_buffer_test',
- source='tee_buffer_test.cpp',
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/s/is_mongos',
- 'document_source_mock',
- 'document_value_test_util',
- ],
-)
-
-env.CppUnitTest(
- target='agg_expression_test',
- source=[
- 'expression_convert_test.cpp',
- 'expression_date_test.cpp',
- 'expression_test.cpp',
- 'expression_trigonometric_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- 'accumulator',
- 'document_value_test_util',
- 'expression',
- ],
- )
-
-env.CppUnitTest(
- target='accumulator_test',
- source='accumulator_test.cpp',
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- 'accumulator',
- 'document_value_test_util',
- ],
- )
-
-env.CppUnitTest(
- target='pipeline_test',
- source=[
- 'dependencies_test.cpp',
- 'pipeline_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
- '$BUILD_DIR/mongo/db/repl/replmocks',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- '$BUILD_DIR/mongo/s/is_mongos',
- '$BUILD_DIR/mongo/s/query/cluster_aggregate',
- 'document_source_mock',
- 'document_value_test_util',
- 'pipeline',
- ],
- )
-
-env.CppUnitTest(
- target='lookup_set_cache_test',
- source=[
- 'lookup_set_cache_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- '$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
- 'document_value',
- ]
-)
-
env.Library(
target='parsed_aggregation_projection',
source=[
@@ -545,58 +378,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='parsed_exclusion_projection_test',
- source='parsed_exclusion_projection_test.cpp',
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- 'document_value_test_util',
- 'parsed_aggregation_projection',
- ],
-)
-
-env.CppUnitTest(
- target='parsed_aggregation_projection_test',
- source='parsed_aggregation_projection_test.cpp',
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- 'parsed_aggregation_projection',
- ],
-)
-
-env.CppUnitTest(
- target='parsed_inclusion_projection_test',
- source='parsed_inclusion_projection_test.cpp',
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- 'document_value_test_util',
- 'parsed_aggregation_projection',
- ],
-)
-
-env.CppUnitTest(
- target='granularity_rounder_test',
- source=[
- 'granularity_rounder_powers_of_two_test.cpp',
- 'granularity_rounder_preferred_numbers_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- 'document_value_test_util',
- 'granularity_rounder',
- ],
-)
-
-env.CppUnitTest(
- target='parsed_add_fields_test',
- source='parsed_add_fields_test.cpp',
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- 'document_value_test_util',
- 'parsed_aggregation_projection',
- ],
-)
-
env.Library(
target='runtime_constants_idl',
source=[
@@ -631,44 +412,99 @@ env.Library(
)
env.CppUnitTest(
- target='resume_token_test',
- source='resume_token_test.cpp',
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- 'document_sources_idl',
- ],
-)
-
-env.CppUnitTest(
- target='pipeline_metadata_tree_test',
- source='pipeline_metadata_tree_test.cpp',
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- 'pipeline',
- ],
-)
-
-env.CppUnitTest(
- target='expression_walker_test',
- source='expression_walker_test.cpp',
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- 'expression',
- ],
-)
-
-env.CppUnitTest(
- target='process_interface_test',
+ target='db_pipeline_test',
source=[
+ 'accumulator_test.cpp',
+ 'aggregation_request_test.cpp',
+ 'dependencies_test.cpp',
+ 'document_comparator_test.cpp',
+ 'document_path_support_test.cpp',
+ 'document_source_add_fields_test.cpp',
+ 'document_source_bucket_auto_test.cpp',
+ 'document_source_bucket_test.cpp',
+ 'document_source_change_stream_test.cpp',
+ 'document_source_check_resume_token_test.cpp',
+ 'document_source_count_test.cpp',
+ 'document_source_current_op_test.cpp',
+ 'document_source_exchange_test.cpp',
+ 'document_source_facet_test.cpp',
+ 'document_source_geo_near_test.cpp',
+ 'document_source_graph_lookup_test.cpp',
+ 'document_source_group_test.cpp',
+ 'document_source_internal_shard_filter_test.cpp',
+ 'document_source_internal_split_pipeline_test.cpp',
+ 'document_source_limit_test.cpp',
+ 'document_source_lookup_change_post_image_test.cpp',
+ 'document_source_lookup_test.cpp',
+ 'document_source_match_test.cpp',
+ 'document_source_merge_cursors_test.cpp',
+ 'document_source_merge_test.cpp',
+ 'document_source_mock_test.cpp',
+ 'document_source_out_test.cpp',
+ 'document_source_plan_cache_stats_test.cpp',
+ 'document_source_project_test.cpp',
+ 'document_source_redact_test.cpp',
+ 'document_source_replace_root_test.cpp',
+ 'document_source_sample_test.cpp',
+ 'document_source_skip_test.cpp',
+ 'document_source_sort_by_count_test.cpp',
+ 'document_source_sort_test.cpp',
+ 'document_source_test.cpp',
+ 'document_source_unwind_test.cpp',
+ 'document_value_test.cpp',
+ 'document_value_test_util_self_test.cpp',
+ 'expression_convert_test.cpp',
+ 'expression_date_test.cpp',
+ 'expression_test.cpp',
+ 'expression_trigonometric_test.cpp',
+ 'expression_walker_test.cpp',
+ 'field_path_test.cpp',
+ 'granularity_rounder_powers_of_two_test.cpp',
+ 'granularity_rounder_preferred_numbers_test.cpp',
+ 'lookup_set_cache_test.cpp',
'mongos_process_interface_test.cpp',
- 'process_interface_standalone_test.cpp'
+ 'parsed_add_fields_test.cpp',
+ 'parsed_aggregation_projection_test.cpp',
+ 'parsed_exclusion_projection_test.cpp',
+ 'parsed_inclusion_projection_test.cpp',
+ 'pipeline_metadata_tree_test.cpp',
+ 'pipeline_test.cpp',
+ 'process_interface_standalone_test.cpp',
+ 'resume_token_test.cpp',
+ 'sequential_document_cache_test.cpp',
+ 'tee_buffer_test.cpp',
+ 'value_comparator_test.cpp',
],
LIBDEPS=[
+ '$BUILD_DIR/mongo/base',
+ '$BUILD_DIR/mongo/db/auth/authmocks',
+ '$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
+ '$BUILD_DIR/mongo/db/query/query_test_service_context',
+ '$BUILD_DIR/mongo/db/repl/oplog_entry',
+ '$BUILD_DIR/mongo/db/repl/replmocks',
+ '$BUILD_DIR/mongo/db/service_context',
'$BUILD_DIR/mongo/db/service_context_test_fixture',
+ '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
+ '$BUILD_DIR/mongo/s/is_mongos',
+ '$BUILD_DIR/mongo/s/query/cluster_aggregate',
+ '$BUILD_DIR/mongo/s/query/router_exec_stage',
+ '$BUILD_DIR/mongo/s/sharding_router_test_fixture',
+ '$BUILD_DIR/mongo/util/clock_source_mock',
+ 'accumulator',
+ 'aggregation_request',
+ 'document_source_mock',
+ 'document_sources_idl',
+ 'document_value',
+ 'document_value_test_util',
+ 'expression',
+ 'field_path',
+ 'granularity_rounder',
'mongo_process_common',
'mongo_process_interface',
'mongos_process_interface',
+ 'parsed_aggregation_projection',
+ 'pipeline',
'process_interface_shardsvr',
- 'process_interface_standalone'
- ],
- )
+ 'process_interface_standalone',
+ ],
+)
diff --git a/src/mongo/db/query/SConscript b/src/mongo/db/query/SConscript
index a2183a6f2fb..4c844376219 100644
--- a/src/mongo/db/query/SConscript
+++ b/src/mongo/db/query/SConscript
@@ -57,16 +57,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="query_settings_test",
- source=[
- "query_settings_test.cpp",
- ],
- LIBDEPS=[
- "query_planner"
- ]
-)
-
env.Library(
target='distinct_command_idl',
source=[
@@ -77,17 +67,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="count_command_test",
- source=[
- "count_command_test.cpp",
- ],
- LIBDEPS=[
- "command_request_response",
- "$BUILD_DIR/mongo/db/pipeline/aggregation_request",
- ]
-)
-
# Shared mongod/mongos query code.
env.Library(
target="query_common",
@@ -118,42 +97,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="explain_options_test",
- source=[
- "explain_options_test.cpp",
- ],
- LIBDEPS=[
- "explain_options",
- ],
-)
-
-env.CppUnitTest(
- target="parsed_distinct_test",
- source=[
- "parsed_distinct_test.cpp",
- ],
- LIBDEPS=[
- "$BUILD_DIR/mongo/db/pipeline/aggregation_request",
- "query_test_service_context",
- "query_common",
- ],
-)
-
-env.CppUnitTest(
- target="get_executor_test",
- source=[
- "get_executor_test.cpp"
- ],
- LIBDEPS=[
- "query_test_service_context",
- "$BUILD_DIR/mongo/db/auth/authmocks",
- "$BUILD_DIR/mongo/db/query_exec",
- "$BUILD_DIR/mongo/db/service_context_d",
- "$BUILD_DIR/mongo/dbtests/mocklib",
- ],
-)
-
env.Library(
target='command_request_response',
source=[
@@ -183,23 +126,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='command_request_response_test',
- source=[
- 'cursor_response_test.cpp',
- 'find_and_modify_request_test.cpp',
- 'getmore_request_test.cpp',
- 'killcursors_request_test.cpp',
- 'killcursors_response_test.cpp',
- 'view_response_formatter_test.cpp',
- ],
- LIBDEPS=[
- "$BUILD_DIR/mongo/db/pipeline/aggregation_request",
- '$BUILD_DIR/mongo/rpc/rpc',
- 'command_request_response',
- ]
-)
-
env.Library(
target="query_request",
source=[
@@ -274,170 +200,60 @@ env.Library(
)
env.CppUnitTest(
- target="hint_parser_test",
- source=[
- "hint_parser_test.cpp"
- ],
- LIBDEPS=[
- "hint_parser",
- ],
-)
-
-env.CppUnitTest(
- target="canonical_query_test",
- source=[
- "canonical_query_test.cpp"
- ],
- LIBDEPS=[
- "collation/collator_interface_mock",
- "query_planner",
- "query_test_service_context",
- ],
-)
-
-env.CppUnitTest(
- target="canonical_query_encoder_test",
- source=[
- "canonical_query_encoder_test.cpp"
- ],
- LIBDEPS=[
- "query_planner",
- "query_test_service_context",
- ],
-)
-
-env.CppUnitTest(
- target="index_bounds_test",
+ target="db_query_test",
source=[
+ "canonical_query_encoder_test.cpp",
+ "canonical_query_test.cpp",
+ "count_command_test.cpp",
+ "cursor_response_test.cpp",
+ "explain_options_test.cpp",
+ "find_and_modify_request_test.cpp",
+ "get_executor_test.cpp",
+ "getmore_request_test.cpp",
+ "hint_parser_test.cpp",
"index_bounds_builder_test.cpp",
"index_bounds_test.cpp",
"index_entry_test.cpp",
- "interval_test.cpp"
- ],
- LIBDEPS=[
- "collation/collator_interface_mock",
- "query_planner",
- "query_test_service_context",
- ],
-)
-
-env.CppUnitTest(
- target="query_request_test",
- source=[
- "query_request_test.cpp"
- ],
- LIBDEPS=[
- "$BUILD_DIR/mongo/db/pipeline/aggregation_request",
- "$BUILD_DIR/mongo/db/concurrency/lock_manager",
- "$BUILD_DIR/mongo/db/service_context_test_fixture",
- "query_request",
- ],
-)
-
-env.CppUnitTest(
- target="lru_key_value_test",
- source=[
+ "interval_test.cpp",
+ "killcursors_request_test.cpp",
+ "killcursors_response_test.cpp",
"lru_key_value_test.cpp",
- ],
- LIBDEPS=[
- ],
-)
-
-env.CppUnitTest(
- target="parsed_projection_test",
- source=[
- "parsed_projection_test.cpp"
- ],
- LIBDEPS=[
- "query_planner",
- "query_test_service_context",
- ],
-)
-
-env.CppUnitTest(
- target="plan_cache_test",
- source=[
- "plan_cache_test.cpp"
- ],
- LIBDEPS=[
- "query_planner_test_fixture",
- "query_test_service_context",
- ],
-)
-
-env.CppUnitTest(
- target="plan_cache_indexability_test",
- source=[
- "plan_cache_indexability_test.cpp"
- ],
- LIBDEPS=[
- "collation/collator_interface_mock",
- "query_planner",
- "query_test_service_context",
- ],
-)
-
-env.CppUnitTest(
- target="planner_analysis_test",
- source=[
- "planner_analysis_test.cpp"
- ],
- LIBDEPS=[
- "query_planner",
- ],
-)
-
-env.CppUnitTest(
- target="planner_ixselect_test",
- source=[
- "planner_ixselect_test.cpp"
- ],
- LIBDEPS=[
- "collation/collator_interface_mock",
- "query_planner",
- "query_test_service_context",
- ],
-)
-
-env.CppUnitTest(
- target="query_planner_test",
- source=[
+ "parsed_distinct_test.cpp",
+ "parsed_projection_test.cpp",
+ "plan_cache_indexability_test.cpp",
+ "plan_cache_test.cpp",
+ "planner_analysis_test.cpp",
+ "planner_ixselect_test.cpp",
"query_planner_array_test.cpp",
"query_planner_collation_test.cpp",
"query_planner_geo_test.cpp",
"query_planner_partialidx_test.cpp",
"query_planner_test.cpp",
+ "query_planner_text_test.cpp",
"query_planner_wildcard_index_test.cpp",
- ],
- LIBDEPS=[
- "collation/collator_interface_mock",
- "query_planner_test_fixture",
- ],
-)
-
-env.CppUnitTest(
- target="query_solution_test",
- source=[
+ "query_request_test.cpp",
+ "query_settings_test.cpp",
"query_solution_test.cpp",
+ "view_response_formatter_test.cpp",
],
LIBDEPS=[
- "collation/collator_factory_mock",
- "query_planner",
- "query_test_service_context",
- ],
-)
-
-# $text pulls in a lot of stuff so we test it here.
-env.CppUnitTest(
- target="query_planner_text_test",
- source=[
- "query_planner_text_test.cpp"
- ],
- LIBDEPS=[
- "query_planner_test_fixture",
"$BUILD_DIR/mongo/db/auth/authmocks",
+ "$BUILD_DIR/mongo/db/concurrency/lock_manager",
+ "$BUILD_DIR/mongo/db/pipeline/aggregation_request",
"$BUILD_DIR/mongo/db/query_exec",
"$BUILD_DIR/mongo/db/service_context_d",
+ "$BUILD_DIR/mongo/db/service_context_test_fixture",
"$BUILD_DIR/mongo/dbtests/mocklib",
+ "$BUILD_DIR/mongo/rpc/rpc",
+ "collation/collator_factory_mock",
+ "collation/collator_interface_mock",
+ "command_request_response",
+ "explain_options",
+ "hint_parser",
+ "query_common",
+ "query_planner",
+ "query_planner_test_fixture",
+ "query_request",
+ "query_test_service_context",
],
)
diff --git a/src/mongo/db/query/collation/SConscript b/src/mongo/db/query/collation/SConscript
index 6d5b61c660b..1a2c36d3ace 100644
--- a/src/mongo/db/query/collation/SConscript
+++ b/src/mongo/db/query/collation/SConscript
@@ -17,16 +17,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="collation_spec_test",
- source=[
- "collation_spec_test.cpp",
- ],
- LIBDEPS=[
- "collator_interface",
- ],
-)
-
env.Library(
target="collator_interface_mock",
source=[
@@ -37,37 +27,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="collator_interface_mock_test",
- source=[
- "collator_interface_mock_test.cpp",
- ],
- LIBDEPS=[
- "collator_interface_mock",
- ],
-)
-
-env.CppUnitTest(
- target="collation_bson_comparison_test",
- source=[
- "collation_bson_comparison_test.cpp",
- ],
- LIBDEPS=[
- "collator_interface_mock",
- ],
-)
-
-env.CppUnitTest(
- target="collation_index_key_test",
- source=[
- "collation_index_key_test.cpp",
- ],
- LIBDEPS=[
- "collator_interface",
- "collator_interface_mock",
- ],
-)
-
env.Library(
target="collator_factory_interface",
source=[
@@ -90,16 +49,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="collator_factory_mock_test",
- source=[
- "collator_factory_mock_test.cpp",
- ],
- LIBDEPS=[
- "collator_factory_mock",
- ],
-)
-
env.Library(
target="collator_factory_icu",
source=[
@@ -110,17 +59,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="collator_factory_icu_test",
- source=[
- "collator_factory_icu_locales_test.cpp",
- "collator_factory_icu_test.cpp",
- ],
- LIBDEPS=[
- "collator_icu",
- ],
-)
-
# The collator_icu library and the collator_interface_icu_test unit tests need an environment which
# has access to the third-party ICU headers.
icuEnv = env.Clone()
@@ -159,11 +97,21 @@ icuEnv.Library(
)
icuEnv.CppUnitTest(
- target="collator_interface_icu_test",
+ target="db_query_collation_test",
source=[
+ "collation_bson_comparison_test.cpp",
+ "collation_index_key_test.cpp",
+ "collation_spec_test.cpp",
+ "collator_factory_icu_locales_test.cpp",
+ "collator_factory_icu_test.cpp",
+ "collator_factory_mock_test.cpp",
"collator_interface_icu_test.cpp",
+ "collator_interface_mock_test.cpp",
],
LIBDEPS=[
+ "collator_factory_mock",
"collator_icu",
+ "collator_interface",
+ "collator_interface_mock",
],
)
diff --git a/src/mongo/db/query/datetime/SConscript b/src/mongo/db/query/datetime/SConscript
index 69171d52c83..c9ca7cc4d20 100644
--- a/src/mongo/db/query/datetime/SConscript
+++ b/src/mongo/db/query/datetime/SConscript
@@ -30,7 +30,7 @@ timeZoneEnv.Library(
)
timeZoneEnv.CppUnitTest(
- target='date_time_support_test',
+ target='query_datetime_test',
source=[
'date_time_support_test.cpp',
],
diff --git a/src/mongo/db/repl/SConscript b/src/mongo/db/repl/SConscript
index eda9c1c6315..b1b7b1c9cb7 100644
--- a/src/mongo/db/repl/SConscript
+++ b/src/mongo/db/repl/SConscript
@@ -73,38 +73,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='apply_ops_test',
- source=[
- 'apply_ops_test.cpp',
- ],
- LIBDEPS=[
- 'oplog',
- 'oplog_entry',
- 'replmocks',
- 'storage_interface_impl',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/service_context_d_test_fixture',
- '$BUILD_DIR/mongo/rpc/command_status',
- ],
-)
-
-env.CppUnitTest(
- target='oplog_test',
- source=[
- 'oplog_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/service_context_d_test_fixture',
- '$BUILD_DIR/mongo/util/concurrency/thread_pool',
- 'oplog',
- 'oplog_entry',
- 'oplog_interface_local',
- 'replmocks',
- ],
-)
-
env.Library(
target='timestamp_block',
source=[
@@ -116,25 +84,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='do_txn_test',
- source=[
- 'do_txn_test.cpp',
- ],
- LIBDEPS=[
- 'oplog',
- 'oplog_entry',
- 'oplog_interface_local',
- 'replmocks',
- 'storage_interface_impl',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/s/op_observer_sharding_impl',
- '$BUILD_DIR/mongo/db/service_context_d_test_fixture',
- '$BUILD_DIR/mongo/db/transaction',
- '$BUILD_DIR/mongo/rpc/command_status',
- ],
-)
-
env.Library(
target='rollback_source_impl',
source=[
@@ -217,18 +166,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='abstract_async_component_test',
- source=[
- 'abstract_async_component_test.cpp',
- ],
- LIBDEPS=[
- 'abstract_async_component',
- 'task_executor_mock',
- '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
- ],
-)
-
env.Library(
target='dbcheck',
source=[
@@ -295,21 +232,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='storage_interface_impl_test',
- source=[
- 'storage_interface_impl_test.cpp',
- ],
- LIBDEPS=[
- 'oplog_interface_local',
- 'replmocks',
- 'storage_interface_impl',
- 'sync_tail_test_fixture',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/service_context_d_test_fixture',
- ],
-)
-
env.Library(
target='replication_consistency_markers_idl',
source=[
@@ -335,20 +257,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='replication_consistency_markers_impl_test',
- source=[
- 'replication_consistency_markers_impl_test.cpp',
- ],
- LIBDEPS=[
- 'replication_consistency_markers_impl',
- 'replmocks',
- 'storage_interface_impl',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/service_context_d_test_fixture',
- ],
-)
-
env.Library(
target='replication_recovery',
source=[
@@ -363,25 +271,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='replication_recovery_test',
- source=[
- 'replication_recovery_test.cpp',
- ],
- LIBDEPS=[
- 'drop_pending_collection_reaper',
- 'oplog_interface_local',
- 'replication_recovery',
- 'replmocks',
- 'storage_interface_impl',
- 'sync_tail_test_fixture',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/op_observer',
- '$BUILD_DIR/mongo/db/service_context_d_test_fixture',
- '$BUILD_DIR/mongo/db/transaction',
- ],
-)
-
env.Library(
target='replication_process',
source=[
@@ -396,21 +285,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='replication_process_test',
- source=[
- 'replication_process_test.cpp',
- ],
- LIBDEPS=[
- 'replication_consistency_markers_impl',
- 'replication_process',
- 'replmocks',
- 'storage_interface_impl',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/service_context_d_test_fixture',
- ],
-)
-
env.Library(
target='drop_pending_collection_reaper',
source=[
@@ -425,20 +299,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='drop_pending_collection_reaper_test',
- source=[
- 'drop_pending_collection_reaper_test.cpp',
- ],
- LIBDEPS=[
- 'drop_pending_collection_reaper',
- 'replmocks',
- 'storage_interface_impl',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/service_context_d_test_fixture',
- ],
-)
-
env.Library(
target='scatter_gather',
source=[
@@ -484,32 +344,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='oplog_buffer_collection_test',
- source=[
- 'oplog_buffer_collection_test.cpp',
- ],
- LIBDEPS=[
- 'oplog_buffer_collection',
- 'oplog_interface_local',
- 'replmocks',
- 'storage_interface_impl',
- 'sync_tail_test_fixture',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/service_context_d_test_fixture',
- ],
- NO_CRUTCH = True,
-)
-
-env.CppUnitTest(
- target='oplog_buffer_proxy_test',
- source=[
- 'oplog_buffer_proxy_test.cpp',
- ],
- LIBDEPS=[
- 'oplog_buffer_proxy',
- ],
-)
env.Library(
target='oplog_interface_local',
@@ -613,19 +447,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='rs_rollback_test',
- source=[
- 'rs_rollback_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- 'oplog_interface_local',
- 'rollback_test_fixture',
- 'rs_rollback',
- ],
-)
-
env.Library(
target='rollback_impl',
source=[
@@ -650,23 +471,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='rollback_impl_test',
- source=[
- 'rollback_impl_test.cpp',
- ],
- LIBDEPS=[
- 'oplog_interface_local',
- 'oplog_interface_mock',
- 'rollback_impl',
- 'rollback_test_fixture',
- '$BUILD_DIR/mongo/base',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/logical_session_id_helpers',
- '$BUILD_DIR/mongo/transport/transport_layer_mock',
- ],
-)
-
env.Library(
target='oplog_entry',
source=[
@@ -699,19 +503,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='oplog_applier_test',
- source=[
- 'oplog_applier_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/commands/txn_cmd_request',
- '$BUILD_DIR/mongo/unittest/unittest',
- 'oplog_application_interface',
- 'oplog_buffer_blocking_queue',
- ],
-)
-
env.Library(
target='oplog_application',
source=[
@@ -773,26 +564,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='sync_tail_test',
- source=[
- 'sync_tail_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/catalog_raii',
- '$BUILD_DIR/mongo/db/dbdirectclient',
- '$BUILD_DIR/mongo/db/commands/mongod_fcv',
- '$BUILD_DIR/mongo/db/logical_session_id_helpers',
- '$BUILD_DIR/mongo/db/stats/counters',
- '$BUILD_DIR/mongo/util/clock_source_mock',
- 'idempotency_test_fixture',
- 'oplog_buffer_blocking_queue',
- 'oplog_interface_local',
- 'sync_tail_test_fixture',
- ],
-)
-
env.Library(
target='idempotency_test_util',
source=[
@@ -807,47 +578,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='idempotency_test',
- source=[
- 'idempotency_test.cpp',
- ],
- LIBDEPS=[
- 'idempotency_test_fixture',
- 'idempotency_test_util',
- ],
-)
-
-env.CppUnitTest(
- target='oplog_entry_test',
- source=[
- 'oplog_entry_test.cpp',
- ],
- LIBDEPS=[
- 'idempotency_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target='idempotency_document_structure_test',
- source=[
- 'idempotency_document_structure_test.cpp',
- ],
- LIBDEPS=[
- 'idempotency_test_util',
- ],
-)
-
-env.CppUnitTest(
- target='idempotency_update_sequence_test',
- source=[
- 'idempotency_update_sequence_test.cpp',
- ],
- LIBDEPS=[
- 'idempotency_test_util',
- ],
-)
-
env.Library(
target='split_horizon',
source=[
@@ -860,17 +590,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='split_horizon_test',
- source=[
- 'split_horizon_test.cpp',
- ],
- LIBDEPS=[
- 'split_horizon',
- ],
-)
-
-
env.Library('topology_coordinator',
[
'heartbeat_response_action.cpp',
@@ -893,25 +612,6 @@ env.Library('topology_coordinator',
'split_horizon',
])
-env.CppUnitTest('repl_set_heartbeat_response_test',
- 'repl_set_heartbeat_response_test.cpp',
- LIBDEPS=['replica_set_messages'])
-
-env.CppUnitTest(
- target='topology_coordinator_v1_test',
- source=[
- 'topology_coordinator_v1_test.cpp',
- ],
- LIBDEPS=[
- 'topology_coordinator',
- 'replica_set_messages',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/executor/network_interface_factory',
- '$BUILD_DIR/mongo/executor/network_interface_mock',
- '$BUILD_DIR/mongo/executor/network_interface_thread_pool',
- ],
-)
-
env.Library(
target='repl_coordinator_impl',
source=[
@@ -980,78 +680,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='replication_coordinator_impl_test',
- source=[
- 'replication_coordinator_impl_test.cpp',
- ],
- LIBDEPS=[
- 'repl_coordinator_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target='repl_set_config_checks_test',
- source=[
- 'repl_set_config_checks_test.cpp',
- ],
- LIBDEPS=[
- 'repl_coordinator_impl',
- 'replmocks',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target='scatter_gather_test',
- source=[
- 'scatter_gather_test.cpp',
- ],
- LIBDEPS=[
- 'scatter_gather',
- '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target='check_quorum_for_config_change_test',
- source=[
- 'check_quorum_for_config_change_test.cpp',
- ],
- LIBDEPS=[
- 'repl_coordinator_impl',
- 'replmocks',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target='vote_requester_test',
- source=[
- 'vote_requester_test.cpp',
- ],
- LIBDEPS=[
- 'repl_coordinator_impl',
- 'replica_set_messages',
- 'replmocks',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- ],
-)
-
-env.CppUnitTest('replication_coordinator_impl_elect_v1_test',
- 'replication_coordinator_impl_elect_v1_test.cpp',
- LIBDEPS=['repl_coordinator_test_fixture'])
-
-env.CppUnitTest('replication_coordinator_impl_heartbeat_v1_test',
- 'replication_coordinator_impl_heartbeat_v1_test.cpp',
- LIBDEPS=['repl_coordinator_test_fixture'])
-
-env.CppUnitTest('replication_coordinator_impl_reconfig_test',
- 'replication_coordinator_impl_reconfig_test.cpp',
- LIBDEPS=['repl_coordinator_test_fixture'])
-
env.Library(
target='repl_coordinator_interface',
source=[
@@ -1137,29 +765,6 @@ env.Library('replica_set_messages',
'split_horizon',
])
-env.CppUnitTest('repl_set_config_test',
- [
- 'member_config_test.cpp',
- 'repl_set_config_test.cpp',
- 'repl_set_tag_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/bson/mutable/mutable_bson',
- 'replica_set_messages',
- ])
-
-env.CppUnitTest('isself_test',
- [
- 'isself_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/service_context_d',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- 'isself',
- ],
- )
-
env.Library(
target='repl_set_status_commands',
source=[
@@ -1233,17 +838,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='abstract_oplog_fetcher_test',
- source='abstract_oplog_fetcher_test.cpp',
- LIBDEPS=[
- 'abstract_oplog_fetcher',
- 'abstract_oplog_fetcher_test_fixture',
- 'oplog_entry',
- 'task_executor_mock',
- ],
-)
-
env.Library(
target='oplog_fetcher',
source=[
@@ -1264,17 +858,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='oplog_fetcher_test',
- source='oplog_fetcher_test.cpp',
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- 'oplog_fetcher',
- 'data_replicator_external_state_mock',
- 'abstract_oplog_fetcher_test_fixture',
- ],
-)
-
env.Library(
target='reporter',
source=[
@@ -1290,17 +873,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='reporter_test',
- source='reporter_test.cpp',
- LIBDEPS=[
- 'reporter',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
- '$BUILD_DIR/mongo/unittest/task_executor_proxy',
- ],
-)
-
env.Library(
target='sync_source_resolver',
source=[
@@ -1331,17 +903,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='sync_source_resolver_test',
- source='sync_source_resolver_test.cpp',
- LIBDEPS=[
- 'sync_source_resolver',
- 'sync_source_selector_mock',
- '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
- '$BUILD_DIR/mongo/unittest/task_executor_proxy',
- ],
-)
-
env.Library(
target='base_cloner_test_fixture',
source=[
@@ -1378,19 +939,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='collection_cloner_test',
- source='collection_cloner_test.cpp',
- LIBDEPS=[
- 'collection_cloner',
- 'base_cloner_test_fixture',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/auth/authorization_manager_global',
- '$BUILD_DIR/mongo/dbtests/mocklib',
- '$BUILD_DIR/mongo/unittest/task_executor_proxy',
- ],
-)
-
env.Library(
target='database_cloner',
source=[
@@ -1406,19 +954,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='database_cloner_test',
- source='database_cloner_test.cpp',
- LIBDEPS=[
- 'database_cloner',
- 'base_cloner_test_fixture',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/commands/list_collections_filter',
- '$BUILD_DIR/mongo/dbtests/mocklib',
- '$BUILD_DIR/mongo/unittest/task_executor_proxy',
- ],
-)
-
env.Library(
target='databases_cloner',
source=[
@@ -1435,20 +970,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='databases_cloner_test',
- source='databases_cloner_test.cpp',
- LIBDEPS=[
- 'databases_cloner',
- 'oplog_entry',
- 'replmocks',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
- '$BUILD_DIR/mongo/unittest/task_executor_proxy',
- ],
-)
-
env.Library(
target='task_runner',
source=[
@@ -1460,43 +981,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='task_runner_test',
- source=[
- 'task_runner_test.cpp',
- 'task_runner_test_fixture.cpp',
- ],
- LIBDEPS=[
- 'replmocks',
- 'task_runner',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/auth/authorization_manager_global',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- '$BUILD_DIR/mongo/unittest/unittest',
- ],
-)
-
-env.CppUnitTest(
- target='read_concern_args_test',
- source=[
- 'read_concern_args_test.cpp',
- ],
- LIBDEPS=[
- 'replica_set_messages',
- '$BUILD_DIR/mongo/db/logical_time',
- ],
-)
-
-env.CppUnitTest(
- target='speculative_majority_read_info_test',
- source=[
- 'speculative_majority_read_info_test.cpp',
- ],
- LIBDEPS=[
- 'speculative_majority_read_info',
- ],
-)
-
env.Library(target='optime',
source=[
'bson_extract_optime.cpp',
@@ -1508,16 +992,6 @@ env.Library(target='optime',
],
)
-env.CppUnitTest(
- target='optime_extract_test',
- source=[
- 'optime_extract_test.cpp'
- ],
- LIBDEPS=[
- 'optime',
- ],
-)
-
env.Library(
target='multiapplier',
source=[
@@ -1530,18 +1004,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='multiapplier_test',
- source='multiapplier_test.cpp',
- LIBDEPS=[
- 'multiapplier',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
- '$BUILD_DIR/mongo/unittest/task_executor_proxy',
- ],
-)
-
env.Library(
target='data_replicator_external_state_impl',
source=[
@@ -1615,28 +1077,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='initial_syncer_test',
- source=[
- 'initial_syncer_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/commands/feature_compatibility_parsers',
- '$BUILD_DIR/mongo/db/index/index_access_methods',
- '$BUILD_DIR/mongo/db/query/command_request_response',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
- 'base_cloner_test_fixture',
- 'data_replicator_external_state_mock',
- 'initial_syncer',
- 'replication_process',
- 'replmocks',
- 'sync_source_selector_mock',
- 'task_executor_mock',
- ],
-)
-
env.Library(
target='rollback_checker',
source=[
@@ -1647,17 +1087,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='rollback_checker_test',
- source=[
- 'rollback_checker_test.cpp',
- ],
- LIBDEPS=[
- 'rollback_checker',
- '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
- ],
-)
-
env.Library(
target='roll_back_local_operations',
source=[
@@ -1671,16 +1100,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='roll_back_local_operations_test',
- source='roll_back_local_operations_test.cpp',
- LIBDEPS=[
- 'oplog_interface_mock',
- 'oplog_interface_remote',
- 'roll_back_local_operations',
- ],
-)
-
env.Library(
target="replication_info",
source=[
@@ -1775,3 +1194,163 @@ env.Library(
'$BUILD_DIR/mongo/db/service_context_d_test_fixture',
]
)
+
+env.CppUnitTest(
+ target='db_repl_test',
+ source=[
+ 'abstract_async_component_test.cpp',
+ 'abstract_oplog_fetcher_test.cpp',
+ 'apply_ops_test.cpp',
+ 'check_quorum_for_config_change_test.cpp',
+ 'do_txn_test.cpp',
+ 'drop_pending_collection_reaper_test.cpp',
+ 'idempotency_document_structure_test.cpp',
+ 'idempotency_test.cpp',
+ 'idempotency_update_sequence_test.cpp',
+ 'initial_syncer_test.cpp',
+ 'isself_test.cpp',
+ 'member_config_test.cpp',
+ 'multiapplier_test.cpp',
+ 'oplog_applier_test.cpp',
+ 'oplog_buffer_collection_test.cpp',
+ 'oplog_buffer_proxy_test.cpp',
+ 'oplog_entry_test.cpp',
+ 'oplog_fetcher_test.cpp',
+ 'oplog_test.cpp',
+ 'optime_extract_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',
+ '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',
+ 'sync_tail_test.cpp',
+ 'task_runner_test.cpp',
+ 'task_runner_test_fixture.cpp',
+ 'vote_requester_test.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/base',
+ '$BUILD_DIR/mongo/bson/mutable/mutable_bson',
+ '$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/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/s/op_observer_sharding_impl',
+ '$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/transaction',
+ '$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',
+ 'abstract_oplog_fetcher',
+ 'abstract_oplog_fetcher_test_fixture',
+ 'data_replicator_external_state_mock',
+ 'drop_pending_collection_reaper',
+ 'idempotency_test_fixture',
+ 'idempotency_test_util',
+ 'initial_syncer',
+ 'isself',
+ 'multiapplier',
+ 'oplog',
+ 'oplog_application_interface',
+ 'oplog_buffer_blocking_queue',
+ 'oplog_buffer_collection',
+ 'oplog_buffer_proxy',
+ 'oplog_entry',
+ 'oplog_fetcher',
+ 'oplog_interface_local',
+ 'oplog_interface_mock',
+ 'oplog_interface_remote',
+ 'optime',
+ 'repl_coordinator_impl',
+ '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',
+ 'sync_tail_test_fixture',
+ 'task_executor_mock',
+ 'task_runner',
+ ],
+)
+
+# The following two tests appear to clash when combined with the above list.
+
+env.CppUnitTest(
+ target='db_repl_coordinator_test',
+ source=[
+ 'replication_coordinator_impl_elect_v1_test.cpp',
+ 'replication_coordinator_impl_heartbeat_v1_test.cpp',
+ 'replication_coordinator_impl_reconfig_test.cpp',
+ 'replication_coordinator_impl_test.cpp',
+ 'topology_coordinator_v1_test.cpp',
+ ],
+ LIBDEPS=[
+ 'repl_coordinator_impl',
+ 'repl_coordinator_test_fixture',
+ 'topology_coordinator',
+ ]
+)
+
+env.CppUnitTest(
+ target='db_repl_cloners_test',
+ source=[
+ 'collection_cloner_test.cpp',
+ 'database_cloner_test.cpp',
+ 'databases_cloner_test.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/db/auth/authmocks',
+ '$BUILD_DIR/mongo/db/auth/authorization_manager_global',
+ '$BUILD_DIR/mongo/db/commands/list_collections_filter',
+ '$BUILD_DIR/mongo/dbtests/mocklib',
+ '$BUILD_DIR/mongo/unittest/task_executor_proxy',
+ 'base_cloner_test_fixture',
+ 'collection_cloner',
+ 'database_cloner',
+ 'databases_cloner',
+ ],
+)
diff --git a/src/mongo/db/s/SConscript b/src/mongo/db/s/SConscript
index a3c18375696..2972ea60a2f 100644
--- a/src/mongo/db/s/SConscript
+++ b/src/mongo/db/s/SConscript
@@ -157,28 +157,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='chunk_split_state_driver_test',
- source=[
- 'chunk_split_state_driver_test.cpp',
- ],
- LIBDEPS=[
- 'chunk_splitter',
- ]
-)
-
-env.CppUnitTest(
- target='config_server_op_observer_test',
- source=[
- 'config_server_op_observer_test.cpp',
- ],
- LIBDEPS=[
- 'sharding_runtime_d',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/s/config_server_test_fixture',
- ]
-)
-
env.Library(
target='migration_types',
source=[
@@ -231,24 +209,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='balancer_test',
- source=[
- 'balancer/balancer_policy_test.cpp',
- 'balancer/cluster_statistics_test.cpp',
- 'balancer/migration_manager_test.cpp',
- 'balancer/scoped_migration_request_test.cpp',
- 'balancer/type_migration_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/repl/replication_info',
- '$BUILD_DIR/mongo/s/config_server_test_fixture',
- '$BUILD_DIR/mongo/util/version_impl',
- 'balancer',
- ]
-)
-
env.Library(
target='sharding_catalog_manager',
source=[
@@ -346,29 +306,61 @@ env.Library(
],
)
+env.Library(
+ target='sharding_logging',
+ source=[
+ 'sharding_logging.cpp',
+ ],
+ LIBDEPS=[
+ 'sharding_api_d',
+ '$BUILD_DIR/mongo/s/catalog/sharding_catalog_client_impl',
+ ],
+)
+
env.CppUnitTest(
- target='migration_types_test',
+ target='db_s_test',
source=[
+ 'chunk_split_state_driver_test.cpp',
+ 'config_server_op_observer_test.cpp',
'migration_session_id_test.cpp',
+ 'sharding_logging_test.cpp',
'start_chunk_clone_request_test.cpp',
+ 'type_shard_identity_test.cpp',
],
LIBDEPS=[
+ '$BUILD_DIR/mongo/db/auth/authmocks',
+ '$BUILD_DIR/mongo/db/auth/authmocks',
+ '$BUILD_DIR/mongo/s/config_server_test_fixture',
+ '$BUILD_DIR/mongo/s/sharding_router_test_fixture',
+ 'chunk_splitter',
'migration_types',
- ]
+ 'sharding_logging',
+ 'sharding_runtime_d',
+ 'sharding_runtime_d',
+ 'type_shard_identity',
+ ],
)
env.CppUnitTest(
- target='type_shard_identity_test',
+ target='db_s_balancer_test',
source=[
- 'type_shard_identity_test.cpp'
+ 'balancer/balancer_policy_test.cpp',
+ 'balancer/cluster_statistics_test.cpp',
+ 'balancer/migration_manager_test.cpp',
+ 'balancer/scoped_migration_request_test.cpp',
+ 'balancer/type_migration_test.cpp',
],
LIBDEPS=[
- 'type_shard_identity',
+ '$BUILD_DIR/mongo/db/auth/authmocks',
+ '$BUILD_DIR/mongo/db/repl/replication_info',
+ '$BUILD_DIR/mongo/s/config_server_test_fixture',
+ '$BUILD_DIR/mongo/util/version_impl',
+ 'balancer',
]
)
env.CppUnitTest(
- target='shard_server_test',
+ target='db_s_shard_server_test',
source=[
'active_migrations_registry_test.cpp',
'active_move_primaries_registry_test.cpp',
@@ -401,7 +393,7 @@ env.CppUnitTest(
)
env.CppUnitTest(
- target='collection_sharding_runtime_test',
+ target='db_s_collection_sharding_runtime_test',
source=[
'collection_metadata_filtering_test.cpp',
'collection_metadata_test.cpp',
@@ -420,7 +412,7 @@ env.CppUnitTest(
)
env.CppUnitTest(
- target='transaction_coordinator_test',
+ target='db_s_transaction_coordinator_test',
source=[
'transaction_coordinator_catalog_test.cpp',
'transaction_coordinator_futures_util_test.cpp',
@@ -439,7 +431,7 @@ env.CppUnitTest(
)
env.CppUnitTest(
- target='sharding_catalog_manager_test',
+ target='db_s_sharding_catalog_manager_test',
source=[
'config/initial_split_policy_test.cpp',
'config/sharding_catalog_manager_add_shard_test.cpp',
@@ -463,27 +455,3 @@ env.CppUnitTest(
'$BUILD_DIR/mongo/util/version_impl',
]
)
-
-env.Library(
- target='sharding_logging',
- source=[
- 'sharding_logging.cpp',
- ],
- LIBDEPS=[
- 'sharding_api_d',
- '$BUILD_DIR/mongo/s/catalog/sharding_catalog_client_impl',
- ],
-)
-
-env.CppUnitTest(
- target='sharding_logging_test',
- source=[
- 'sharding_logging_test.cpp',
- ],
- LIBDEPS=[
- 'sharding_runtime_d',
- 'sharding_logging',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/s/sharding_router_test_fixture',
- ]
-)
diff --git a/src/mongo/db/sorter/SConscript b/src/mongo/db/sorter/SConscript
index 2f0014755a2..5c3508586a3 100644
--- a/src/mongo/db/sorter/SConscript
+++ b/src/mongo/db/sorter/SConscript
@@ -4,11 +4,18 @@ env = env.Clone()
sorterEnv = env.Clone()
sorterEnv.InjectThirdParty(libraries=['snappy'])
-sorterEnv.CppUnitTest('sorter_test',
- 'sorter_test.cpp',
- LIBDEPS=['$BUILD_DIR/mongo/db/service_context',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- '$BUILD_DIR/mongo/db/storage/encryption_hooks',
- '$BUILD_DIR/mongo/db/storage/storage_options',
- '$BUILD_DIR/mongo/s/is_mongos',
- '$BUILD_DIR/third_party/shim_snappy'])
+
+sorterEnv.CppUnitTest(
+ target='db_sorter_test',
+ source=[
+ 'sorter_test.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/db/service_context',
+ '$BUILD_DIR/mongo/db/service_context_test_fixture',
+ '$BUILD_DIR/mongo/db/storage/encryption_hooks',
+ '$BUILD_DIR/mongo/db/storage/storage_options',
+ '$BUILD_DIR/mongo/s/is_mongos',
+ '$BUILD_DIR/third_party/shim_snappy'
+ ],
+)
diff --git a/src/mongo/db/stats/SConscript b/src/mongo/db/stats/SConscript
index 9db2dd49bbe..88372bb685e 100644
--- a/src/mongo/db/stats/SConscript
+++ b/src/mongo/db/stats/SConscript
@@ -15,16 +15,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='timer_stats_test',
- source=[
- 'timer_stats_test.cpp',
- ],
- LIBDEPS=[
- 'timer_stats',
- ],
-)
-
env.Library(
target='top',
source=[
@@ -36,26 +26,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='top_test',
- source=[
- 'top_test.cpp',
- ],
- LIBDEPS=[
- 'top',
- ],
-)
-
-env.CppUnitTest(
- target='operation_latency_histogram_test',
- source=[
- 'operation_latency_histogram_test.cpp'
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- '$BUILD_DIR/mongo/db/stats/top',
- ])
-
env.Library(
target='counters',
source=[
@@ -98,16 +68,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='fill_locker_info_test',
- source=[
- 'fill_locker_info_test.cpp',
- ],
- LIBDEPS=[
- 'fill_locker_info',
- ],
-)
-
env.Library(
target='serveronly_stats',
source=[
@@ -126,3 +86,19 @@ env.Library(
'$BUILD_DIR/mongo/db/commands/server_status',
],
)
+
+env.CppUnitTest(
+ target='db_stats_test',
+ source=[
+ 'fill_locker_info_test.cpp',
+ 'operation_latency_histogram_test.cpp',
+ 'timer_stats_test.cpp',
+ 'top_test.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/base',
+ 'fill_locker_info',
+ 'timer_stats',
+ 'top',
+ ],
+)
diff --git a/src/mongo/db/storage/SConscript b/src/mongo/db/storage/SConscript
index b2d7b1bffaa..4b3751f7a05 100644
--- a/src/mongo/db/storage/SConscript
+++ b/src/mongo/db/storage/SConscript
@@ -262,14 +262,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target= 'storage_engine_lock_file_test',
- source = 'storage_engine_lock_file_test.cpp',
- LIBDEPS=[
- 'storage_engine_lock_file',
- ],
-)
-
env.Library(
target='storage_engine_metadata',
source=[
@@ -306,41 +298,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='storage_repair_observer_test',
- source=[
- 'storage_repair_observer_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/dbhelpers',
- '$BUILD_DIR/mongo/db/namespace_string',
- '$BUILD_DIR/mongo/db/repl/replmocks',
- '$BUILD_DIR/mongo/db/service_context_d_test_fixture',
- '$BUILD_DIR/mongo/db/storage/ephemeral_for_test/storage_ephemeral_for_test_core',
- '$BUILD_DIR/mongo/executor/network_interface_factory',
- '$BUILD_DIR/mongo/executor/network_interface_mock',
- 'storage_repair_observer',
- ],
-)
-
-env.CppUnitTest(
- target= 'storage_engine_metadata_test',
- source = 'storage_engine_metadata_test.cpp',
- LIBDEPS=[
- 'storage_engine_metadata',
- ],
-)
-
-env.CppUnitTest(
- target='storage_key_string_test',
- source='key_string_test.cpp',
- LIBDEPS=[
- 'key_string',
- '$BUILD_DIR/mongo/base',
- ],
-)
-
env.Benchmark(
target='storage_key_string_bm',
source='key_string_bm.cpp',
@@ -393,17 +350,31 @@ env.Library(
)
env.CppUnitTest(
- target='flow_control_test',
+ target='db_storage_test',
source=[
'flow_control_test.cpp',
+ 'key_string_test.cpp',
+ 'storage_engine_lock_file_test.cpp',
+ 'storage_engine_metadata_test.cpp',
+ 'storage_repair_observer_test.cpp',
],
LIBDEPS=[
+ '$BUILD_DIR/mongo/base',
'$BUILD_DIR/mongo/db/auth/authmocks',
'$BUILD_DIR/mongo/db/concurrency/flow_control_ticketholder',
+ '$BUILD_DIR/mongo/db/dbhelpers',
+ '$BUILD_DIR/mongo/db/namespace_string',
'$BUILD_DIR/mongo/db/repl/replmocks',
'$BUILD_DIR/mongo/db/repl/topology_coordinator',
'$BUILD_DIR/mongo/db/service_context_d_test_fixture',
+ '$BUILD_DIR/mongo/db/storage/ephemeral_for_test/storage_ephemeral_for_test_core',
+ '$BUILD_DIR/mongo/executor/network_interface_factory',
+ '$BUILD_DIR/mongo/executor/network_interface_mock',
'flow_control',
'flow_control_parameters',
+ 'key_string',
+ 'storage_engine_lock_file',
+ 'storage_engine_metadata',
+ 'storage_repair_observer',
],
)
diff --git a/src/mongo/db/storage/kv/SConscript b/src/mongo/db/storage/kv/SConscript
index 69bba58c8fc..058d45096d0 100644
--- a/src/mongo/db/storage/kv/SConscript
+++ b/src/mongo/db/storage/kv/SConscript
@@ -85,50 +85,25 @@ env.Library(
)
env.CppUnitTest(
- target='kv_drop_pending_ident_reaper_test',
- source=[
- 'kv_drop_pending_ident_reaper_test.cpp',
- ],
- LIBDEPS_PRIVATE=[
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- 'kv_drop_pending_ident_reaper',
- ],
-)
-
-env.CppUnitTest(
- target='kv_collection_catalog_entry_test',
+ target='db_storage_kv_engine_test',
source=[
'kv_collection_catalog_entry_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/catalog/collection_options',
- '$BUILD_DIR/mongo/db/namespace_string',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
- '$BUILD_DIR/mongo/db/storage/devnull/storage_devnull_core',
- '$BUILD_DIR/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store',
- 'kv_engine_core',
- 'storage_engine',
- ],
- LIBDEPS_PRIVATE=[
- '$BUILD_DIR/mongo/db/auth/authmocks'
- ],
-)
-
-env.CppUnitTest(
- target='storage_engine_test',
- source=[
+ 'kv_drop_pending_ident_reaper_test.cpp',
'storage_engine_test.cpp',
],
LIBDEPS=[
- '$BUILD_DIR/mongo/db/catalog_raii',
'$BUILD_DIR/mongo/db/auth/authmocks',
'$BUILD_DIR/mongo/db/catalog/collection_options',
+ '$BUILD_DIR/mongo/db/catalog_raii',
'$BUILD_DIR/mongo/db/namespace_string',
'$BUILD_DIR/mongo/db/repl/replmocks',
'$BUILD_DIR/mongo/db/service_context_d_test_fixture',
+ '$BUILD_DIR/mongo/db/service_context_test_fixture',
'$BUILD_DIR/mongo/db/storage/devnull/storage_devnull_core',
+ '$BUILD_DIR/mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store',
'$BUILD_DIR/mongo/db/storage/ephemeral_for_test/storage_ephemeral_for_test_core',
'$BUILD_DIR/mongo/db/storage/storage_repair_observer',
+ 'kv_drop_pending_ident_reaper',
'kv_engine_core',
'storage_engine',
],
diff --git a/src/mongo/db/update/SConscript b/src/mongo/db/update/SConscript
index 06aecc03122..668a6c2f96e 100644
--- a/src/mongo/db/update/SConscript
+++ b/src/mongo/db/update/SConscript
@@ -20,50 +20,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='field_checker_test',
- source=[
- 'field_checker_test.cpp',
- ],
- LIBDEPS=[
- 'update_common',
- ],
-)
-
-env.CppUnitTest(
- target='log_builder_test',
- source=[
- 'log_builder_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/bson/mutable/mutable_bson_test_utils',
- 'update_common',
- ],
-)
-
-env.CppUnitTest(
- target='path_support_test',
- source=[
- 'path_support_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/bson/mutable/mutable_bson_test_utils',
- '$BUILD_DIR/mongo/db/matcher/expressions',
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- 'update_common',
- ],
-)
-
-env.CppUnitTest(
- target='push_sorter_test',
- source='push_sorter_test.cpp',
- LIBDEPS=[
- '$BUILD_DIR/mongo/bson/mutable/mutable_bson',
- '$BUILD_DIR/mongo/db/matcher/expressions',
- '$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
- ],
-)
-
env.Library(
target='update',
source=[
@@ -98,70 +54,60 @@ env.Library(
],
)
+env.Library(
+ target='update_driver',
+ source=[
+ 'update_driver.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/base',
+ '$BUILD_DIR/mongo/db/common',
+ '$BUILD_DIR/mongo/db/ops/write_ops_parsers',
+ '$BUILD_DIR/mongo/db/query/query_planner',
+ '$BUILD_DIR/mongo/db/server_options_core',
+ 'update',
+ ],
+)
+
env.CppUnitTest(
- target='update_nodes_test',
+ target='db_update_test',
source=[
'addtoset_node_test.cpp',
'arithmetic_node_test.cpp',
'bit_node_test.cpp',
'compare_node_test.cpp',
'current_date_node_test.cpp',
+ 'field_checker_test.cpp',
+ 'log_builder_test.cpp',
+ 'modifier_table_test.cpp',
'object_replace_executor_test.cpp',
+ 'path_support_test.cpp',
'pipeline_executor_test.cpp',
'pop_node_test.cpp',
'pull_node_test.cpp',
'pullall_node_test.cpp',
'push_node_test.cpp',
+ 'push_sorter_test.cpp',
'rename_node_test.cpp',
'set_node_test.cpp',
'unset_node_test.cpp',
'update_array_node_test.cpp',
+ 'update_driver_test.cpp',
'update_object_node_test.cpp',
+ 'update_serialization_test.cpp',
],
LIBDEPS=[
+ '$BUILD_DIR/mongo/bson/mutable/mutable_bson',
'$BUILD_DIR/mongo/bson/mutable/mutable_bson_test_utils',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
'$BUILD_DIR/mongo/db/logical_clock',
+ '$BUILD_DIR/mongo/db/matcher/expressions',
'$BUILD_DIR/mongo/db/pipeline/document_value_test_util',
'$BUILD_DIR/mongo/db/query/collation/collator_interface_mock',
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- 'update',
- ],
-)
-
-env.CppUnitTest(
- target='modifier_table_test',
- source='modifier_table_test.cpp',
- LIBDEPS=[
- 'update',
- ],
-)
-
-env.Library(
- target='update_driver',
- source=[
- 'update_driver.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- '$BUILD_DIR/mongo/db/common',
- '$BUILD_DIR/mongo/db/ops/write_ops_parsers',
- '$BUILD_DIR/mongo/db/query/query_planner',
- '$BUILD_DIR/mongo/db/server_options_core',
- 'update',
- ],
-)
-
-env.CppUnitTest(
- target='update_driver_test',
- source=[
- 'update_driver_test.cpp',
- 'update_serialization_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/bson/mutable/mutable_bson_test_utils',
'$BUILD_DIR/mongo/db/query/query_planner',
'$BUILD_DIR/mongo/db/query/query_test_service_context',
+ '$BUILD_DIR/mongo/db/service_context_test_fixture',
+ 'update',
+ 'update_common',
'update_driver',
],
)
diff --git a/src/mongo/db/views/SConscript b/src/mongo/db/views/SConscript
index d22244dfacd..e4b769b075a 100644
--- a/src/mongo/db/views/SConscript
+++ b/src/mongo/db/views/SConscript
@@ -45,7 +45,7 @@ env.Library(
)
env.CppUnitTest(
- target='views_test',
+ target='db_views_test',
source=[
'resolved_view_test.cpp',
'view_catalog_test.cpp',
diff --git a/src/mongo/executor/SConscript b/src/mongo/executor/SConscript
index 7c015cb39f3..ea00837604e 100644
--- a/src/mongo/executor/SConscript
+++ b/src/mongo/executor/SConscript
@@ -95,30 +95,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='connection_pool_test',
- source=[
- 'connection_pool_test.cpp',
- 'connection_pool_test_fixture.cpp',
- ],
- LIBDEPS=[
- 'connection_pool_executor',
- ],
- LIBDEPS_PRIVATE=[
- 'egress_tag_closer_manager',
- ],
-)
-
-env.CppUnitTest(
- target='network_interface_mock_test',
- source=[
- 'network_interface_mock_test.cpp'
- ],
- LIBDEPS=[
- 'network_interface_mock',
- ],
-)
-
env.Library(target='network_test_env',
source=['network_test_env.cpp',],
LIBDEPS=[
@@ -170,19 +146,6 @@ env.Library(
]
)
-env.CppIntegrationTest(
- target='network_interface_integration_test',
- source=[
- 'network_interface_integration_test.cpp',
- ],
- LIBDEPS=[
- 'network_interface_fixture',
- '$BUILD_DIR/mongo/db/commands/test_commands_enabled',
- '$BUILD_DIR/mongo/db/wire_version',
- '$BUILD_DIR/mongo/transport/transport_layer_egress_init',
- ],
-)
-
env.Library(
target='network_interface_factory',
source=[
@@ -247,16 +210,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='thread_pool_task_executor_test',
- source=[
- 'thread_pool_task_executor_test.cpp',
- ],
- LIBDEPS=[
- 'thread_pool_task_executor_test_fixture',
- ]
-)
-
env.Library(
target='task_executor_pool',
source=[
@@ -281,70 +234,60 @@ env.Library(
],
)
-env.CppIntegrationTest(
- target='task_executor_cursor_integration_test',
+env.Library(
+ target='non_auth_task_executor',
source=[
- 'task_executor_cursor_integration_test.cpp',
+ 'non_auth_task_executor.cpp',
],
LIBDEPS=[
- 'task_executor_cursor',
- '$BUILD_DIR/mongo/client/clientdriver_network',
- '$BUILD_DIR/mongo/db/wire_version',
+ 'task_executor_interface',
'$BUILD_DIR/mongo/executor/network_interface_factory',
'$BUILD_DIR/mongo/executor/network_interface_thread_pool',
'$BUILD_DIR/mongo/executor/thread_pool_task_executor',
- '$BUILD_DIR/mongo/transport/transport_layer_egress_init',
'$BUILD_DIR/mongo/util/concurrency/thread_pool',
- '$BUILD_DIR/mongo/util/version_impl',
],
)
env.CppUnitTest(
- target='task_executor_cursor_test',
+ target='executor_test',
source=[
+ 'connection_pool_test.cpp',
+ 'connection_pool_test_fixture.cpp',
+ 'network_interface_mock_test.cpp',
+ 'scoped_task_executor_test.cpp',
'task_executor_cursor_test.cpp',
+ 'thread_pool_task_executor_test.cpp',
],
LIBDEPS=[
+ 'connection_pool_executor',
+ 'egress_tag_closer_manager',
+ 'network_interface_mock',
+ 'scoped_task_executor',
'task_executor_cursor',
+ 'thread_pool_task_executor',
'thread_pool_task_executor_test_fixture',
],
)
-env.Library(
- target='non_auth_task_executor',
- source=[
- 'non_auth_task_executor.cpp',
- ],
- LIBDEPS=[
- 'task_executor_interface',
- '$BUILD_DIR/mongo/executor/network_interface_factory',
- '$BUILD_DIR/mongo/executor/network_interface_thread_pool',
- '$BUILD_DIR/mongo/executor/thread_pool_task_executor',
- '$BUILD_DIR/mongo/util/concurrency/thread_pool',
- ],
-)
-
env.CppIntegrationTest(
- target='non_auth_task_executor_integration_test',
+ target='executor_integration_test',
source=[
+ 'network_interface_integration_test.cpp',
+ 'task_executor_cursor_integration_test.cpp',
'non_auth_task_executor_integration_test.cpp',
],
LIBDEPS=[
- 'non_auth_task_executor',
+ '$BUILD_DIR/mongo/client/clientdriver_network',
+ '$BUILD_DIR/mongo/db/commands/test_commands_enabled',
'$BUILD_DIR/mongo/db/wire_version',
+ '$BUILD_DIR/mongo/executor/network_interface_factory',
+ '$BUILD_DIR/mongo/executor/network_interface_thread_pool',
+ '$BUILD_DIR/mongo/executor/thread_pool_task_executor',
'$BUILD_DIR/mongo/transport/transport_layer_egress_init',
+ '$BUILD_DIR/mongo/util/concurrency/thread_pool',
'$BUILD_DIR/mongo/util/version_impl',
- ],
-)
-
-env.CppUnitTest(
- target='scoped_task_executor_test',
- source=[
- 'scoped_task_executor_test.cpp',
- ],
- LIBDEPS=[
- 'scoped_task_executor',
- 'network_interface_mock',
- 'thread_pool_task_executor',
+ 'network_interface_fixture',
+ 'non_auth_task_executor',
+ 'task_executor_cursor',
],
)
diff --git a/src/mongo/idl/SConscript b/src/mongo/idl/SConscript
index 0ce5bf975dc..28bcb2724b5 100644
--- a/src/mongo/idl/SConscript
+++ b/src/mongo/idl/SConscript
@@ -14,20 +14,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='idl_test',
- source=[
- 'idl_test.cpp',
- env.Idlc('unittest_import.idl')[0],
- env.Idlc('unittest.idl')[0],
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- '$BUILD_DIR/mongo/db/namespace_string',
- '$BUILD_DIR/mongo/idl/idl_parser',
- ],
-)
-
env.Library(
target='server_parameter',
source=[
@@ -43,29 +29,25 @@ env.Library(
)
env.CppUnitTest(
- target='idl_server_parameter_test',
- source=[
- 'server_parameter_with_storage_test.cpp',
- env.Idlc('server_parameter_with_storage_test.idl')[0],
- 'server_parameter_specialized_test.cpp',
- env.Idlc('server_parameter_specialized_test.idl')[0],
- ],
- LIBDEPS=[
- 'server_parameter',
- 'idl_parser',
- ],
-)
-
-env.CppUnitTest(
- target='idl_config_option_test',
+ target='idl_test',
source=[
'config_option_test.cpp',
+ 'idl_test.cpp',
+ 'server_parameter_specialized_test.cpp',
+ 'server_parameter_with_storage_test.cpp',
env.Idlc('config_option_no_init_test.idl')[0],
env.Idlc('config_option_test.idl')[0],
+ env.Idlc('server_parameter_specialized_test.idl')[0],
+ env.Idlc('server_parameter_with_storage_test.idl')[0],
+ env.Idlc('unittest.idl')[0],
+ env.Idlc('unittest_import.idl')[0],
],
LIBDEPS=[
'$BUILD_DIR/mongo/base',
+ '$BUILD_DIR/mongo/db/namespace_string',
+ '$BUILD_DIR/mongo/idl/idl_parser',
'$BUILD_DIR/mongo/util/cmdline_utils/cmdline_utils',
'$BUILD_DIR/mongo/util/options_parser/options_parser',
+ 'server_parameter',
],
)
diff --git a/src/mongo/logger/SConscript b/src/mongo/logger/SConscript
index df030635384..c0761bdac92 100644
--- a/src/mongo/logger/SConscript
+++ b/src/mongo/logger/SConscript
@@ -11,30 +11,29 @@ env.Library('parse_log_component_settings',
# writes multi-byte sequences to console
# to support manual testing of console stream under Windows
# output should be visually verified under Command Prompt or Power Shell
-env.Program('console_test', 'console_test.cpp',
- LIBDEPS=['$BUILD_DIR/mongo/base',
- '$BUILD_DIR/mongo/unittest/unittest_main'])
-
-env.CppUnitTest('log_component_settings_test', 'log_component_settings_test.cpp',
- LIBDEPS=['$BUILD_DIR/mongo/base'])
-
-env.CppUnitTest('log_test', 'log_test.cpp',
- LIBDEPS=['$BUILD_DIR/mongo/base'])
-
-env.CppUnitTest('log_function_test', 'log_function_test.cpp',
- LIBDEPS=['$BUILD_DIR/mongo/base'])
-
-env.CppUnitTest('rotatable_file_writer_test',
- 'rotatable_file_writer_test.cpp',
- LIBDEPS=['$BUILD_DIR/mongo/base'])
-
-env.CppUnitTest(target='parse_log_component_settings_test',
- source='parse_log_component_settings_test.cpp',
- LIBDEPS=['$BUILD_DIR/mongo/base', 'parse_log_component_settings'])
+env.Program(
+ target='console_test',
+ source=[
+ 'console_test.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/base',
+ '$BUILD_DIR/mongo/unittest/unittest_main'
+ ],
+)
-env.CppUnitTest(target='redaction_test',
- source='redaction_test.cpp',
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ]
+env.CppUnitTest(
+ target='logger_test',
+ source=[
+ 'log_component_settings_test.cpp',
+ 'log_function_test.cpp',
+ 'log_test.cpp',
+ 'parse_log_component_settings_test.cpp',
+ 'redaction_test.cpp',
+ 'rotatable_file_writer_test.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/base',
+ 'parse_log_component_settings',
+ ],
)
diff --git a/src/mongo/platform/SConscript b/src/mongo/platform/SConscript
index a1b1e9ae134..e6ec2c4d004 100644
--- a/src/mongo/platform/SConscript
+++ b/src/mongo/platform/SConscript
@@ -4,13 +4,18 @@ Import("env")
env = env.Clone()
-env.CppUnitTest('atomic_proxy_test', 'atomic_proxy_test.cpp')
-env.CppUnitTest('atomic_word_test', 'atomic_word_test.cpp')
-env.CppUnitTest('bits_test', 'bits_test.cpp')
-env.CppUnitTest('endian_test', 'endian_test.cpp')
-env.CppUnitTest('process_id_test', 'process_id_test.cpp')
-env.CppUnitTest('random_test', 'random_test.cpp')
-env.CppUnitTest('stack_locator_test', 'stack_locator_test.cpp')
-env.CppUnitTest('decimal128_test', 'decimal128_test.cpp')
-env.CppUnitTest('decimal128_bson_test', 'decimal128_bson_test.cpp')
-env.CppUnitTest('overflow_arithmetic_test', 'overflow_arithmetic_test.cpp')
+env.CppUnitTest(
+ target='platform_test',
+ source=[
+ 'atomic_proxy_test.cpp',
+ 'atomic_word_test.cpp',
+ 'bits_test.cpp',
+ 'endian_test.cpp',
+ 'process_id_test.cpp',
+ 'random_test.cpp',
+ 'stack_locator_test.cpp',
+ 'decimal128_test.cpp',
+ 'decimal128_bson_test.cpp',
+ 'overflow_arithmetic_test.cpp'
+ ],
+)
diff --git a/src/mongo/rpc/SConscript b/src/mongo/rpc/SConscript
index b195aa6534e..02ad43cffb1 100644
--- a/src/mongo/rpc/SConscript
+++ b/src/mongo/rpc/SConscript
@@ -118,64 +118,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target=[
- 'rpc_metadata_test',
- ],
- source=[
- 'metadata_test.cpp',
- 'metadata/egress_metadata_hook_list_test.cpp',
- 'metadata/logical_time_metadata_test.cpp',
- 'metadata/sharding_metadata_test.cpp',
- 'metadata/tracking_metadata_test.cpp',
- ],
- LIBDEPS=[
- 'metadata',
- ],
-)
-
-env.CppUnitTest(
- target=[
- 'rpc_test',
- ],
- source=[
- 'get_status_from_command_result_test.cpp',
- 'legacy_request_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',
- 'rpc',
- ],
-)
-
-env.CppUnitTest(
- target='repl_set_metadata_test',
- source=[
- 'metadata/repl_set_metadata_test.cpp',
- ],
- LIBDEPS=['metadata']
-)
-
-env.CppUnitTest(
- target='oplog_query_metadata_test',
- source=[
- 'metadata/oplog_query_metadata_test.cpp',
- ],
- LIBDEPS=['metadata']
-)
-
-env.CppUnitTest(
- target='config_server_metadata_test',
- source=[
- 'metadata/config_server_metadata_test.cpp',
- ],
- LIBDEPS=['metadata']
-)
env.Library(
target='client_metadata',
@@ -195,17 +137,35 @@ env.Library(
)
env.CppUnitTest(
- target='client_metadata_test',
+ 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/logical_time_metadata_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='op_msg_integration_test',
+ target='rpc_integration_test',
source=[
'op_msg_integration_test.cpp',
],
diff --git a/src/mongo/s/SConscript b/src/mongo/s/SConscript
index 5895fe69372..aac39f39858 100644
--- a/src/mongo/s/SConscript
+++ b/src/mongo/s/SConscript
@@ -270,59 +270,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='cluster_last_error_info_test',
- source=[
- 'cluster_last_error_info_test.cpp',
- ],
- LIBDEPS=[
- 'cluster_last_error_info',
- 'sharding_router_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target='sharding_common_test',
- source=[
- 'catalog/type_changelog_test.cpp',
- 'catalog/type_chunk_test.cpp',
- 'catalog/type_collection_test.cpp',
- 'catalog/type_config_version_test.cpp',
- 'catalog/type_database_test.cpp',
- 'catalog/type_lockpings_test.cpp',
- 'catalog/type_locks_test.cpp',
- 'catalog/type_mongos_test.cpp',
- 'catalog/type_shard_collection_test.cpp',
- 'catalog/type_shard_test.cpp',
- 'catalog/type_tags_test.cpp',
- 'chunk_version_test.cpp',
- 'shard_id_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- 'common_s',
- ]
-)
-
-env.CppUnitTest('request_types_test',
- source=[
- 'request_types/add_shard_request_test.cpp',
- 'request_types/add_shard_to_zone_request_test.cpp',
- 'request_types/balance_chunk_request_test.cpp',
- 'request_types/commit_chunk_migration_request_test.cpp',
- 'request_types/merge_chunk_request_test.cpp',
- 'request_types/migration_secondary_throttle_options_test.cpp',
- 'request_types/move_chunk_request_test.cpp',
- 'request_types/remove_shard_from_zone_request_test.cpp',
- 'request_types/set_shard_version_request_test.cpp',
- 'request_types/split_chunk_request_test.cpp',
- 'request_types/update_zone_key_range_request_test.cpp',
- ],
- LIBDEPS=[
- 'common_s',
- ],
-)
-
env.Library(
target='sharding_task_executor',
source=[
@@ -338,17 +285,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='sharding_task_executor_test',
- source=[
- 'sharding_task_executor_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- 'sharding_task_executor',
- 'shard_server_test_fixture',
- ],
-)
# This library contains sharding functionality used by both mongod and mongos
env.Library(
@@ -397,21 +333,6 @@ env.Benchmark(
],
)
-env.CppUnitTest(
- target='sharding_routing_table_test',
- source=[
- 'catalog_cache_refresh_test.cpp',
- 'chunk_manager_index_bounds_test.cpp',
- 'chunk_manager_query_test.cpp',
- 'chunk_test.cpp',
- 'routing_table_history_test.cpp',
- 'shard_key_pattern_test.cpp',
- ],
- LIBDEPS=[
- 'catalog_cache_test_fixture',
- ]
-)
-
env.Library(
target='chunk_writes_tracker',
source=[
@@ -422,16 +343,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='chunk_writes_tracker_test',
- source=[
- 'chunk_writes_tracker_test.cpp',
- ],
- LIBDEPS=[
- 'chunk_writes_tracker',
- ]
-)
-
env.Library(
target='catalog_cache_test_fixture',
source=[
@@ -490,60 +401,62 @@ env.Library(
)
env.CppUnitTest(
- target='cluster_commands_helpers_test',
+ target='s_test',
source=[
'append_raw_responses_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/s/catalog/sharding_catalog_client_mock',
- 'shard_server_test_fixture',
- 'sharding_router_api',
- ]
-)
-
-env.CppUnitTest(
- target='balancer_configuration_test',
- source=[
'balancer_configuration_test.cpp',
- ],
- LIBDEPS=[
- 'coreshard',
- 'sharding_router_test_fixture',
- ]
-)
-
-env.CppUnitTest(
- target='cluster_identity_loader_test',
- source=[
- 'cluster_identity_loader_test.cpp',
- ],
- LIBDEPS=[
- 'coreshard',
- 'sharding_router_test_fixture',
- ]
-)
-
-env.CppUnitTest(
- target='sharding_legacy_api_test',
- source=[
+ 'catalog/type_changelog_test.cpp',
+ 'catalog/type_chunk_test.cpp',
+ 'catalog/type_collection_test.cpp',
+ 'catalog/type_config_version_test.cpp',
+ 'catalog/type_database_test.cpp',
+ 'catalog/type_lockpings_test.cpp',
+ 'catalog/type_locks_test.cpp',
+ 'catalog/type_mongos_test.cpp',
+ 'catalog/type_shard_collection_test.cpp',
+ 'catalog/type_shard_test.cpp',
+ 'catalog/type_tags_test.cpp',
+ 'catalog_cache_refresh_test.cpp',
+ 'chunk_manager_index_bounds_test.cpp',
+ 'chunk_manager_query_test.cpp',
+ 'chunk_test.cpp',
+ 'chunk_version_test.cpp',
+ 'chunk_writes_tracker_test.cpp',
'client/shard_connection_test.cpp',
+ 'cluster_identity_loader_test.cpp',
+ 'cluster_last_error_info_test.cpp',
+ 'request_types/add_shard_request_test.cpp',
+ 'request_types/add_shard_to_zone_request_test.cpp',
+ 'request_types/balance_chunk_request_test.cpp',
+ 'request_types/commit_chunk_migration_request_test.cpp',
+ 'request_types/merge_chunk_request_test.cpp',
+ 'request_types/migration_secondary_throttle_options_test.cpp',
+ 'request_types/move_chunk_request_test.cpp',
+ 'request_types/remove_shard_from_zone_request_test.cpp',
+ 'request_types/set_shard_version_request_test.cpp',
+ 'request_types/split_chunk_request_test.cpp',
+ 'request_types/update_zone_key_range_request_test.cpp',
+ 'routing_table_history_test.cpp',
+ 'shard_id_test.cpp',
+ 'shard_key_pattern_test.cpp',
+ 'sharding_task_executor_test.cpp',
+ 'transaction_router_test.cpp',
],
LIBDEPS=[
+ '$BUILD_DIR/mongo/db/auth/authmocks',
+ '$BUILD_DIR/mongo/db/query/query_test_service_context',
'$BUILD_DIR/mongo/db/service_context_test_fixture',
'$BUILD_DIR/mongo/dbtests/mocklib',
+ '$BUILD_DIR/mongo/s/catalog/sharding_catalog_client_mock',
'$BUILD_DIR/mongo/util/net/network',
+ 'catalog_cache_test_fixture',
+ 'chunk_writes_tracker',
+ 'cluster_last_error_info',
+ 'common_s',
+ 'coreshard',
+ 'shard_server_test_fixture',
'sharding_legacy_api',
- ]
-)
-
-env.CppUnitTest(
- target='transaction_router_test',
- source=[
- 'transaction_router_test.cpp',
- ],
- LIBDEPS=[
- 'sharding_router_api',
'sharding_router_test_fixture',
- ]
+ 'sharding_task_executor',
+ ],
)
diff --git a/src/mongo/s/catalog/SConscript b/src/mongo/s/catalog/SConscript
index f4618bcd300..9c0cbcf2efa 100644
--- a/src/mongo/s/catalog/SConscript
+++ b/src/mongo/s/catalog/SConscript
@@ -124,10 +124,12 @@ env.Library(
)
env.CppUnitTest(
- target='replset_dist_lock_manager_test',
+ target='s_catalog_test',
source=[
'dist_lock_catalog_impl_test.cpp',
'replset_dist_lock_manager_test.cpp',
+ 'sharding_catalog_test.cpp',
+ 'sharding_catalog_write_retry_test.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/auth/authmocks',
@@ -135,19 +137,8 @@ env.CppUnitTest(
'$BUILD_DIR/mongo/s/catalog/dist_lock_catalog_mock',
'$BUILD_DIR/mongo/s/catalog/sharding_catalog_client_mock',
'$BUILD_DIR/mongo/s/shard_server_test_fixture',
+ '$BUILD_DIR/mongo/s/sharding_router_test_fixture',
'dist_lock_catalog_impl',
'replset_dist_lock_manager',
]
)
-
-env.CppUnitTest(
- target='sharding_catalog_client_test',
- source=[
- 'sharding_catalog_test.cpp',
- 'sharding_catalog_write_retry_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/storage/duplicate_key_error_info',
- '$BUILD_DIR/mongo/s/sharding_router_test_fixture',
- ]
-)
diff --git a/src/mongo/s/client/SConscript b/src/mongo/s/client/SConscript
index 6f978b359b7..6ff42b50705 100644
--- a/src/mongo/s/client/SConscript
+++ b/src/mongo/s/client/SConscript
@@ -23,29 +23,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='shard_remote_test',
- source=[
- 'shard_remote_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/s/sharding_router_test_fixture',
- '$BUILD_DIR/mongo/s/query/async_results_merger',
- 'sharding_client',
- ],
-)
-
-env.CppUnitTest(
- target='shard_registry_test',
- source=[
- 'shard_registry_data_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/s/coreshard',
- '$BUILD_DIR/mongo/s/sharding_router_test_fixture',
- ],
-)
-
env.Library(
target='shard_interface',
source=[
@@ -85,7 +62,23 @@ env.Library(
)
env.CppUnitTest(
- target='shard_local_test',
+ target='mongos_client_test',
+ source=[
+ 'shard_registry_data_test.cpp',
+ 'shard_remote_test.cpp',
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/s/coreshard',
+ '$BUILD_DIR/mongo/s/query/async_results_merger',
+ '$BUILD_DIR/mongo/s/sharding_router_test_fixture',
+ 'sharding_client',
+ ],
+)
+
+# The shard local test globally sets server options into the config
+# server state, which is incompatible with the other tests.
+env.CppUnitTest(
+ target='mongos_client_local_test',
source=[
'shard_local_test.cpp',
],
diff --git a/src/mongo/s/commands/SConscript b/src/mongo/s/commands/SConscript
index a67aa933000..4666840e7e7 100644
--- a/src/mongo/s/commands/SConscript
+++ b/src/mongo/s/commands/SConscript
@@ -142,7 +142,7 @@ env.Library(
)
env.CppUnitTest(
- target="cluster_commands_test",
+ target="s_commands_test",
source=[
"cluster_delete_test.cpp",
"cluster_distinct_test.cpp",
@@ -150,6 +150,7 @@ env.CppUnitTest(
"cluster_find_test.cpp",
"cluster_insert_test.cpp",
"cluster_update_test.cpp",
+ "document_shard_key_update_test.cpp",
],
LIBDEPS=[
'cluster_commands',
@@ -158,14 +159,3 @@ env.CppUnitTest(
'$BUILD_DIR/mongo/db/auth/saslauth',
],
)
-
-env.CppUnitTest(
- target='document_shard_key_update_test',
- source=[
- 'document_shard_key_update_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- 'cluster_commands',
- ]
-)
diff --git a/src/mongo/s/query/SConscript b/src/mongo/s/query/SConscript
index 11ab78e5cb5..c97f7fefb16 100644
--- a/src/mongo/s/query/SConscript
+++ b/src/mongo/s/query/SConscript
@@ -51,20 +51,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target="cluster_aggregate_test",
- source=[
- "cluster_aggregate_test.cpp",
- "cluster_aggregation_planner_test.cpp",
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/auth/saslauth',
- '$BUILD_DIR/mongo/s/commands/cluster_command_test_fixture',
- 'cluster_aggregate',
- ],
-)
-
env.Library(
target="cluster_client_cursor",
source=[
@@ -92,19 +78,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="router_exec_stage_test",
- source=[
- "router_stage_limit_test.cpp",
- "router_stage_remove_metadata_fields_test.cpp",
- "router_stage_skip_test.cpp",
- ],
- LIBDEPS=[
- 'router_exec_stage',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- ],
-)
-
env.Library(
target="async_results_merger",
source=[
@@ -133,35 +106,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="results_merger_test",
- source=[
- "blocking_results_merger_test.cpp",
- "async_results_merger_test.cpp",
- "results_merger_test_fixture.cpp",
- ],
- LIBDEPS=[
- 'async_results_merger',
- 'cluster_client_cursor',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/query/query_request',
- '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture',
- '$BUILD_DIR/mongo/s/sharding_router_test_fixture',
- ],
-)
-
-env.CppUnitTest(
- target="establish_cursors_test",
- source=[
- "establish_cursors_test.cpp",
- ],
- LIBDEPS=[
- 'async_results_merger',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/query/query_request',
- '$BUILD_DIR/mongo/s/sharding_router_test_fixture',
- ],
-)
env.Library(
target="store_possible_cursor",
source=[
@@ -176,19 +120,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="store_possible_cursor_test",
- source=[
- "store_possible_cursor_test.cpp",
- ],
- LIBDEPS=[
- 'store_possible_cursor',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/query/query_test_service_context',
- '$BUILD_DIR/mongo/util/clock_source_mock',
- ],
-)
-
env.Library(
target="cluster_cursor_manager",
source=[
@@ -205,20 +136,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="cluster_cursor_manager_test",
- source=[
- "cluster_cursor_manager_test.cpp",
- ],
- LIBDEPS=[
- "$BUILD_DIR/mongo/db/logical_session_id",
- "$BUILD_DIR/mongo/db/service_context_test_fixture",
- "$BUILD_DIR/mongo/util/clock_source_mock",
- "cluster_client_cursor_mock",
- "cluster_cursor_manager",
- ],
-)
-
env.Library(
target="cluster_cursor_cleanup_job",
source=[
@@ -232,13 +149,38 @@ env.Library(
)
env.CppUnitTest(
- target="cluster_client_cursor_impl_test",
+ target="s_query_test",
source=[
+ "async_results_merger_test.cpp",
+ "blocking_results_merger_test.cpp",
+ "cluster_aggregate_test.cpp",
+ "cluster_aggregation_planner_test.cpp",
"cluster_client_cursor_impl_test.cpp",
+ "cluster_cursor_manager_test.cpp",
+ "establish_cursors_test.cpp",
+ "results_merger_test_fixture.cpp",
+ "router_stage_limit_test.cpp",
+ "router_stage_remove_metadata_fields_test.cpp",
+ "router_stage_skip_test.cpp",
+ "store_possible_cursor_test.cpp",
],
LIBDEPS=[
- 'cluster_client_cursor',
- '$BUILD_DIR/mongo/db/auth/authmocks',
- '$BUILD_DIR/mongo/db/service_context_test_fixture',
+ "$BUILD_DIR/mongo/db/auth/authmocks",
+ "$BUILD_DIR/mongo/db/auth/saslauth",
+ "$BUILD_DIR/mongo/db/logical_session_id",
+ "$BUILD_DIR/mongo/db/query/query_request",
+ "$BUILD_DIR/mongo/db/query/query_test_service_context",
+ "$BUILD_DIR/mongo/db/service_context_test_fixture",
+ "$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture",
+ "$BUILD_DIR/mongo/s/commands/cluster_command_test_fixture",
+ "$BUILD_DIR/mongo/s/sharding_router_test_fixture",
+ "$BUILD_DIR/mongo/util/clock_source_mock",
+ "async_results_merger",
+ "cluster_aggregate",
+ "cluster_client_cursor",
+ "cluster_client_cursor_mock",
+ "cluster_cursor_manager",
+ "router_exec_stage",
+ "store_possible_cursor",
],
)
diff --git a/src/mongo/s/write_ops/SConscript b/src/mongo/s/write_ops/SConscript
index d1205ab42b4..ae8c54d2bd7 100644
--- a/src/mongo/s/write_ops/SConscript
+++ b/src/mongo/s/write_ops/SConscript
@@ -49,38 +49,22 @@ env.Library(
)
env.CppUnitTest(
- target='batch_write_types_test',
- source=[
- 'batched_command_request_test.cpp',
- 'batched_command_response_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/db/ops/write_ops_parsers_test_helpers',
- 'batch_write_types',
- ]
-)
-
-env.CppUnitTest(
- target='cluster_write_op_test',
+ target='s_write_ops_test',
source=[
+ 'batch_downconvert_test.cpp',
'batch_write_exec_test.cpp',
'batch_write_op_test.cpp',
+ 'batched_command_request_test.cpp',
+ 'batched_command_response_test.cpp',
'write_op_test.cpp',
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/auth/authmocks',
'$BUILD_DIR/mongo/db/logical_clock',
+ '$BUILD_DIR/mongo/db/ops/write_ops_parsers_test_helpers',
'$BUILD_DIR/mongo/s/sharding_router_test_fixture',
+ 'batch_write_types',
'cluster_write_op',
- ]
-)
-
-env.CppUnitTest(
- target='cluster_write_op_conversion_test',
- source=[
- 'batch_downconvert_test.cpp',
- ],
- LIBDEPS=[
'cluster_write_op_conversion',
- ]
+ ],
)
diff --git a/src/mongo/scripting/SConscript b/src/mongo/scripting/SConscript
index 03a3850ecec..bef5ce97394 100644
--- a/src/mongo/scripting/SConscript
+++ b/src/mongo/scripting/SConscript
@@ -40,16 +40,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='bson_template_evaluator_test',
- source=[
- 'bson_template_evaluator_test.cpp',
- ],
- LIBDEPS=[
- 'bson_template_evaluator',
- ],
-)
-
env.Library(
target='scripting_none',
source=[
@@ -157,11 +147,13 @@ env.Library(
)
env.CppUnitTest(
- target='deadline_monitor_test',
+ target='scripting_test',
source=[
+ 'bson_template_evaluator_test.cpp',
'deadline_monitor_test.cpp',
],
LIBDEPS=[
+ 'bson_template_evaluator',
'scripting_common',
],
)
diff --git a/src/mongo/shell/SConscript b/src/mongo/shell/SConscript
index e9bf5d5abdf..5764e49c365 100644
--- a/src/mongo/shell/SConscript
+++ b/src/mongo/shell/SConscript
@@ -109,16 +109,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='shell_options_test',
- source=[
- "shell_options_test.cpp",
- ],
- LIBDEPS=[
- 'shell_options_register',
- ],
-)
-
env.Library(
target='shell_utils',
source=[
@@ -141,17 +131,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='shell_utils_test',
- source=[
- 'shell_utils_test.cpp'
- ],
- LIBDEPS=[
- 'shell_utils',
- '$BUILD_DIR/mongo/util/signal_handlers',
- ]
-)
-
kmsEnv = env.Clone()
kmsEnv.InjectThirdParty(libraries=['kms-message'])
@@ -179,14 +158,6 @@ kmsEnv.Library(
],
)
-env.CppUnitTest(
- target='kms_test',
- source='kms_test.cpp',
- LIBDEPS=[
- 'kms',
- ]
-)
-
env.Library(
target="kms_shell",
source=[
@@ -217,3 +188,18 @@ scriptingEnv.Library(
'kms',
],
)
+
+env.CppUnitTest(
+ target='shell_test',
+ source=[
+ 'kms_test.cpp',
+ 'shell_options_test.cpp',
+ 'shell_utils_test.cpp'
+ ],
+ LIBDEPS=[
+ '$BUILD_DIR/mongo/util/signal_handlers',
+ 'kms',
+ 'shell_options_register',
+ 'shell_utils',
+ ],
+)
diff --git a/src/mongo/transport/SConscript b/src/mongo/transport/SConscript
index 71e8c4f0f2b..a7819b90e67 100644
--- a/src/mongo/transport/SConscript
+++ b/src/mongo/transport/SConscript
@@ -78,38 +78,6 @@ env.Library(
]
)
-tlEnv.CppUnitTest(
- target='transport_layer_asio_test',
- source=[
- 'transport_layer_asio_test.cpp',
- ],
- LIBDEPS=[
- 'transport_layer',
- '$BUILD_DIR/mongo/base',
- '$BUILD_DIR/mongo/rpc/protocol',
- '$BUILD_DIR/mongo/util/net/socket',
- ],
- LIBDEPS_PRIVATE=[
- '$BUILD_DIR/third_party/shim_asio',
- ],
-)
-
-tlEnv.CppIntegrationTest(
- target='transport_layer_asio_integration_test',
- source=[
- 'transport_layer_asio_integration_test.cpp',
- ],
- LIBDEPS=[
- 'transport_layer_egress_init',
- '$BUILD_DIR/mongo/base',
- '$BUILD_DIR/mongo/client/async_client',
- '$BUILD_DIR/mongo/executor/task_executor_interface',
- '$BUILD_DIR/mongo/util/net/network',
- '$BUILD_DIR/mongo/util/version_impl',
- '$BUILD_DIR/third_party/shim_asio',
- ],
-)
-
tlEnv.Library(
target='service_executor',
source=[
@@ -129,36 +97,6 @@ tlEnv.Library(
],
)
-tlEnv.CppUnitTest(
- target='service_executor_test',
- source=[
- 'service_executor_test.cpp',
- ],
- LIBDEPS=[
- 'service_executor',
- '$BUILD_DIR/mongo/db/service_context',
- '$BUILD_DIR/mongo/unittest/unittest',
- '$BUILD_DIR/third_party/shim_asio',
- ],
-)
-
-# Disable this test until SERVER-30475 and associated build failure tickets
-# are resolved.
-#
-# tlEnv.CppUnitTest(
-# target='service_executor_adaptive_test',
-# source=[
-# 'service_executor_adaptive_test.cpp',
-# ],
-# LIBDEPS=[
-# 'service_executor',
-# '$BUILD_DIR/mongo/db/service_context',
-# '$BUILD_DIR/mongo/unittest/unittest',
-# '$BUILD_DIR/mongo/util/clock_source_mock',
-# '$BUILD_DIR/third_party/shim_asio',
-# ],
-# )
-
env.Library(
target='service_entry_point',
source=[
@@ -181,35 +119,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='max_conns_override_test',
- source=[
- 'max_conns_override_test.cpp',
- ],
- LIBDEPS=[
- 'service_entry_point',
- 'transport_layer_mock',
- '$BUILD_DIR/mongo/unittest/unittest'
- ],
-)
-
-env.CppUnitTest(
- target='service_state_machine_test',
- source=[
- 'service_state_machine_test.cpp',
- ],
- LIBDEPS=[
- 'service_entry_point',
- 'transport_layer_common',
- 'transport_layer_mock',
- '$BUILD_DIR/mongo/db/dbmessage',
- '$BUILD_DIR/mongo/db/service_context',
- '$BUILD_DIR/mongo/rpc/rpc',
- '$BUILD_DIR/mongo/unittest/unittest',
- '$BUILD_DIR/mongo/util/clock_source_mock',
- ],
-)
-
zlibEnv = env.Clone()
zlibEnv.InjectThirdParty(libraries=['zlib', 'zstd', 'snappy'])
zlibEnv.Library(
@@ -253,15 +162,50 @@ env.Library(
],
)
-env.CppUnitTest(
- target='message_compressor_test',
+tlEnv.CppUnitTest(
+ target='transport_test',
source=[
'message_compressor_manager_test.cpp',
'message_compressor_registry_test.cpp',
+ 'transport_layer_asio_test.cpp',
+ 'service_executor_test.cpp',
+ # Disable this test until SERVER-30475 and associated build failure tickets are resolved.
+ # 'service_executor_adaptive_test.cpp',
+ 'max_conns_override_test.cpp',
+ 'service_state_machine_test.cpp',
],
LIBDEPS=[
+ '$BUILD_DIR/mongo/base',
+ '$BUILD_DIR/mongo/db/dbmessage',
+ '$BUILD_DIR/mongo/db/service_context',
+ '$BUILD_DIR/mongo/rpc/protocol',
+ '$BUILD_DIR/mongo/rpc/rpc',
+ '$BUILD_DIR/mongo/unittest/unittest',
+ '$BUILD_DIR/mongo/util/clock_source_mock',
+ '$BUILD_DIR/mongo/util/net/socket',
+ '$BUILD_DIR/third_party/shim_asio',
'message_compressor',
'message_compressor_options_server',
- ]
+ 'service_entry_point',
+ 'service_executor',
+ 'transport_layer',
+ 'transport_layer_common',
+ 'transport_layer_mock',
+ ],
)
+tlEnv.CppIntegrationTest(
+ target='transport_integration_test',
+ source=[
+ 'transport_layer_asio_integration_test.cpp',
+ ],
+ LIBDEPS=[
+ 'transport_layer_egress_init',
+ '$BUILD_DIR/mongo/base',
+ '$BUILD_DIR/mongo/client/async_client',
+ '$BUILD_DIR/mongo/executor/task_executor_interface',
+ '$BUILD_DIR/mongo/util/net/network',
+ '$BUILD_DIR/mongo/util/version_impl',
+ '$BUILD_DIR/third_party/shim_asio',
+ ],
+)
diff --git a/src/mongo/unittest/SConscript b/src/mongo/unittest/SConscript
index 0114d81ec19..e85e031da38 100644
--- a/src/mongo/unittest/SConscript
+++ b/src/mongo/unittest/SConscript
@@ -70,26 +70,31 @@ bmEnv.Library(
],
)
-env.CppUnitTest('unittest_test', 'unittest_test.cpp')
-env.CppUnitTest('fixture_test', 'fixture_test.cpp')
-env.CppUnitTest('temp_dir_test', 'temp_dir_test.cpp')
-
-env.Benchmark(
- target='system_resource_canary_bm',
+env.Library(
+ target='task_executor_proxy',
source=[
- 'system_resource_canary_bm.cpp'
+ 'task_executor_proxy.cpp',
],
LIBDEPS=[
- '$BUILD_DIR/mongo/util/processinfo',
+ '$BUILD_DIR/mongo/executor/task_executor_interface',
],
)
-env.Library(
- target='task_executor_proxy',
+env.CppUnitTest(
+ target='unittest_test',
source=[
- 'task_executor_proxy.cpp',
+ 'unittest_test.cpp',
+ 'fixture_test.cpp',
+ 'temp_dir_test.cpp',
+ ],
+)
+
+env.Benchmark(
+ target='system_resource_canary_bm',
+ source=[
+ 'system_resource_canary_bm.cpp'
],
LIBDEPS=[
- '$BUILD_DIR/mongo/executor/task_executor_interface',
+ '$BUILD_DIR/mongo/util/processinfo',
],
)
diff --git a/src/mongo/util/SConscript b/src/mongo/util/SConscript
index 30089944be2..2c9dd3bfbc7 100644
--- a/src/mongo/util/SConscript
+++ b/src/mongo/util/SConscript
@@ -79,56 +79,6 @@ debuggerEnv.Library(
]
)
-env.CppUnitTest(
- target='decorable_test',
- source=[
- 'decorable_test.cpp'
- ],
- LIBDEPS=[
- ]
- )
-
-env.CppUnitTest(
- target='unique_function_test',
- source=[
- 'unique_function_test.cpp'
- ],
- LIBDEPS=[
- ],
- LIBDEPS_PRIVATE=[
- ],
-)
-
-env.CppUnitTest(
- target='represent_as_test',
- source=[
- 'represent_as_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- '$BUILD_DIR/third_party/shim_boost',
- ],
-)
-
-env.CppUnitTest(
- target='lru_cache_test',
- source=[
- 'lru_cache_test.cpp',
- ],
- LIBDEPS=[
- ],
-)
-
-env.CppUnitTest(
- target='invalidating_lru_cache_test',
- source=[
- 'invalidating_lru_cache_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
-)
-
env.Library(
target='summation',
source=[
@@ -139,18 +89,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='summation_test',
- source=[
- 'summation_test.cpp',
- ],
- LIBDEPS=[
- 'summation',
- '$BUILD_DIR/mongo/base',
- '$BUILD_DIR/third_party/shim_boost',
- ],
-)
-
env.Library(
target='progress_meter',
source=[
@@ -162,16 +100,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='progress_meter_test',
- source=[
- 'progress_meter_test.cpp',
- ],
- LIBDEPS=[
- 'progress_meter',
- ],
-)
-
env.Library(
target='md5',
source=[
@@ -180,17 +108,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="md5_test",
- source=[
- "md5_test.cpp",
- "md5main.cpp",
- ],
- LIBDEPS=[
- "md5",
- ],
-)
-
env.Library(
target='clock_source_mock',
source=[
@@ -201,16 +118,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='clock_source_mock_test',
- source=[
- 'clock_source_mock_test.cpp',
- ],
- LIBDEPS=[
- 'clock_source_mock',
- ],
-)
-
env.Library(
target='alarm',
source=[
@@ -223,55 +130,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='alarm_test',
- source=[
- 'alarm_test.cpp',
- ],
- LIBDEPS=[
- 'alarm',
- 'clock_source_mock',
- ]
-)
-
-env.CppUnitTest(
- target='tick_source_test',
- source=[
- 'tick_source_test.cpp',
- ],
- LIBDEPS=[],
-)
-
-env.CppUnitTest(
- target='text_test',
- source=[
- 'text_test.cpp'
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
-)
-
-env.CppUnitTest(
- target='time_support_test',
- source=[
- 'time_support_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
-)
-
-env.CppUnitTest(
- target="str_test",
- source=[
- "str_test.cpp",
- ],
- LIBDEPS=[
- "$BUILD_DIR/mongo/base",
- ],
-)
-
env.Library(
target="processinfo",
source=[
@@ -283,16 +141,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="processinfo_test",
- source=[
- "processinfo_test.cpp",
- ],
- LIBDEPS=[
- "processinfo",
- ],
-)
-
env.Library(
target="fail_point",
source=[
@@ -308,16 +156,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="fail_point_test",
- source=[
- "fail_point_test.cpp",
- ],
- LIBDEPS=[
- "fail_point",
- ],
-)
-
env.Library(
target="periodic_runner",
source=[
@@ -339,18 +177,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="periodic_runner_impl_test",
- source=[
- "periodic_runner_impl_test.cpp",
- ],
- LIBDEPS=[
- "$BUILD_DIR/mongo/db/service_context_test_fixture",
- "clock_source_mock",
- "periodic_runner_impl",
- ],
-)
-
env.Library(
target='periodic_runner_factory',
source=[
@@ -374,16 +200,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="background_job_test",
- source=[
- "background_job_test.cpp",
- ],
- LIBDEPS=[
- "background_job",
- ],
-)
-
if env['MONGO_ALLOCATOR'] in ['tcmalloc', 'tcmalloc-experimental']:
tcmspEnv = env.Clone()
@@ -457,17 +273,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='background_thread_clock_source_test',
- source=[
- 'background_thread_clock_source_test.cpp',
- ],
- LIBDEPS=[
- 'clock_source_mock',
- 'clock_sources',
- ],
-)
-
env.Library(
target='diagnostic_info',
source= [
@@ -479,17 +284,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='diagnostic_info_test',
- source=[
- 'diagnostic_info_test.cpp'
- ],
- LIBDEPS=[
- 'diagnostic_info',
- 'clock_source_mock',
- ]
-)
-
env.Benchmark(
target='clock_source_bm',
source=[
@@ -501,21 +295,6 @@ env.Benchmark(
],
)
-if env.TargetOSIs('windows'):
- env.CppUnitTest(
- target='ntservice_test',
- source=[
- 'ntservice_test.cpp',
- ],
- LIBDEPS=[
- 'ntservice',
- ],
- LIBS=[
- 'shell32',
- env['LIBS']
- ],
- )
-
env.Library(
target='elapsed_tracker',
source=[
@@ -578,23 +357,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='dns_query_test',
- source=['dns_query_test.cpp'],
- LIBDEPS=[
- 'dns_query',
- "$BUILD_DIR/mongo/base",
- ],
-)
-
-env.CppUnitTest(
- target='dns_name_test',
- source=['dns_name_test.cpp'],
- LIBDEPS=[
- "$BUILD_DIR/mongo/base",
- ],
-)
-
env.Library(
target="secure_zero_memory",
source=[
@@ -605,25 +367,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='secure_zero_memory_test',
- source=['secure_zero_memory_test.cpp'],
- LIBDEPS=[
- 'secure_zero_memory'
- ],
-)
-
-if not env.TargetOSIs('windows'):
- env.CppUnitTest(
- target='signal_handlers_synchronous_test',
- source=[
- 'signal_handlers_synchronous_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
- )
-
env.Library(
target="signal_handlers",
source=[
@@ -638,16 +381,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target="unowned_ptr_test",
- source=[
- "unowned_ptr_test.cpp",
- ],
- LIBDEPS=[
- # None since unowned_ptr is header-only.
- ],
-)
-
env.Library(
target='safe_num',
source=[
@@ -658,27 +391,6 @@ env.Library(
],
)
-env.CppUnitTest(
- target='safe_num_test',
- source=[
- 'safe_num_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- 'safe_num',
- ],
-)
-
-env.CppUnitTest(
- target='string_map_test',
- source=[
- 'string_map_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
-)
-
env.Library(
target='password',
source=[
@@ -693,106 +405,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='decimal_counter_test',
- source=[
- 'decimal_counter_test.cpp',
- ],
-)
-
-env.CppUnitTest(
- target='itoa_test',
- source=[
- 'itoa_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ]
-)
-
-env.CppUnitTest(
- target='producer_consumer_queue_test',
- source=[
- 'producer_consumer_queue_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- '$BUILD_DIR/mongo/db/service_context',
- ]
-)
-
-env.CppUnitTest(
- target='duration_test',
- source=[
- 'duration_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ])
-
-env.CppUnitTest(
- target='assert_util_test',
- source=[
- 'assert_util_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ]
-)
-
-env.CppUnitTest(
- target='base64_test',
- source=[
- 'base64_test.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
-)
-
-env.CppUnitTest(
- target='future_test',
- source=[
- # This list of targets is reverse speed order, to facilitate better ninja performance.
- 'future_test_future_void.cpp',
- 'future_test_future_int.cpp',
- 'future_test_future_move_only.cpp',
- 'future_test_executor_future.cpp',
- 'future_test_shared_future.cpp',
- 'future_test_edge_cases.cpp',
- 'future_test_promise_int.cpp',
- 'future_test_promise_void.cpp',
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
-)
-
-env.CppUnitTest(
- target='strong_weak_finish_line_test',
- source=[
- 'strong_weak_finish_line_test.cpp'
- ],
- LIBDEPS=[
- '$BUILD_DIR/mongo/base',
- ],
-)
-
-env.CppUnitTest(
- target="concepts_test",
- source=[
- "concepts_test.cpp",
- ],
- LIBDEPS=[
- ],
-)
-
-env.CppUnitTest(
- target='errno_util_test',
- source=[
- 'errno_util_test.cpp',
- ],
-)
env.Benchmark(
target='decimal_counter_bm',
@@ -830,15 +442,6 @@ if env.TargetOSIs('linux'):
],
)
- env.CppUnitTest(
- target='procparser_test',
- source=[
- 'procparser_test.cpp',
- ],
- LIBDEPS=[
- 'procparser',
- ])
-
if env.TargetOSIs('windows'):
env.Library(
target='perfctr_collect',
@@ -850,15 +453,6 @@ if env.TargetOSIs('windows'):
],
)
- env.CppUnitTest(
- target='perfctr_collect_test',
- source=[
- 'perfctr_collect_test.cpp',
- ],
- LIBDEPS=[
- 'perfctr_collect',
- ])
-
icuEnv = env.Clone()
if not use_system_version_of_library("icu"):
@@ -918,11 +512,92 @@ icuEnv.Library(
)
icuEnv.CppUnitTest(
- target='icu_test',
+ target='util_test',
source=[
+ 'alarm_test.cpp',
+ 'assert_util_test.cpp',
+ 'background_job_test.cpp',
+ 'background_thread_clock_source_test.cpp',
+ 'base64_test.cpp',
+ 'clock_source_mock_test.cpp',
+ 'concepts_test.cpp',
+ 'decimal_counter_test.cpp',
+ 'decorable_test.cpp',
+ 'diagnostic_info_test.cpp',
+ 'dns_name_test.cpp',
+ 'dns_query_test.cpp',
+ 'duration_test.cpp',
+ 'errno_util_test.cpp',
+ 'fail_point_test.cpp',
+ 'future_test_edge_cases.cpp',
+ 'future_test_executor_future.cpp',
+ 'future_test_future_int.cpp',
+ 'future_test_future_move_only.cpp',
+ 'future_test_future_void.cpp',
+ 'future_test_promise_int.cpp',
+ 'future_test_promise_void.cpp',
+ 'future_test_shared_future.cpp',
'icu_test.cpp',
+ 'invalidating_lru_cache_test.cpp',
+ 'itoa_test.cpp',
+ 'lru_cache_test.cpp',
+ 'md5_test.cpp',
+ 'md5main.cpp',
+ 'periodic_runner_impl_test.cpp',
+ 'processinfo_test.cpp',
+ 'procparser_test.cpp' if env.TargetOSIs('linux') else [],
+ 'producer_consumer_queue_test.cpp',
+ 'progress_meter_test.cpp',
+ 'represent_as_test.cpp',
+ 'safe_num_test.cpp',
+ 'secure_zero_memory_test.cpp',
+ 'signal_handlers_synchronous_test.cpp' if not env.TargetOSIs('windows') else [],
+ 'str_test.cpp',
+ 'string_map_test.cpp',
+ 'strong_weak_finish_line_test.cpp',
+ 'summation_test.cpp',
+ 'text_test.cpp',
+ 'tick_source_test.cpp',
+ 'time_support_test.cpp',
+ 'unique_function_test.cpp',
+ 'unowned_ptr_test.cpp',
],
LIBDEPS=[
+ '$BUILD_DIR/mongo/base',
+ '$BUILD_DIR/mongo/db/service_context',
+ '$BUILD_DIR/mongo/db/service_context_test_fixture',
+ 'alarm',
+ 'background_job',
+ 'clock_source_mock',
+ 'clock_sources',
+ 'diagnostic_info',
+ 'dns_query',
+ 'fail_point',
'icu',
+ 'md5',
+ 'periodic_runner_impl',
+ 'processinfo',
+ 'procparser' if env.TargetOSIs('linux') else [],
+ 'progress_meter',
+ 'safe_num',
+ 'secure_zero_memory',
+ 'summation',
],
)
+
+if env.TargetOSIs('windows'):
+ env.CppUnitTest(
+ target='util_windows_test',
+ source=[
+ 'ntservice_test.cpp',
+ 'perfctr_collect_test.cpp',
+ ],
+ LIBDEPS=[
+ 'ntservice',
+ 'perfctr_collect',
+ ],
+ LIBS=[
+ 'shell32',
+ env['LIBS']
+ ],
+ )
diff --git a/src/mongo/util/concurrency/SConscript b/src/mongo/util/concurrency/SConscript
index 05862f057aa..535635079a0 100644
--- a/src/mongo/util/concurrency/SConscript
+++ b/src/mongo/util/concurrency/SConscript
@@ -25,14 +25,6 @@ env.Library(
]
)
-env.CppUnitTest(
- target='thread_pool_test',
- source=['thread_pool_test.cpp'],
- LIBDEPS=[
- 'thread_pool',
- 'thread_pool_test_fixture',
- ])
-
env.Library('ticketholder',
['ticketholder.cpp'],
LIBDEPS=[
@@ -41,15 +33,6 @@ env.Library('ticketholder',
'$BUILD_DIR/third_party/shim_boost',
])
-
-env.CppUnitTest(
- target='ticketholder_test',
- source=['ticketholder_test.cpp'],
- LIBDEPS=[
- 'ticketholder',
- '$BUILD_DIR/mongo/unittest/unittest',
- ])
-
env.Library(
target='spin_lock',
source=[
@@ -58,18 +41,17 @@ env.Library(
)
env.CppUnitTest(
- target='spin_lock_test',
+ target='util_concurrency_test',
source=[
'spin_lock_test.cpp',
+ 'thread_pool_test.cpp',
+ 'ticketholder_test.cpp',
+ 'with_lock_test.cpp',
],
LIBDEPS=[
'spin_lock',
- '$BUILD_DIR/third_party/shim_boost',
- ],
+ 'thread_pool',
+ 'thread_pool_test_fixture',
+ 'ticketholder',
+ ]
)
-
-env.CppUnitTest(
- target='with_lock_test',
- source=[
- 'with_lock_test.cpp',
- ])
diff --git a/src/mongo/util/net/SConscript b/src/mongo/util/net/SConscript
index ed24016b30d..daddb3c4ed0 100644
--- a/src/mongo/util/net/SConscript
+++ b/src/mongo/util/net/SConscript
@@ -195,7 +195,7 @@ else:
)
env.CppUnitTest(
- target='network_test',
+ target='util_net_test',
source=[
'cidr_test.cpp',
'hostandport_test.cpp',
@@ -207,7 +207,7 @@ env.CppUnitTest(
if get_option('ssl') == 'on':
env.CppUnitTest(
- target='ssl_manager_test',
+ target='util_net_ssl_test',
source=[
'ssl_manager_test.cpp',
'ssl_options_test.cpp',
diff --git a/src/mongo/util/options_parser/SConscript b/src/mongo/util/options_parser/SConscript
index fa848de7a41..22507bd4f0e 100644
--- a/src/mongo/util/options_parser/SConscript
+++ b/src/mongo/util/options_parser/SConscript
@@ -38,10 +38,14 @@ optsEnv.Library(
env.Library('options_parser_init', ['options_parser_init.cpp'],
LIBDEPS=['options_parser'])
-env.CppUnitTest('options_parser_test',
- 'options_parser_test.cpp',
- LIBDEPS=['options_parser', '$BUILD_DIR/mongo/unittest/unittest'])
-
-env.CppUnitTest('environment_test',
- 'environment_test.cpp',
- LIBDEPS=['options_parser', '$BUILD_DIR/mongo/unittest/unittest'])
+env.CppUnitTest(
+ target='options_parser_test',
+ source=[
+ 'environment_test.cpp',
+ 'options_parser_test.cpp',
+ ],
+ LIBDEPS=[
+ 'options_parser',
+ '$BUILD_DIR/mongo/unittest/unittest',
+ ],
+)