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