Imported Upstream version 1.18.0
[platform/upstream/grpc.git] / test / cpp / interop / BUILD
1 # Copyright 2017 gRPC authors.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #     http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 licenses(["notice"])  # Apache v2
16
17 load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test", "grpc_cc_binary", "grpc_package")
18
19 grpc_package(name = "test/cpp/interop")
20
21 grpc_cc_library(
22     name = "server_helper_lib",
23     srcs = [
24         "server_helper.cc",
25     ],
26     hdrs = [
27         "server_helper.h",
28     ],
29     external_deps = [
30         "gflags",
31     ],
32     language = "C++",
33     deps = [
34         "//test/cpp/util:test_util",
35     ],
36 )
37
38 grpc_cc_binary(
39     name = "interop_server",
40     srcs = [
41         "interop_server_bootstrap.cc",
42     ],
43     language = "C++",
44     deps = [
45         ":interop_server_lib",
46         "//:grpc++",
47     ],
48 )
49
50 grpc_cc_library(
51     name = "interop_server_lib",
52     srcs = [
53         "interop_server.cc",
54     ],
55     language = "C++",
56     deps = [
57         ":server_helper_lib",
58         "//src/proto/grpc/testing:empty_proto",
59         "//src/proto/grpc/testing:messages_proto",
60         "//src/proto/grpc/testing:test_proto",
61         "//test/cpp/util:test_config",
62     ],
63 )
64
65 grpc_cc_library(
66     name = "client_helper_lib",
67     srcs = [
68         "client_helper.cc",
69         "interop_client.cc",
70     ],
71     hdrs = [
72         "client_helper.h",
73         "interop_client.h",
74     ],
75     language = "C++",
76     deps = [
77         "//src/proto/grpc/testing:empty_proto",
78         "//src/proto/grpc/testing:messages_proto",
79         "//src/proto/grpc/testing:test_proto",
80         "//test/core/security:oauth2_utils",
81         "//test/cpp/util:test_config",
82         "//test/cpp/util:test_util",
83     ],
84 )
85
86 grpc_cc_library(
87     name = "interop_client_main",
88     srcs = [
89         "client.cc",
90     ],
91     language = "C++",
92     deps = [
93         ":client_helper_lib",
94     ],
95 )
96
97 grpc_cc_binary(
98     name = "interop_client",
99     language = "C++",
100     deps = [
101         ":interop_client_main",
102         "//:grpc++",
103     ],
104 )
105
106 grpc_cc_binary(
107     name = "reconnect_interop_client",
108     srcs = [
109         "reconnect_interop_client.cc",
110     ],
111     deps = [
112         ":client_helper_lib",
113         "//:grpc++",
114         "//test/core/util:grpc_test_util",
115     ],
116 )
117
118 grpc_cc_binary(
119     name = "reconnect_interop_server",
120     srcs = [
121         "reconnect_interop_server.cc",
122     ],
123     language = "C++",
124     deps = [
125         ":interop_server_lib",
126         "//:grpc++",
127         "//test/core/util:grpc_test_util",
128     ],
129 )
130
131 grpc_cc_binary(
132     name = "stress_test",
133     srcs = [
134         "stress_interop_client.cc",
135         "stress_interop_client.h",
136         "stress_test.cc",
137     ],
138     deps = [
139         ":client_helper_lib",
140         "//:grpc++",
141         "//test/cpp/util:metrics_server_lib",
142         "//test/cpp/util:test_config",
143     ],
144 )
145
146 grpc_cc_test(
147     name = "interop_test",
148     srcs = ["interop_test.cc"],
149     data = [
150         ":interop_client",
151         ":interop_server",
152     ],
153     external_deps = [
154         "gflags",
155     ],
156     deps = [
157         "//:gpr",
158         "//:grpc",
159         "//:grpc++",
160         "//test/core/util:grpc_test_util",
161         "//test/cpp/util:test_config",
162         "//test/cpp/util:test_util",
163     ],
164 )