From 7c26eed8388c131dc5833f554414eebb6107b0cd Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 13 Apr 2017 01:40:54 +0200 Subject: [PATCH] Buildifier and wrapping test/cpp/* rules with our build system. --- BUILD | 6 +- bazel/BUILD | 2 +- bazel/grpc_build_system.bzl | 19 +++ examples/cpp/helloworld/BUILD | 4 +- src/proto/grpc/testing/BUILD | 15 +- test/core/client_channel/BUILD | 24 ++- test/core/client_channel/resolvers/BUILD | 27 +++- test/core/end2end/BUILD | 78 +++++---- test/core/end2end/fuzzers/BUILD | 43 +++-- test/core/fling/BUILD | 50 ++++-- test/core/http/BUILD | 62 +++++--- test/core/iomgr/BUILD | 191 ++++++++++++++++++----- test/core/json/BUILD | 59 +++++-- test/core/nanopb/BUILD | 29 ++-- test/core/network_benchmarks/BUILD | 9 +- test/core/security/BUILD | 76 ++++++--- test/core/slice/BUILD | 41 +++-- test/core/support/BUILD | 133 +++++++++++----- test/core/transport/BUILD | 63 ++++++-- test/core/transport/chttp2/BUILD | 83 +++++++--- test/core/tsi/BUILD | 9 +- test/core/util/BUILD | 32 ++-- test/cpp/codegen/BUILD | 28 ++-- test/cpp/common/BUILD | 52 ++++-- test/cpp/end2end/BUILD | 110 ++++++++----- test/cpp/microbenchmarks/BUILD | 41 +++-- test/cpp/qps/BUILD | 40 +++-- test/cpp/util/BUILD | 19 ++- tools/grpcz/BUILD | 10 +- 29 files changed, 971 insertions(+), 384 deletions(-) diff --git a/BUILD b/BUILD index 6c4d31d0b9d..24c5ae689b7 100644 --- a/BUILD +++ b/BUILD @@ -866,14 +866,14 @@ grpc_cc_library( "src/core/ext/resolver/dns/c_ares/grpc_ares_ev_driver.h", "src/core/ext/resolver/dns/c_ares/grpc_ares_wrapper.h", ], + external_deps = [ + "cares", + ], language = "c", deps = [ "grpc_base", "grpc_client_channel", ], - external_deps = [ - "cares", - ], ) grpc_cc_library( diff --git a/bazel/BUILD b/bazel/BUILD index b86dcc2ad7e..9387dddab63 100644 --- a/bazel/BUILD +++ b/bazel/BUILD @@ -41,6 +41,6 @@ proto_library( cc_grpc_library( name = "well_known_protos", srcs = "well_known_protos_list", - deps = [], proto_only = True, + deps = [], ) diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl index 8b524bd0e52..cdadc149bdb 100644 --- a/bazel/grpc_build_system.bzl +++ b/bazel/grpc_build_system.bzl @@ -69,3 +69,22 @@ def grpc_proto_library(name, srcs = [], deps = [], well_known_protos = None, use_external = use_external, ) +def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data = []): + native.cc_test( + name = name, + srcs = srcs, + args = args, + data = data, + deps = deps + ["//external:" + dep for dep in external_deps], + linkopts = ["-pthread"], + ) + +def grpc_cc_binary(name, srcs = [], deps = [], external_deps = [], args = [], data = []): + native.cc_binary( + name = name, + srcs = srcs, + args = args, + data = data, + deps = deps + ["//external:" + dep for dep in external_deps], + linkopts = ["-pthread"], + ) diff --git a/examples/cpp/helloworld/BUILD b/examples/cpp/helloworld/BUILD index b9c3f5dfbed..7e1b375d7f1 100644 --- a/examples/cpp/helloworld/BUILD +++ b/examples/cpp/helloworld/BUILD @@ -30,13 +30,13 @@ cc_binary( name = "greeter_client", srcs = ["greeter_client.cc"], - deps = ["//examples/protos:helloworld"], defines = ["BAZEL_BUILD"], + deps = ["//examples/protos:helloworld"], ) cc_binary( name = "greeter_server", srcs = ["greeter_server.cc"], - deps = ["//examples/protos:helloworld"], defines = ["BAZEL_BUILD"], + deps = ["//examples/protos:helloworld"], ) diff --git a/src/proto/grpc/testing/BUILD b/src/proto/grpc/testing/BUILD index 23a16a7cfc3..5026f6cab34 100644 --- a/src/proto/grpc/testing/BUILD +++ b/src/proto/grpc/testing/BUILD @@ -41,8 +41,11 @@ grpc_proto_library( grpc_proto_library( name = "control_proto", srcs = ["control.proto"], - deps = ["payloads_proto", "stats_proto"], has_services = False, + deps = [ + "payloads_proto", + "stats_proto", + ], ) grpc_proto_library( @@ -83,7 +86,10 @@ grpc_proto_library( grpc_proto_library( name = "services_proto", srcs = ["services.proto"], - deps = ["control_proto", "messages_proto"], + deps = [ + "control_proto", + "messages_proto", + ], ) grpc_proto_library( @@ -95,5 +101,8 @@ grpc_proto_library( grpc_proto_library( name = "test_proto", srcs = ["test.proto"], - deps = ["empty_proto", "messages_proto"], + deps = [ + "empty_proto", + "messages_proto", + ], ) diff --git a/test/core/client_channel/BUILD b/test/core/client_channel/BUILD index 55a74c6d019..78d351a77fd 100644 --- a/test/core/client_channel/BUILD +++ b/test/core/client_channel/BUILD @@ -32,16 +32,26 @@ licenses(["notice"]) # 3-clause BSD load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") grpc_fuzzer( - name = "uri_fuzzer_test", - srcs = ["uri_fuzzer_test.c"], - deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], - corpus = "uri_corpus", - copts = ["-std=c99"], + name = "uri_fuzzer_test", + srcs = ["uri_fuzzer_test.c"], + copts = ["-std=c99"], + corpus = "uri_corpus", + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "lb_policies_test", srcs = ["lb_policies_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", "//test/core/end2end:cq_verifier"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/end2end:cq_verifier", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) diff --git a/test/core/client_channel/resolvers/BUILD b/test/core/client_channel/resolvers/BUILD index af37072e3a4..02a864b927b 100644 --- a/test/core/client_channel/resolvers/BUILD +++ b/test/core/client_channel/resolvers/BUILD @@ -32,20 +32,35 @@ licenses(["notice"]) # 3-clause BSD cc_test( name = "dns_resolver_connectivity_test", srcs = ["dns_resolver_connectivity_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "dns_resolver_test", srcs = ["dns_resolver_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "sockaddr_resolver_test", srcs = ["sockaddr_resolver_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) diff --git a/test/core/end2end/BUILD b/test/core/end2end/BUILD index 0cef7aa01df..427f1a9c799 100644 --- a/test/core/end2end/BUILD +++ b/test/core/end2end/BUILD @@ -32,49 +32,65 @@ licenses(["notice"]) # 3-clause BSD load(":generate_tests.bzl", "grpc_end2end_tests") cc_library( - name = 'cq_verifier', - srcs = ['cq_verifier.c'], - hdrs = ['cq_verifier.h'], - deps = ['//:gpr', '//:grpc', '//test/core/util:grpc_test_util'], - copts = ['-std=c99'], - visibility = ["//test:__subpackages__"], + name = "cq_verifier", + srcs = ["cq_verifier.c"], + hdrs = ["cq_verifier.h"], + copts = ["-std=c99"], + visibility = ["//test:__subpackages__"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], ) cc_library( - name = 'ssl_test_data', - visibility = ["//test:__subpackages__"], - hdrs = ['data/ssl_test_data.h'], - copts = ['-std=c99'], - srcs = [ - "data/client_certs.c", - "data/server1_cert.c", - "data/server1_key.c", - "data/test_root_cert.c", - ] + name = "ssl_test_data", + srcs = [ + "data/client_certs.c", + "data/server1_cert.c", + "data/server1_key.c", + "data/test_root_cert.c", + ], + hdrs = ["data/ssl_test_data.h"], + copts = ["-std=c99"], + visibility = ["//test:__subpackages__"], ) cc_library( - name = 'fake_resolver', - hdrs = ['fake_resolver.h'], - srcs = ['fake_resolver.c'], - copts = ['-std=c99'], - deps = ['//:gpr', '//:grpc', '//test/core/util:grpc_test_util'] + name = "fake_resolver", + srcs = ["fake_resolver.c"], + hdrs = ["fake_resolver.h"], + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], ) cc_library( - name = 'http_proxy', - hdrs = ['fixtures/http_proxy_fixture.h'], - srcs = ['fixtures/http_proxy_fixture.c'], - copts = ['-std=c99'], - deps = ['//:gpr', '//:grpc', '//test/core/util:grpc_test_util'] + name = "http_proxy", + srcs = ["fixtures/http_proxy_fixture.c"], + hdrs = ["fixtures/http_proxy_fixture.h"], + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], ) cc_library( - name = 'proxy', - hdrs = ['fixtures/proxy.h'], - srcs = ['fixtures/proxy.c'], - copts = ['-std=c99'], - deps = ['//:gpr', '//:grpc', '//test/core/util:grpc_test_util'] + name = "proxy", + srcs = ["fixtures/proxy.c"], + hdrs = ["fixtures/proxy.h"], + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], ) grpc_end2end_tests() diff --git a/test/core/end2end/fuzzers/BUILD b/test/core/end2end/fuzzers/BUILD index 4d98aa0725c..1264badd09a 100644 --- a/test/core/end2end/fuzzers/BUILD +++ b/test/core/end2end/fuzzers/BUILD @@ -32,25 +32,38 @@ licenses(["notice"]) # 3-clause BSD load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") grpc_fuzzer( - name = "api_fuzzer", - srcs = ["api_fuzzer.c"], - deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util", "//test/core/end2end:ssl_test_data"], - corpus = "api_fuzzer_corpus", - copts = ["-std=c99"], + name = "api_fuzzer", + srcs = ["api_fuzzer.c"], + copts = ["-std=c99"], + corpus = "api_fuzzer_corpus", + deps = [ + "//:gpr", + "//:grpc", + "//test/core/end2end:ssl_test_data", + "//test/core/util:grpc_test_util", + ], ) grpc_fuzzer( - name = "client_fuzzer", - srcs = ["client_fuzzer.c"], - deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], - corpus = "client_fuzzer_corpus", - copts = ["-std=c99"], + name = "client_fuzzer", + srcs = ["client_fuzzer.c"], + copts = ["-std=c99"], + corpus = "client_fuzzer_corpus", + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], ) grpc_fuzzer( - name = "server_fuzzer", - srcs = ["server_fuzzer.c"], - deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], - corpus = "server_fuzzer_corpus", - copts = ["-std=c99"], + name = "server_fuzzer", + srcs = ["server_fuzzer.c"], + copts = ["-std=c99"], + corpus = "server_fuzzer_corpus", + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], ) diff --git a/test/core/fling/BUILD b/test/core/fling/BUILD index 0b0ebcb2523..f78ad70bc12 100644 --- a/test/core/fling/BUILD +++ b/test/core/fling/BUILD @@ -33,30 +33,60 @@ load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") cc_binary( name = "client", - srcs = ["client.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", "//test/core/end2end:ssl_test_data"], testonly = 1, - copts = ['-std=c99'] + srcs = ["client.c"], + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/end2end:ssl_test_data", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_binary( name = "server", - srcs = ["server.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", "//test/core/end2end:ssl_test_data"], testonly = 1, - copts = ['-std=c99'] + srcs = ["server.c"], + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/end2end:ssl_test_data", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "fling", srcs = ["fling_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", "//test/core/end2end:ssl_test_data"], - data = [":client", ":server"] + data = [ + ":client", + ":server", + ], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/end2end:ssl_test_data", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "fling_stream", srcs = ["fling_stream_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", "//test/core/end2end:ssl_test_data"], - data = [":client", ":server"] + data = [ + ":client", + ":server", + ], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/end2end:ssl_test_data", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) diff --git a/test/core/http/BUILD b/test/core/http/BUILD index abfa7591798..bf0dae0a73b 100644 --- a/test/core/http/BUILD +++ b/test/core/http/BUILD @@ -32,19 +32,27 @@ licenses(["notice"]) # 3-clause BSD load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") grpc_fuzzer( - name = "response_fuzzer", - srcs = ["response_fuzzer.c"], - deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], - corpus = "response_corpus", - copts = ["-std=c99"], + name = "response_fuzzer", + srcs = ["response_fuzzer.c"], + copts = ["-std=c99"], + corpus = "response_corpus", + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], ) grpc_fuzzer( - name = "request_fuzzer", - srcs = ["request_fuzzer.c"], - deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], - corpus = "request_corpus", - copts = ["-std=c99"], + name = "request_fuzzer", + srcs = ["request_fuzzer.c"], + copts = ["-std=c99"], + corpus = "request_corpus", + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], ) # Copyright 2017, Google Inc. @@ -83,22 +91,40 @@ load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") cc_test( name = "httpcli_test", srcs = ["httpcli_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", "//test/core/end2end:ssl_test_data"], - copts = ['-std=c99'], - data = ['test_server.py'] + copts = ["-std=c99"], + data = ["test_server.py"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/end2end:ssl_test_data", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "httpscli_test", srcs = ["httpscli_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", "//test/core/end2end:ssl_test_data"], - copts = ['-std=c99'], - data = ['test_server.py'] + copts = ["-std=c99"], + data = ["test_server.py"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/end2end:ssl_test_data", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "parser_test", srcs = ["parser_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", "//test/core/end2end:ssl_test_data"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/end2end:ssl_test_data", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) diff --git a/test/core/iomgr/BUILD b/test/core/iomgr/BUILD index 0cf93e73f5c..0e27c7e743e 100644 --- a/test/core/iomgr/BUILD +++ b/test/core/iomgr/BUILD @@ -35,147 +35,254 @@ cc_library( name = "endpoint_tests", srcs = ["endpoint_tests.c"], hdrs = ["endpoint_tests.h"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], + copts = ["-std=c99"], visibility = ["//test:__subpackages__"], - copts = ['-std=c99'] + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "combiner_test", srcs = ["combiner_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "endpoint_pair_test", srcs = ["endpoint_pair_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", ":endpoint_tests"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + ":endpoint_tests", + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "ev_epoll_linux_test", srcs = ["ev_epoll_linux_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "fd_conservation_posix_test", srcs = ["fd_conservation_posix_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "fd_posix_test", srcs = ["fd_posix_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "load_file_test", srcs = ["load_file_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "pollset_set_test", srcs = ["pollset_set_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "resolve_address_posix_test", srcs = ["resolve_address_posix_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "resolve_address_test", srcs = ["resolve_address_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "resource_quota_test", srcs = ["resource_quota_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "sockaddr_utils_test", srcs = ["sockaddr_utils_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "socket_utils_test", srcs = ["socket_utils_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "tcp_client_posix_test", srcs = ["tcp_client_posix_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "tcp_posix_test", srcs = ["tcp_posix_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", ":endpoint_tests"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + ":endpoint_tests", + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "tcp_server_posix_test", srcs = ["tcp_server_posix_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "time_averaged_stats_test", srcs = ["time_averaged_stats_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "timer_heap_test", srcs = ["timer_heap_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "timer_list_test", srcs = ["timer_list_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "udp_server_test", srcs = ["udp_server_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "wakeup_fd_cv_test", srcs = ["wakeup_fd_cv_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) diff --git a/test/core/json/BUILD b/test/core/json/BUILD index f5a877e6af4..d4c7378ad79 100644 --- a/test/core/json/BUILD +++ b/test/core/json/BUILD @@ -32,39 +32,68 @@ licenses(["notice"]) # 3-clause BSD load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") grpc_fuzzer( - name = "json_fuzzer", - srcs = ["fuzzer.c"], - deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], - corpus = "corpus", - copts = ["-std=c99"], + name = "json_fuzzer", + srcs = ["fuzzer.c"], + copts = ["-std=c99"], + corpus = "corpus", + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], ) cc_binary( name = "json_rewrite", - srcs = ["json_rewrite.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], testonly = 1, - copts = ['-std=c99'] + srcs = ["json_rewrite.c"], + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "json_rewrite_test", srcs = ["json_rewrite_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'], - data = ["rewrite_test_input.json", "rewrite_test_output_condensed.json", "rewrite_test_output_indented.json", ":json_stream_error_test"] + copts = ["-std=c99"], + data = [ + "rewrite_test_input.json", + "rewrite_test_output_condensed.json", + "rewrite_test_output_indented.json", + ":json_stream_error_test", + ], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "json_stream_error_test", srcs = ["json_stream_error_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "json_test", srcs = ["json_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) diff --git a/test/core/nanopb/BUILD b/test/core/nanopb/BUILD index b02d750f325..daba655af46 100644 --- a/test/core/nanopb/BUILD +++ b/test/core/nanopb/BUILD @@ -32,18 +32,25 @@ licenses(["notice"]) # 3-clause BSD load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") grpc_fuzzer( - name = "fuzzer_response", - srcs = ["fuzzer_response.c"], - deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], - corpus = "corpus_response", - copts = ["-std=c99"], + name = "fuzzer_response", + srcs = ["fuzzer_response.c"], + copts = ["-std=c99"], + corpus = "corpus_response", + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], ) grpc_fuzzer( - name = "fuzzer_serverlist", - srcs = ["fuzzer_serverlist.c"], - deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], - corpus = "corpus_serverlist", - copts = ["-std=c99"], + name = "fuzzer_serverlist", + srcs = ["fuzzer_serverlist.c"], + copts = ["-std=c99"], + corpus = "corpus_serverlist", + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], ) - diff --git a/test/core/network_benchmarks/BUILD b/test/core/network_benchmarks/BUILD index a5209de4c91..5bc0b3d9684 100644 --- a/test/core/network_benchmarks/BUILD +++ b/test/core/network_benchmarks/BUILD @@ -32,6 +32,11 @@ licenses(["notice"]) # 3-clause BSD cc_binary( name = "low_level_ping_pong", srcs = ["low_level_ping_pong.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) diff --git a/test/core/security/BUILD b/test/core/security/BUILD index 8c63f9143d1..2cd00db551f 100644 --- a/test/core/security/BUILD +++ b/test/core/security/BUILD @@ -32,66 +32,102 @@ licenses(["notice"]) # 3-clause BSD load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") grpc_fuzzer( - name = "ssl_server_fuzzer", - srcs = ["ssl_server_fuzzer.c"], - deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util", "//test/core/end2end:ssl_test_data"], - corpus = "corpus", - copts = ["-std=c99"], + name = "ssl_server_fuzzer", + srcs = ["ssl_server_fuzzer.c"], + copts = ["-std=c99"], + corpus = "corpus", + deps = [ + "//:gpr", + "//:grpc", + "//test/core/end2end:ssl_test_data", + "//test/core/util:grpc_test_util", + ], ) cc_library( name = "oauth2_utils", srcs = ["oauth2_utils.c"], hdrs = ["oauth2_utils.h"], + copts = ["-std=c99"], deps = ["//:grpc"], - copts = ['-std=c99'] ) cc_test( name = "auth_context_test", srcs = ["auth_context_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "credentials_test", srcs = ["credentials_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "secure_endpoint_test", srcs = ["secure_endpoint_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util", "//test/core/iomgr:endpoint_tests"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/iomgr:endpoint_tests", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "security_connector_test", srcs = ["security_connector_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_binary( name = "create_jwt", srcs = ["create_jwt.c"], - deps = ["//:grpc", "//:gpr"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + ], ) cc_binary( name = "fetch_oauth2", srcs = ["fetch_oauth2.c"], - deps = ["//:grpc", "//:gpr", ":oauth2_utils"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + ":oauth2_utils", + "//:gpr", + "//:grpc", + ], ) cc_binary( name = "verify_jwt", srcs = ["verify_jwt.c"], - deps = ["//:grpc", "//:gpr"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + ], ) diff --git a/test/core/slice/BUILD b/test/core/slice/BUILD index 4d64d0a8183..955016c28da 100644 --- a/test/core/slice/BUILD +++ b/test/core/slice/BUILD @@ -32,30 +32,49 @@ licenses(["notice"]) # 3-clause BSD load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") grpc_fuzzer( - name = "percent_decode_fuzzer", - srcs = ["percent_decode_fuzzer.c"], - deps = ["//:gpr", "//:grpc", "//test/core/util:grpc_test_util"], - corpus = "response_corpus", - copts = ["-std=c99"], + name = "percent_decode_fuzzer", + srcs = ["percent_decode_fuzzer.c"], + copts = ["-std=c99"], + corpus = "response_corpus", + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "percent_encoding_test", srcs = ["percent_encoding_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "slice_buffer_test", srcs = ["slice_string_helpers_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "b64_test", srcs = ["b64_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) diff --git a/test/core/support/BUILD b/test/core/support/BUILD index 3183510db9d..d0ea15ccb92 100644 --- a/test/core/support/BUILD +++ b/test/core/support/BUILD @@ -32,132 +32,189 @@ licenses(["notice"]) # 3-clause BSD cc_test( name = "alloc_test", srcs = ["alloc_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "avl_test", srcs = ["avl_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "backoff_test", srcs = ["backoff_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "cmdline_test", srcs = ["cmdline_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "cpu_test", srcs = ["cpu_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "env_test", srcs = ["env_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "histogram_test", srcs = ["histogram_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "host_port_test", srcs = ["host_port_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "log_test", srcs = ["log_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "mpscq_test", srcs = ["mpscq_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "murmur_hash_test", srcs = ["murmur_hash_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "stack_lockfree_test", srcs = ["stack_lockfree_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "string_test", srcs = ["string_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "spinlock_test", srcs = ["spinlock_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "sync_test", srcs = ["sync_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "thd_test", srcs = ["thd_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "time_test", srcs = ["time_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "tls_test", srcs = ["tls_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) cc_test( name = "useful_test", srcs = ["useful_test.c"], - deps = ["//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//test/core/util:gpr_test_util", + ], ) diff --git a/test/core/transport/BUILD b/test/core/transport/BUILD index 08b2fd3332a..8b8fe032a5c 100644 --- a/test/core/transport/BUILD +++ b/test/core/transport/BUILD @@ -32,48 +32,83 @@ licenses(["notice"]) # 3-clause BSD cc_test( name = "bdp_estimator_test", srcs = ["bdp_estimator_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "connectivity_state_test", srcs = ["connectivity_state_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "metadata_test", srcs = ["metadata_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "pid_controller_test", srcs = ["pid_controller_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "status_conversion_test", srcs = ["status_conversion_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "stream_owned_slice_test", srcs = ["stream_owned_slice_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "timeout_encoding_test", srcs = ["timeout_encoding_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) diff --git a/test/core/transport/chttp2/BUILD b/test/core/transport/chttp2/BUILD index b507e27efe5..2d7d803a0ab 100644 --- a/test/core/transport/chttp2/BUILD +++ b/test/core/transport/chttp2/BUILD @@ -32,64 +32,107 @@ licenses(["notice"]) # 3-clause BSD load("//test/core/util:grpc_fuzzer.bzl", "grpc_fuzzer") grpc_fuzzer( - name = "hpack_parser_fuzzer", - srcs = ["hpack_parser_fuzzer_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util"], - corpus = "hpack_parser_corpus" + name = "hpack_parser_fuzzer", + srcs = ["hpack_parser_fuzzer_test.c"], + corpus = "hpack_parser_corpus", + deps = [ + "//:grpc", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "alpn_test", srcs = ["alpn_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "bin_decoder_test", srcs = ["bin_decoder_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "bin_encoder_test", srcs = ["bin_encoder_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "hpack_encoder_test", srcs = ["hpack_encoder_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "hpack_parser_test", srcs = ["hpack_parser_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "hpack_table_test", srcs = ["hpack_table_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "stream_map_test", srcs = ["stream_map_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) cc_test( name = "varint_test", srcs = ["varint_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) diff --git a/test/core/tsi/BUILD b/test/core/tsi/BUILD index e6cba344eef..7817e9811ad 100644 --- a/test/core/tsi/BUILD +++ b/test/core/tsi/BUILD @@ -32,6 +32,11 @@ licenses(["notice"]) # 3-clause BSD cc_test( name = "transport_security_test", srcs = ["transport_security_test.c"], - deps = ["//:grpc", "//test/core/util:grpc_test_util", "//:gpr", "//test/core/util:gpr_test_util"], - copts = ['-std=c99'] + copts = ["-std=c99"], + deps = [ + "//:gpr", + "//:grpc", + "//test/core/util:gpr_test_util", + "//test/core/util:grpc_test_util", + ], ) diff --git a/test/core/util/BUILD b/test/core/util/BUILD index 03c79f1f154..12657bb30f8 100644 --- a/test/core/util/BUILD +++ b/test/core/util/BUILD @@ -32,15 +32,15 @@ licenses(["notice"]) # 3-clause BSD cc_library( name = "gpr_test_util", srcs = [ - "test_config.c", "memory_counters.c", + "test_config.c", ], hdrs = [ - "test_config.h", "memory_counters.h", + "test_config.h", ], - deps = ["//:gpr"], visibility = ["//:__subpackages__"], + deps = ["//:gpr"], ) cc_library( @@ -60,7 +60,6 @@ cc_library( ], hdrs = [ "debugger_macros.h", - "trickle_endpoint.h", "grpc_profiler.h", "mock_endpoint.h", "parse_hexstring.h", @@ -70,21 +69,28 @@ cc_library( "reconnect_server.h", "slice_splitter.h", "test_tcp_server.h", + "trickle_endpoint.h", ], - deps = [":gpr_test_util", "//:grpc"], - visibility = ["//test:__subpackages__"], copts = ["-std=c99"], + visibility = ["//test:__subpackages__"], + deps = [ + ":gpr_test_util", + "//:grpc", + ], ) cc_library( - name = "one_corpus_entry_fuzzer", - srcs = ["one_corpus_entry_fuzzer.c"], - deps = [":gpr_test_util", "//:grpc"], - visibility = ["//test:__subpackages__"], + name = "one_corpus_entry_fuzzer", + srcs = ["one_corpus_entry_fuzzer.c"], + visibility = ["//test:__subpackages__"], + deps = [ + ":gpr_test_util", + "//:grpc", + ], ) sh_library( - name = "fuzzer_one_entry_runner", - srcs = ["fuzzer_one_entry_runner.sh"], - visibility = ["//test:__subpackages__"], + name = "fuzzer_one_entry_runner", + srcs = ["fuzzer_one_entry_runner.sh"], + visibility = ["//test:__subpackages__"], ) diff --git a/test/cpp/codegen/BUILD b/test/cpp/codegen/BUILD index 14d5733da2c..90325414b17 100644 --- a/test/cpp/codegen/BUILD +++ b/test/cpp/codegen/BUILD @@ -29,37 +29,45 @@ licenses(["notice"]) # 3-clause BSD -cc_test( +load("//bazel:grpc_build_system.bzl", "grpc_cc_test") + +grpc_cc_test( name = "codegen_test_full", srcs = ["codegen_test_full.cc"], deps = [ "//:grpc++", - "//external:gtest", "//test/core/util:gpr_test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "codegen_test_minimal", srcs = ["codegen_test_minimal.cc"], deps = [ "//:grpc++", - "//external:gtest", "//test/core/util:gpr_test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "proto_utils_test", srcs = ["proto_utils_test.cc"], deps = [ "//:grpc++", - "//external:gtest", "//test/core/util:gpr_test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "golden_file_test", srcs = ["golden_file_test.cc"], args = ["--generated_file_path=$(GENDIR)/src/proto/grpc/testing/compiler_test.grpc.pb.h"], @@ -69,9 +77,11 @@ cc_test( ], deps = [ "//:grpc++", - "//external:gflags", - "//external:gtest", "//src/proto/grpc/testing:compiler_test_proto", "//test/core/util:gpr_test_util", ], + external_deps = [ + "gtest", + "gflags", + ], ) diff --git a/test/cpp/common/BUILD b/test/cpp/common/BUILD index 48ad5839813..18308449d80 100644 --- a/test/cpp/common/BUILD +++ b/test/cpp/common/BUILD @@ -29,32 +29,64 @@ licenses(["notice"]) # 3-clause BSD -cc_test( +load("//bazel:grpc_build_system.bzl", "grpc_cc_test") + +grpc_cc_test( name = "alarm_cpp_test", srcs = ["alarm_cpp_test.cc"], - deps = ["//:grpc++", "//external:gtest", "//test/core/util:gpr_test_util"], + deps = [ + "//:grpc++", + "//external:gtest", + "//test/core/util:gpr_test_util", + ], ) -cc_test( +grpc_cc_test( name = "auth_property_iterator_test", srcs = ["auth_property_iterator_test.cc"], - deps = ["//:grpc++", "//external:gtest", "//test/core/util:gpr_test_util", "//test/cpp/util:test_util"], + deps = [ + "//:grpc++", + "//test/core/util:gpr_test_util", + "//test/cpp/util:test_util", + ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "channel_arguments_test", srcs = ["channel_arguments_test.cc"], - deps = ["//:grpc++", "//external:gtest", "//test/core/util:gpr_test_util"], + deps = [ + "//:grpc++", + "//test/core/util:gpr_test_util", + ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "channel_filter_test", srcs = ["channel_filter_test.cc"], - deps = ["//:grpc++", "//external:gtest", "//test/core/util:gpr_test_util"], + deps = [ + "//:grpc++", + "//test/core/util:gpr_test_util", + ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "secure_auth_context_test", srcs = ["secure_auth_context_test.cc"], - deps = ["//:grpc++", "//external:gtest", "//test/core/util:gpr_test_util", "//test/cpp/util:test_util"], + deps = [ + "//:grpc++", + "//test/core/util:gpr_test_util", + "//test/cpp/util:test_util", + ], + external_deps = [ + "gtest", + ], ) diff --git a/test/cpp/end2end/BUILD b/test/cpp/end2end/BUILD index 0bf7948fcfe..1edc97243e2 100644 --- a/test/cpp/end2end/BUILD +++ b/test/cpp/end2end/BUILD @@ -29,25 +29,28 @@ licenses(["notice"]) # 3-clause BSD -cc_library( +load("//bazel:grpc_build_system.bzl", "grpc_cc_library", "grpc_cc_test") + +grpc_cc_library( name = "test_service_impl", srcs = ["test_service_impl.cc"], hdrs = ["test_service_impl.h"], deps = [ - "//external:gtest", "//src/proto/grpc/testing:echo_proto", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "async_end2end_test", srcs = ["async_end2end_test.cc"], deps = [ "//:gpr", "//:grpc", "//:grpc++", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -55,16 +58,18 @@ cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "client_crash_test", srcs = ["client_crash_test.cc"], deps = [ "//:gpr", "//:grpc", "//:grpc++", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -72,17 +77,18 @@ cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "client_crash_test_server", srcs = ["client_crash_test_server.cc"], deps = [ "//:gpr", "//:grpc", "//:grpc++", - "//external:gflags", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -90,9 +96,13 @@ cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gflags", + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "end2end_test", srcs = ["end2end_test.cc"], deps = [ @@ -100,7 +110,6 @@ cc_test( "//:gpr", "//:grpc", "//:grpc++", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -108,16 +117,18 @@ cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "filter_end2end_test", srcs = ["filter_end2end_test.cc"], deps = [ "//:gpr", "//:grpc", "//:grpc++", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -125,16 +136,18 @@ cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "generic_end2end_test", srcs = ["generic_end2end_test.cc"], deps = [ "//:gpr", "//:grpc", "//:grpc++", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -142,9 +155,12 @@ cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "hybrid_end2end_test", srcs = ["hybrid_end2end_test.cc"], deps = [ @@ -152,7 +168,6 @@ cc_test( "//:gpr", "//:grpc", "//:grpc++", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -160,16 +175,18 @@ cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "mock_test", srcs = ["mock_test.cc"], deps = [ "//:gpr", "//:grpc", "//:grpc++", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -177,9 +194,12 @@ cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "round_robin_end2end_test", srcs = ["round_robin_end2end_test.cc"], deps = [ @@ -187,7 +207,6 @@ cc_test( "//:gpr", "//:grpc", "//:grpc++", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -195,9 +214,12 @@ cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "proto_server_reflection_test", srcs = ["proto_server_reflection_test.cc"], deps = [ @@ -206,8 +228,6 @@ cc_test( "//:grpc", "//:grpc++", "//:grpc++_reflection", - "//external:gflags", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -216,9 +236,13 @@ cc_test( "//test/cpp/util:grpc++_proto_reflection_desc_db", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + "gflags", + ], ) -cc_test( +grpc_cc_test( name = "server_builder_plugin_test", srcs = ["server_builder_plugin_test.cc"], deps = [ @@ -226,7 +250,6 @@ cc_test( "//:gpr", "//:grpc", "//:grpc++", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -234,16 +257,18 @@ cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "server_crash_test", srcs = ["server_crash_test.cc"], deps = [ "//:gpr", "//:grpc", "//:grpc++", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -251,17 +276,18 @@ cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "server_crash_test_client", srcs = ["server_crash_test_client.cc"], deps = [ "//:gpr", "//:grpc", "//:grpc++", - "//external:gflags", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -269,16 +295,19 @@ cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gflags", + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "shutdown_test", srcs = ["shutdown_test.cc"], deps = [ "//:gpr", "//:grpc", "//:grpc++", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -286,16 +315,18 @@ cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "streaming_throughput_test", srcs = ["streaming_throughput_test.cc"], deps = [ "//:gpr", "//:grpc", "//:grpc++", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -303,16 +334,18 @@ cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + ], ) -cc_test( +grpc_cc_test( name = "thread_stress_test", srcs = ["thread_stress_test.cc"], deps = [ "//:gpr", "//:grpc", "//:grpc++", - "//external:gtest", "//src/proto/grpc/testing:echo_messages_proto", "//src/proto/grpc/testing:echo_proto", "//src/proto/grpc/testing/duplicate:echo_duplicate_proto", @@ -320,4 +353,7 @@ cc_test( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + ], ) diff --git a/test/cpp/microbenchmarks/BUILD b/test/cpp/microbenchmarks/BUILD index 38619666dcb..473c0165254 100644 --- a/test/cpp/microbenchmarks/BUILD +++ b/test/cpp/microbenchmarks/BUILD @@ -29,64 +29,75 @@ licenses(["notice"]) # 3-clause BSD -cc_test( +load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library") + +grpc_cc_test( name = "noop-benchmark", srcs = ["noop-benchmark.cc"], deps = ["//external:benchmark"], - linkopts = ["-pthread"], ) -cc_library( +grpc_cc_library( name = "helpers", srcs = ["helpers.cc"], - hdrs = ["helpers.h", "fullstack_fixtures.h", "fullstack_context_mutators.h"], - deps = ["//:grpc++", "//external:benchmark", "//test/core/util:grpc_test_util", "//src/proto/grpc/testing:echo_proto"], - linkopts = ["-pthread"], + hdrs = [ + "fullstack_context_mutators.h", + "fullstack_fixtures.h", + "helpers.h", + ], + deps = [ + "//:grpc++", + "//src/proto/grpc/testing:echo_proto", + "//test/core/util:grpc_test_util", + ], + external_deps = [ + "benchmark", + ], ) -cc_test( +grpc_cc_test( name = "bm_closure", srcs = ["bm_closure.cc"], deps = [":helpers"], ) -cc_test( +grpc_cc_test( name = "bm_cq", srcs = ["bm_cq.cc"], deps = [":helpers"], ) -cc_test( +grpc_cc_test( name = "bm_error", srcs = ["bm_error.cc"], deps = [":helpers"], ) -cc_test( +grpc_cc_test( name = "bm_fullstack_streaming_ping_pong", srcs = ["bm_fullstack_streaming_ping_pong.cc"], deps = [":helpers"], +) - ) -cc_test( +grpc_cc_test( name = "bm_fullstack_streaming_pump", srcs = ["bm_fullstack_streaming_pump.cc"], deps = [":helpers"], ) -cc_test( +grpc_cc_test( name = "bm_fullstack_trickle", srcs = ["bm_fullstack_trickle.cc"], deps = [":helpers"], ) -cc_test( +grpc_cc_test( name = "bm_fullstack_unary_ping_pong", srcs = ["bm_fullstack_unary_ping_pong.cc"], deps = [":helpers"], ) -cc_test( +grpc_cc_test( name = "bm_metadata", srcs = ["bm_metadata.cc"], deps = [":helpers"], diff --git a/test/cpp/qps/BUILD b/test/cpp/qps/BUILD index 6492b63ec30..de46847963b 100644 --- a/test/cpp/qps/BUILD +++ b/test/cpp/qps/BUILD @@ -29,14 +29,16 @@ licenses(["notice"]) # 3-clause BSD -cc_library( +load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_cc_library", "grpc_cc_binary") + +grpc_cc_library( name = "parse_json", srcs = ["parse_json.cc"], hdrs = ["parse_json.h"], deps = ["//:grpc++"], ) -cc_library( +grpc_cc_library( name = "qps_worker_impl", srcs = [ "client_async.cc", @@ -56,7 +58,6 @@ cc_library( ":usage_timer", "//:grpc", "//:grpc++", - "//external:gtest", "//src/proto/grpc/testing:control_proto", "//src/proto/grpc/testing:payloads_proto", "//src/proto/grpc/testing:services_proto", @@ -65,9 +66,12 @@ cc_library( "//test/core/util:grpc_test_util", "//test/cpp/util:test_util", ], + external_deps = [ + "gtest", + ], ) -cc_library( +grpc_cc_library( name = "driver_impl", srcs = [ "driver.cc", @@ -90,7 +94,7 @@ cc_library( ], ) -cc_library( +grpc_cc_library( name = "benchmark_config", srcs = [ "benchmark_config.cc", @@ -102,12 +106,14 @@ cc_library( ":driver_impl", ":histogram", "//:grpc++", - "//external:gflags", "//src/proto/grpc/testing:control_proto", ], + external_deps = [ + "gflags", + ], ) -cc_library( +grpc_cc_library( name = "histogram", hdrs = [ "histogram.h", @@ -116,13 +122,13 @@ cc_library( deps = ["//:gpr"], ) -cc_library( +grpc_cc_library( name = "interarrival", hdrs = ["interarrival.h"], deps = ["//:grpc++"], ) -cc_binary( +grpc_cc_binary( name = "json_run_localhost", srcs = ["json_run_localhost.cc"], deps = [ @@ -133,7 +139,7 @@ cc_binary( ], ) -cc_test( +grpc_cc_test( name = "qps_interarrival_test", srcs = ["qps_interarrival_test.cc"], deps = [ @@ -142,18 +148,20 @@ cc_test( ], ) -cc_binary( +grpc_cc_binary( name = "qps_json_driver", srcs = ["qps_json_driver.cc"], deps = [ ":benchmark_config", ":driver_impl", "//:grpc++", - "//external:gflags", + ], + external_deps = [ + "gflags", ], ) -cc_test( +grpc_cc_test( name = "qps_openloop_test", srcs = ["qps_openloop_test.cc"], deps = [ @@ -163,7 +171,7 @@ cc_test( ], ) -cc_test( +grpc_cc_test( name = "secure_sync_unary_ping_pong_test", srcs = ["secure_sync_unary_ping_pong_test.cc"], deps = [ @@ -173,14 +181,14 @@ cc_test( ], ) -cc_library( +grpc_cc_library( name = "usage_timer", srcs = ["usage_timer.cc"], hdrs = ["usage_timer.h"], deps = ["//:gpr"], ) -cc_binary( +grpc_cc_binary( name = "qps_worker", srcs = ["worker.cc"], deps = [ diff --git a/test/cpp/util/BUILD b/test/cpp/util/BUILD index dc90a4e172c..ea7827a68df 100644 --- a/test/cpp/util/BUILD +++ b/test/cpp/util/BUILD @@ -29,7 +29,11 @@ licenses(["notice"]) # 3-clause BSD -cc_library( +load("//bazel:grpc_build_system.bzl", "grpc_cc_library") + +package(default_visibility = ["//test:__subpackages__"]) + +grpc_cc_library( name = "test_config", srcs = [ "test_config_cc.cc", @@ -37,14 +41,15 @@ cc_library( hdrs = [ "test_config.h", ], - visibility = ["//test:__subpackages__"], + external_deps = [ + "gflags", + ], deps = [ "//:gpr", - "//external:gflags", ], ) -cc_library( +grpc_cc_library( name = "grpc++_proto_reflection_desc_db", srcs = [ "proto_reflection_descriptor_database.cc", @@ -52,17 +57,16 @@ cc_library( hdrs = [ "proto_reflection_descriptor_database.h", ], - visibility = ["//test:__subpackages__"], deps = [ "//:grpc++_config_proto", "//src/proto/grpc/reflection/v1alpha:reflection_proto", ], ) -cc_library( +grpc_cc_library( name = "test_util", srcs = [ - # "test/cpp/end2end/test_service_impl.cc", + # "test/cpp/end2end/test_service_impl.cc", "byte_buffer_proto_helper.cc", "create_test_channel.cc", "string_ref_helper.cc", @@ -76,7 +80,6 @@ cc_library( "subprocess.h", "test_credentials_provider.h", ], - visibility = ["//test:__subpackages__"], deps = [ "//:grpc++", "//test/core/end2end:ssl_test_data", diff --git a/tools/grpcz/BUILD b/tools/grpcz/BUILD index 5e1faf7064f..74ff4970797 100644 --- a/tools/grpcz/BUILD +++ b/tools/grpcz/BUILD @@ -33,18 +33,18 @@ package(default_visibility = ["//visibility:public"]) load("//:bazel/grpc_build_system.bzl", "grpc_proto_library") -grpc_proto_library ( +grpc_proto_library( name = "monitoring_proto", srcs = [ "monitoring.proto", ], + well_known_protos = "@submodule_protobuf//:well_known_protos", deps = [ ":census_proto", ], - well_known_protos = "@submodule_protobuf//:well_known_protos", ) -grpc_proto_library ( +grpc_proto_library( name = "census_proto", srcs = [ "census.proto", @@ -54,10 +54,10 @@ grpc_proto_library ( cc_binary( name = "grpcz_client", - srcs = ["grpcz_client.cc",], + srcs = ["grpcz_client.cc"], deps = [ - "//external:gflags", "monitoring_proto", + "//external:gflags", "@mongoose_repo//:mongoose_lib", ], )