@@ -871,57 +871,67 @@ quick_exit_env.Library(target='quick_exit',
871871 'util/quick_exit.cpp' ,
872872 ])
873873
874- env .Library ('coreshard' ,
875- [
876- # This is only here temporarily for auto-split logic in chunk.cpp.
877- 's/balancer_policy.cpp' ,
878- 's/distlock.cpp' ,
879- 's/config.cpp' ,
880- 's/grid.cpp' ,
881- 's/chunk.cpp' ,
882- 's/chunk_manager.cpp' ,
883- 's/config_server_checker_service.cpp' ,
884- 's/shard_key_pattern.cpp'
885- ],
886- LIBDEPS = [
887- '$BUILD_DIR/mongo/s/base' ,
888- '$BUILD_DIR/mongo/s/client/sharding_client' ,
889- '$BUILD_DIR/mongo/s/cluster_ops_impl' ,
890- ])
891-
892- env .Library ('mongoscore' ,
893- [
894- 's/balance.cpp' ,
895- 's/cluster_last_error_info.cpp' ,
896- 's/cursors.cpp' ,
897- 's/request.cpp' ,
898- 's/s_only.cpp' ,
899- 's/strategy.cpp' ,
900- 's/version_manager.cpp' ,
901- 's/version_mongos.cpp' ,
902- ],
903- LIBDEPS = [
904- 'db/auth/authmongos' ,
905- 'db/fts/ftsmongos' ,
906- 'db/query/explain_common' ,
907- 'db/query/lite_parsed_query' ,
908- 's/cluster_ops' ,
909- 's/cluster_write_op_conversion' ,
910- ])
874+ # This library contains sharding functionality used by both mongod and mongos. Certain tests,
875+ # which exercise this functionality also link against it.
876+ env .Library (
877+ target = 'coreshard' ,
878+ source = [
879+ # This is only here temporarily for auto-split logic in chunk.cpp.
880+ 's/balancer_policy.cpp' ,
881+ 's/distlock.cpp' ,
882+ 's/config.cpp' ,
883+ 's/grid.cpp' ,
884+ 's/chunk.cpp' ,
885+ 's/chunk_manager.cpp' ,
886+ 's/config_server_checker_service.cpp' ,
887+ 's/shard_key_pattern.cpp' ,
888+ 's/version_manager.cpp' ,
889+ ],
890+ LIBDEPS = [
891+ 's/base' ,
892+ 's/client/sharding_client' ,
893+ 's/cluster_ops_impl' ,
894+ ]
895+ )
911896
912- env .CppUnitTest ("mongoscore_test" ,
913- ["s/shard_key_pattern_test.cpp" ,
914- "s/balancing_window_test.cpp" ,
915- "s/balancer_policy_tests.cpp" ,
916- ],
917- LIBDEPS = ["mongoscore" ,
918- "coreshard" ,
919- "mongocommon" ,
920- "coreserver" ,
921- "coredb" ])
897+ # This library is only used by the mongos execuable and any tests which require mongos runtime
898+ # objects, such as the request processing pipeline or the balancer.
899+ env .Library (
900+ target = 'mongoscore' ,
901+ source = [
902+ 's/balance.cpp' ,
903+ 's/cluster_last_error_info.cpp' ,
904+ 's/cursors.cpp' ,
905+ 's/request.cpp' ,
906+ 's/s_only.cpp' ,
907+ 's/strategy.cpp' ,
908+ 's/version_mongos.cpp' ,
909+ ],
910+ LIBDEPS = [
911+ 'db/auth/authmongos' ,
912+ 'db/fts/ftsmongos' ,
913+ 'db/query/explain_common' ,
914+ 'db/query/lite_parsed_query' ,
915+ 's/cluster_ops' ,
916+ 's/cluster_write_op_conversion' ,
917+ ]
918+ )
922919
923- env .CppUnitTest ("dbclient_rs_test" , [ "client/dbclient_rs_test.cpp" ],
924- LIBDEPS = ['$BUILD_DIR/mongo/client/clientdriver' , 'mocklib' ])
920+ env .CppUnitTest (
921+ target = 'mongoscore_test' ,
922+ source = [
923+ 's/shard_key_pattern_test.cpp' ,
924+ 's/balancing_window_test.cpp' ,
925+ 's/balancer_policy_tests.cpp' ,
926+ ],
927+ LIBDEPS = [
928+ 'mongoscore' ,
929+ 'coreshard' ,
930+ 'mongocommon' ,
931+ 'coreserver' ,
932+ 'coredb' ,
933+ ]
934+ )
925935
926936env .CppUnitTest ("scoped_db_conn_test" , [ "client/scoped_db_conn_test.cpp" ],
927937 LIBDEPS = [
@@ -934,15 +944,6 @@ env.CppUnitTest("scoped_db_conn_test", [ "client/scoped_db_conn_test.cpp" ],
934944 "ntservice_mock" ],
935945 NO_CRUTCH = True )
936946
937- env .CppUnitTest ("shard_test" , [ "s/shard_test.cpp" ],
938- LIBDEPS = [ "mongoscore" ,
939- "coreshard" ,
940- "mongocommon" ,
941- "coreserver" ,
942- "coredb" ,
943- "message_server_port" ,
944- "mocklib" ])
945-
946947env .CppUnitTest ('config_server_tests' , [ 's/config_server_tests.cpp' ],
947948 LIBDEPS = [ "mongoscore" ,
948949 "coreshard" ,
@@ -969,8 +970,6 @@ if has_option( 'use-cpu-profiler' ):
969970 # just to this file.
970971 env .InjectThirdPartyIncludePaths ('tcmalloc' )
971972
972- env .Library ("defaultversion" , "s/default_version.cpp" )
973-
974973env .CppUnitTest (
975974 target = "index_filter_commands_test" ,
976975 source = [
@@ -1043,7 +1042,6 @@ serveronlyLibdeps = ["coreshard",
10431042 "db/concurrency/lock_manager" ,
10441043 "db/concurrency/write_conflict_exception" ,
10451044 "db/ops/update_driver" ,
1046- "defaultversion" ,
10471045 "global_timestamp" ,
10481046 "index_key_validate" ,
10491047 'range_deleter' ,
0 commit comments