# -*- mode: python -*- Import('env') env = env.Clone() env.Library( target='transport_layer_common', source=[ 'service_entry_point_utils.cpp', 'session.cpp', 'transport_layer.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', ], ) env.Library( target='transport_layer_mock', source=[ 'transport_layer_mock.cpp', ], LIBDEPS=[ 'transport_layer_common', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/util/net/network', ], ) tlEnv = env.Clone() tlEnv.InjectThirdPartyIncludePaths(libraries=['asio']) tlEnv.Library( target='transport_layer_manager', source=[ 'transport_layer_manager.cpp', ], LIBDEPS=[ 'transport_layer', ], LIBDEPS_PRIVATE=[ 'service_executor', '$BUILD_DIR/third_party/shim_asio', ], ) tlEnv.Library( target='transport_layer', source=[ 'transport_layer_asio.cpp', ], LIBDEPS=[ 'transport_layer_common', '$BUILD_DIR/mongo/base/system_error', '$BUILD_DIR/mongo/db/auth/authentication_restriction', '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/mongo/db/service_context', '$BUILD_DIR/mongo/db/stats/counters', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/util/net/ssl_manager', '$BUILD_DIR/third_party/shim_asio', ], ) # This library will initialize an egress transport layer in a mongo initializer # for C++ tests that require networking. env.Library( target='transport_layer_egress_init', source=[ 'transport_layer_egress_init.cpp', ], LIBDEPS_PRIVATE=[ 'transport_layer', ] ) 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=[ 'service_executor_adaptive.cpp', 'service_executor_synchronous.cpp', 'thread_idle_callback.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/service_context', ], LIBDEPS_PRIVATE=[ "$BUILD_DIR/mongo/util/processinfo", '$BUILD_DIR/third_party/shim_asio', 'transport_layer_common', ], ) 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=[ 'service_entry_point_impl.cpp', 'service_state_machine.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/auth/authentication_restriction', '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/mongo/db/service_context', '$BUILD_DIR/mongo/db/stats/counters', '$BUILD_DIR/mongo/rpc/protocol', '$BUILD_DIR/mongo/util/processinfo', 'transport_layer_common', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/transport/message_compressor', ], ) 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.InjectThirdPartyIncludePaths(libraries=['zlib', 'snappy']) zlibEnv.Library( target='message_compressor', source=[ 'message_compressor_manager.cpp', 'message_compressor_metrics.cpp', 'message_compressor_registry.cpp', 'message_compressor_snappy.cpp', 'message_compressor_zlib.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/util/options_parser/options_parser', '$BUILD_DIR/third_party/shim_snappy', '$BUILD_DIR/third_party/shim_zlib', ] ) env.CppUnitTest( target='message_compressor_test', source=[ 'message_compressor_manager_test.cpp', 'message_compressor_registry_test.cpp', ], LIBDEPS=[ 'message_compressor', ] )