• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15load("//bazel:grpc_build_system.bzl", "grpc_cc_binary", "grpc_cc_library", "grpc_cc_test", "grpc_package")
16
17licenses(["notice"])  # Apache v2
18
19grpc_package(
20    name = "test/core/util",
21    visibility = "public",
22)
23
24grpc_cc_library(
25    name = "grpc_debugger_macros",
26    srcs = [
27        "debugger_macros.cc",
28    ],
29    hdrs = [
30        "debugger_macros.h",
31    ],
32    deps = [
33        "//:grpc_common",
34    ],
35)
36
37grpc_cc_library(
38    name = "grpc_test_util_base",
39    srcs = [
40        "cmdline.cc",
41        "fuzzer_util.cc",
42        "grpc_profiler.cc",
43        "histogram.cc",
44        "memory_counters.cc",
45        "mock_endpoint.cc",
46        "parse_hexstring.cc",
47        "passthru_endpoint.cc",
48        "port.cc",
49        "port_isolated_runtime_environment.cc",
50        "port_server_client.cc",
51        "reconnect_server.cc",
52        "slice_splitter.cc",
53        "subprocess_posix.cc",
54        "subprocess_windows.cc",
55        "test_config.cc",
56        "test_tcp_server.cc",
57        "tracer_util.cc",
58        "trickle_endpoint.cc",
59    ],
60    hdrs = [
61        "cmdline.h",
62        "fuzzer_util.h",
63        "grpc_profiler.h",
64        "histogram.h",
65        "memory_counters.h",
66        "mock_endpoint.h",
67        "parse_hexstring.h",
68        "passthru_endpoint.h",
69        "port.h",
70        "port_server_client.h",
71        "reconnect_server.h",
72        "slice_splitter.h",
73        "subprocess.h",
74        "test_config.h",
75        "test_tcp_server.h",
76        "tracer_util.h",
77        "trickle_endpoint.h",
78    ],
79    data = [
80        "lsan_suppressions.txt",
81        "tsan_suppressions.txt",
82        "ubsan_suppressions.txt",
83    ],
84    language = "C++",
85    deps = [
86        ":grpc_debugger_macros",
87        "//:gpr",
88        "//:grpc_common",
89    ],
90)
91
92grpc_cc_library(
93    name = "grpc_test_util",
94    srcs = [],
95    hdrs = [],
96    language = "C++",
97    deps = [
98        ":grpc_test_util_base",
99        "//:grpc",
100    ],
101)
102
103grpc_cc_library(
104    name = "grpc_test_util_unsecure",
105    srcs = [],
106    hdrs = [],
107    language = "C++",
108    deps = [
109        ":grpc_test_util_base",
110        "//:grpc_unsecure",
111    ],
112)
113
114grpc_cc_test(
115    name = "cmdline_test",
116    srcs = ["cmdline_test.cc"],
117    language = "C++",
118    uses_polling = False,
119    deps = [
120        ":grpc_test_util",
121        "//:gpr",
122    ],
123)
124
125grpc_cc_library(
126    name = "fuzzer_corpus_test",
127    testonly = 1,
128    srcs = ["fuzzer_corpus_test.cc"],
129    external_deps = [
130        "gtest",
131        "gflags",
132    ],
133    tags = ["no_windows"],
134    deps = [
135        ":grpc_test_util",
136        "//:grpc",
137        "//test/cpp/util:test_config",
138    ],
139)
140
141grpc_cc_test(
142    name = "histogram_test",
143    srcs = ["histogram_test.cc"],
144    language = "C++",
145    uses_polling = False,
146    deps = [
147        ":grpc_test_util",
148        "//:gpr",
149    ],
150)
151
152sh_library(
153    name = "fuzzer_one_entry_runner",
154    srcs = ["fuzzer_one_entry_runner.sh"],
155)
156
157sh_library(
158    name = "run_with_poller_sh",
159    srcs = ["run_with_poller.sh"],
160)
161
162grpc_cc_library(
163    name = "test_lb_policies",
164    testonly = 1,
165    srcs = ["test_lb_policies.cc"],
166    hdrs = ["test_lb_policies.h"],
167    deps = [
168        "//:grpc",
169    ],
170)
171