summaryrefslogtreecommitdiff
path: root/src/mongo/s/query/SConscript
blob: 11ab78e5cb5c6b6abc619b633cd22fafc64ea7c6 (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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# -*- mode: python -*-

Import("env")

env = env.Clone()

env.Library(
    target="cluster_query",
    source=[
        "cluster_find.cpp",
        env.Idlc('cluster_query_knobs.idl')[0],
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/commands',
        '$BUILD_DIR/mongo/db/curop',
        '$BUILD_DIR/mongo/db/curop_failpoint_helpers',
        '$BUILD_DIR/mongo/db/query/query_common',
        '$BUILD_DIR/mongo/s/sharding_router_api',
        "cluster_client_cursor",
        "cluster_cursor_cleanup_job",
        "store_possible_cursor",
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/idl/server_parameter',
    ],
)

env.Library(
    target='cluster_aggregate',
    source=[
        'cluster_aggregate.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/pipeline/pipeline',
        '$BUILD_DIR/mongo/s/query/cluster_aggregation_planner',
        '$BUILD_DIR/mongo/s/query/cluster_client_cursor',
        '$BUILD_DIR/mongo/db/pipeline/mongos_process_interface',
        '$BUILD_DIR/mongo/db/pipeline/sharded_agg_helpers',
        '$BUILD_DIR/mongo/db/views/views',
        'cluster_query',
    ]
)

env.Library(
    target='cluster_aggregation_planner',
    source=[
        'cluster_aggregation_planner.cpp',
    ],
    LIBDEPS=[
        'cluster_query',
    ]
)

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=[
        "cluster_client_cursor_impl.cpp",
    ],
    LIBDEPS=[
        "router_exec_stage",
    ],
)

env.Library(
    target="router_exec_stage",
    source=[
        'document_source_merge_cursors.cpp',
        'document_source_update_on_add_shard.cpp',
        'router_stage_limit.cpp',
        'router_stage_mock.cpp',
        'router_stage_pipeline.cpp',
        'router_stage_remove_metadata_fields.cpp',
        'router_stage_skip.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/pipeline/pipeline',
        'async_results_merger',
    ],
)

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=[
        "async_results_merger.cpp",
        "blocking_results_merger.cpp",
        "establish_cursors.cpp",
        env.Idlc('async_results_merger_params.idl')[0],
    ],
    LIBDEPS=[
        "$BUILD_DIR/mongo/db/query/command_request_response",
        "$BUILD_DIR/mongo/db/query/query_common",
        "$BUILD_DIR/mongo/executor/task_executor_interface",
        "$BUILD_DIR/mongo/s/client/sharding_client",
        '$BUILD_DIR/mongo/s/catalog/sharding_catalog_client_impl',
        "$BUILD_DIR/mongo/s/sharding_router_api",
    ],
)

env.Library(
    target="cluster_client_cursor_mock",
    source=[
        "cluster_client_cursor_mock.cpp",
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
    ],
)

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=[
        "store_possible_cursor.cpp"
    ],
    LIBDEPS=[
        "$BUILD_DIR/mongo/base",
        "$BUILD_DIR/mongo/db/curop",
        "$BUILD_DIR/mongo/db/query/command_request_response",
        "cluster_client_cursor",
        "cluster_cursor_manager",
    ],
)

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=[
        "cluster_cursor_manager.cpp",
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/db/auth/auth',
        '$BUILD_DIR/mongo/db/auth/authprivilege',
        '$BUILD_DIR/mongo/db/generic_cursor',
        '$BUILD_DIR/mongo/db/kill_sessions',
        '$BUILD_DIR/mongo/db/logical_session_cache',
        '$BUILD_DIR/mongo/db/logical_session_id',
    ],
)

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=[
        "cluster_cursor_cleanup_job.cpp",
    ],
    LIBDEPS=[
        "$BUILD_DIR/mongo/db/cursor_server_params",
        "$BUILD_DIR/mongo/s/coreshard",
        "$BUILD_DIR/mongo/util/background_job",
    ],
)

env.CppUnitTest(
    target="cluster_client_cursor_impl_test",
    source=[
        "cluster_client_cursor_impl_test.cpp",
    ],
    LIBDEPS=[
        'cluster_client_cursor',
        '$BUILD_DIR/mongo/db/auth/authmocks',
        '$BUILD_DIR/mongo/db/service_context_test_fixture',
    ],
)