summaryrefslogtreecommitdiff
path: root/src/mongo/transport/SConscript
blob: c8b8af833d8a84c81eafe208a184b4b24b715a61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# -*- mode: python -*-

Import('env')

env = env.Clone()

env.CppUnitTest(
    target='ingress_header_test',
    source=[
        'ingress_header_test.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
    ],
)

env.Library(
    target='transport_layer_common',
    source=[
        'service_entry_point_utils.cpp',
        'session.cpp',
        'ticket.cpp',
        'transport_layer.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/util/net/network',
        '$BUILD_DIR/mongo/transport/message_compressor',
    ],
)

env.Library(
    target='transport_layer_manager',
    source=[
        'transport_layer_manager.cpp',
    ],
    LIBDEPS=[
        'transport_layer',
    ],
)

env.Library(
    target='transport_layer_mock',
    source=[
        'transport_layer_mock.cpp',
    ],
    LIBDEPS=[
        'transport_layer_common',
    ],
)

tlEnv = env.Clone()
tlEnv.InjectThirdPartyIncludePaths(libraries=['asio'])
tlEnv.Library(
    target='transport_layer',
    source=[
        'ticket_asio.cpp',
        'transport_layer_asio.cpp',
        'transport_layer_legacy.cpp',
    ],
    LIBDEPS=[
        'transport_layer_common',
        '$BUILD_DIR/mongo/db/auth/authentication_restriction',
        '$BUILD_DIR/third_party/shim_asio',
        '$BUILD_DIR/mongo/base/system_error',
        '$BUILD_DIR/mongo/db/service_context',
        '$BUILD_DIR/mongo/db/stats/counters',
    ],
)

env.Library(
    target='service_entry_point_test_suite',
    source=[
        'service_entry_point_test_suite.cpp',
    ],
    LIBDEPS=[
        'transport_layer_common',
        '$BUILD_DIR/mongo/unittest/unittest',
    ],
)

env.Library(
    target='service_entry_point',
    source=[
        'service_entry_point_impl.cpp',
        'service_state_machine.cpp',
    ],
    LIBDEPS=[
        "$BUILD_DIR/mongo/db/service_context",
        '$BUILD_DIR/mongo/db/stats/counters',
        "$BUILD_DIR/mongo/util/processinfo",
        'transport_layer_common',
    ],
)

env.CppUnitTest(
    target='service_entry_point_mock_test',
    source=[
        'service_entry_point_mock.cpp',
        'service_entry_point_mock_test.cpp',
    ],
    LIBDEPS=[
        'service_entry_point_test_suite',
    ],
)

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/command_reply',
        '$BUILD_DIR/mongo/rpc/command_request',
        '$BUILD_DIR/mongo/unittest/unittest',
        '$BUILD_DIR/mongo/util/clock_source_mock',
        '$BUILD_DIR/mongo/util/decorable',
    ],
)

env.CppUnitTest(
    target='transport_layer_mock_test',
    source=[
        'transport_layer_mock_test.cpp',
    ],
    LIBDEPS=[
        'transport_layer_mock',
    ],
)


zlibEnv = env.Clone()
zlibEnv.InjectThirdPartyIncludePaths(libraries=['zlib'])
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/decorable',
        '$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',
    ]
)

env.CppUnitTest(
    target='transport_layer_legacy_test',
    source=[
        'transport_layer_legacy_test.cpp',
    ],
    LIBDEPS=[
        'transport_layer',
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/service_context_noop_init',
    ],
)