summaryrefslogtreecommitdiff
path: root/src/mongo/s/catalog/SConscript
blob: 8a65757d9602e6961e04680d7b702406f014f06f (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
# -*- mode: python -*-

Import("env")

env = env.Clone()

env.Library(
    target='sharding_catalog_client',
    source=[
        'sharding_catalog_client.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/keys_collection_document',
        '$BUILD_DIR/mongo/db/write_concern_options',
    ],
)

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

env.Library(
    target='dist_lock_catalog_interface',
    source=[
        'dist_lock_catalog.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/write_concern_options',
    ],
)

env.Library(
    target='replset_dist_lock_manager',
    source=[
        'replset_dist_lock_manager.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/service_context',
        '$BUILD_DIR/mongo/s/catalog/dist_lock_catalog_interface',
        '$BUILD_DIR/mongo/s/catalog/dist_lock_manager',
        '$BUILD_DIR/mongo/s/client/sharding_client',
        '$BUILD_DIR/mongo/util/fail_point'
    ],
)

env.Library(
    target='dist_lock_catalog_impl',
    source=[
        'dist_lock_catalog_impl.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/base',
        '$BUILD_DIR/mongo/client/read_preference',
        '$BUILD_DIR/mongo/client/remote_command_targeter',
        '$BUILD_DIR/mongo/db/common',
        '$BUILD_DIR/mongo/db/query/command_request_response',
        '$BUILD_DIR/mongo/db/repl/read_concern_args',
        '$BUILD_DIR/mongo/rpc/command_status',
        '$BUILD_DIR/mongo/s/catalog/dist_lock_catalog_interface',
        '$BUILD_DIR/mongo/s/client/sharding_client',
        '$BUILD_DIR/mongo/s/write_ops/batch_write_types',
        '$BUILD_DIR/mongo/util/net/network',
    ],
)

env.Library(
    target='sharding_catalog_client_impl',
    source=[
        'sharding_catalog_client_impl.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/db/repl/read_concern_args',
        '$BUILD_DIR/mongo/db/storage/duplicate_key_error_info',
        '$BUILD_DIR/mongo/executor/network_interface',
        '$BUILD_DIR/mongo/s/client/sharding_client',
        '$BUILD_DIR/mongo/s/coreshard',
        'dist_lock_manager',
        'sharding_catalog_client',
    ],
    LIBDEPS_PRIVATE=[
        '$BUILD_DIR/mongo/db/logical_session_id_helpers'
    ]
)

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

env.Library(
    target='dist_lock_catalog_mock',
    source=[
        'dist_lock_catalog_mock.cpp',
    ],
    LIBDEPS=[
        '$BUILD_DIR/mongo/s/common_s',
        '$BUILD_DIR/mongo/unittest/unittest',
        'dist_lock_catalog_interface',
    ]
)

env.Library(
    target='sharding_catalog_client_mock',
    source=[
        'sharding_catalog_client_mock.cpp',
    ],
    LIBDEPS=[
        'dist_lock_manager_mock',
        'sharding_catalog_client',
    ]
)

env.CppUnitTest(
    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',
        '$BUILD_DIR/mongo/db/s/shard_server_test_fixture',
        '$BUILD_DIR/mongo/db/storage/duplicate_key_error_info',
        '$BUILD_DIR/mongo/s/catalog/dist_lock_catalog_mock',
        '$BUILD_DIR/mongo/s/catalog/sharding_catalog_client_mock',
        '$BUILD_DIR/mongo/s/sharding_router_test_fixture',
        'dist_lock_catalog_impl',
        'replset_dist_lock_manager',
    ]
)