The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#) https://grpc.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

516 lines
11 KiB

# Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
5 years ago
load("//bazel:custom_exec_properties.bzl", "LARGE_MACHINE")
load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_package")
load("//test/core/test_util:grpc_fuzzer.bzl", "grpc_proto_fuzzer")
licenses(["notice"])
grpc_package(name = "test/core/gprpp")
grpc_cc_test(
name = "directory_reader_test",
srcs = ["directory_reader_test.cc"],
data = [
"//test/core/tsi/test_creds/crl_data/crls:ab06acdd.r0",
"//test/core/tsi/test_creds/crl_data/crls:b9322cac.r0",
"//test/core/tsi/test_creds/crl_data/crls:current.crl",
"//test/core/tsi/test_creds/crl_data/crls:intermediate.crl",
],
external_deps = [
"gtest",
],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:directory_reader",
"//test/core/test_util:grpc_test_util",
],
)
grpc_cc_test(
name = "examine_stack_test",
srcs = ["examine_stack_test.cc"],
external_deps = [
"absl/debugging:stacktrace",
"absl/debugging:symbolize",
"absl/log:log",
"gtest",
],
language = "C++",
# TODO(https://github.com/grpc/grpc/issues/24627): Disable this on Windows
tags = ["no_windows"],
uses_event_engine = False,
uses_polling = False,
deps = [
"//:gpr",
"//test/core/test_util:grpc_test_util",
],
)
grpc_cc_test(
name = "dump_args_test",
srcs = ["dump_args_test.cc"],
external_deps = [
"gtest",
],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:dump_args",
],
)
# TODO(hork): solidify fork support requirements for EventEngines
7 years ago
grpc_cc_test(
name = "fork_test",
srcs = ["fork_test.cc"],
external_deps = ["gtest"],
7 years ago
language = "C++",
tags = ["no_windows"],
uses_event_engine = True, # engines should behave appropriately on Fork
uses_polling = False,
7 years ago
deps = [
"//:gpr",
"//test/core/test_util:grpc_test_util",
7 years ago
],
)
grpc_cc_test(
name = "bitset_test",
srcs = ["bitset_test.cc"],
external_deps = ["gtest"],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:bitset",
],
)
grpc_cc_test(
name = "if_list_test",
srcs = ["if_list_test.cc"],
external_deps = ["gtest"],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:if_list",
],
)
grpc_cc_test(
name = "no_destruct_test",
srcs = ["no_destruct_test.cc"],
external_deps = ["gtest"],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:no_destruct",
],
)
grpc_cc_test(
name = "match_test",
srcs = ["match_test.cc"],
external_deps = ["gtest"],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:match",
],
)
grpc_cc_test(
name = "overload_test",
srcs = ["overload_test.cc"],
external_deps = ["gtest"],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:overload",
],
)
grpc_cc_test(
name = "down_cast_test",
srcs = ["down_cast_test.cc"],
external_deps = ["gtest"],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:down_cast",
],
)
grpc_cc_test(
name = "table_test",
srcs = ["table_test.cc"],
external_deps = [
"gtest",
"absl/types:optional",
],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:table",
],
)
grpc_cc_test(
name = "host_port_test",
srcs = ["host_port_test.cc"],
external_deps = ["gtest"],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//:gpr",
"//test/core/test_util:grpc_test_util",
],
)
grpc_cc_test(
name = "mpscq_test",
srcs = ["mpscq_test.cc"],
exec_properties = LARGE_MACHINE,
external_deps = [
"absl/log:log",
"gtest",
],
language = "C++",
tags = ["no_windows"], # LARGE_MACHINE is not configured for windows RBE
uses_event_engine = False,
uses_polling = False,
deps = [
"//:gpr",
"//test/core/test_util:grpc_test_util",
],
)
grpc_cc_test(
name = "orphanable_test",
srcs = ["orphanable_test.cc"],
external_deps = [
"gtest",
],
language = "C++",
deps = [
"//:orphanable",
"//test/core/test_util:grpc_test_util",
],
)
grpc_cc_test(
name = "ref_counted_test",
srcs = ["ref_counted_test.cc"],
external_deps = [
"gtest",
],
language = "C++",
deps = [
"//src/core:ref_counted",
"//test/core/test_util:grpc_test_util",
],
)
grpc_cc_test(
name = "dual_ref_counted_test",
srcs = ["dual_ref_counted_test.cc"],
external_deps = [
"absl/log:check",
"gtest",
],
language = "C++",
deps = [
"//src/core:dual_ref_counted",
"//test/core/test_util:grpc_test_util",
],
)
grpc_cc_test(
name = "ref_counted_ptr_test",
srcs = ["ref_counted_ptr_test.cc"],
external_deps = [
"absl/container:flat_hash_set",
"absl/log:check",
"gtest",
],
language = "C++",
deps = [
"//:ref_counted_ptr",
"//src/core:dual_ref_counted",
"//src/core:ref_counted",
"//test/core/test_util:grpc_test_util",
],
)
7 years ago
grpc_cc_test(
name = "thd_test",
srcs = ["thd_test.cc"],
external_deps = ["gtest"],
7 years ago
language = "C++",
uses_event_engine = False,
uses_polling = False,
7 years ago
deps = [
"//:gpr",
"//test/core/test_util:grpc_test_util",
7 years ago
],
)
grpc_cc_test(
name = "stat_test",
srcs = ["stat_test.cc"],
external_deps = [
"gtest",
],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//:gpr",
"//:grpc",
"//test/core/test_util:grpc_test_util",
],
)
4 years ago
grpc_cc_test(
name = "status_helper_test",
srcs = ["status_helper_test.cc"],
external_deps = [
"gtest",
],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//:gpr",
"//test/core/test_util:grpc_test_util",
],
)
4 years ago
grpc_cc_test(
name = "time_util_test",
srcs = ["time_util_test.cc"],
external_deps = [
"gtest",
],
language = "C++",
uses_event_engine = False,
4 years ago
uses_polling = False,
deps = [
"//:gpr",
"//test/core/test_util:grpc_test_util",
4 years ago
],
)
grpc_cc_test(
name = "cpp_impl_of_test",
srcs = ["cpp_impl_of_test.cc"],
external_deps = ["gtest"],
language = "c++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//:cpp_impl_of",
],
)
grpc_cc_test(
name = "chunked_vector_test",
srcs = ["chunked_vector_test.cc"],
external_deps = ["gtest"],
language = "c++",
tags = [
"resource_quota_test",
],
uses_event_engine = False,
uses_polling = False,
deps = [
"//:gpr",
"//src/core:chunked_vector",
"//src/core:resource_quota",
],
)
grpc_proto_fuzzer(
name = "chunked_vector_fuzzer",
srcs = ["chunked_vector_fuzzer.cc"],
corpus = "chunked_vector_corpora",
external_deps = ["absl/log:check"],
language = "C++",
proto = "chunked_vector_fuzzer.proto",
tags = ["no_windows"],
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:chunked_vector",
"//src/core:resource_quota",
"//test/core/test_util:grpc_test_util",
],
)
grpc_cc_test(
name = "time_test",
srcs = ["time_test.cc"],
external_deps = ["gtest"],
language = "c++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:time",
],
)
grpc_cc_test(
name = "single_set_ptr_test",
srcs = ["single_set_ptr_test.cc"],
external_deps = [
"absl/log:log",
"gtest",
],
language = "c++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:single_set_ptr",
],
)
grpc_cc_test(
name = "sorted_pack_test",
srcs = ["sorted_pack_test.cc"],
external_deps = ["gtest"],
language = "c++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:sorted_pack",
],
)
grpc_cc_test(
name = "unique_type_name_test",
srcs = ["unique_type_name_test.cc"],
external_deps = [
"gtest",
"absl/strings:str_format",
],
language = "c++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:unique_type_name",
],
)
grpc_cc_test(
name = "work_serializer_test",
srcs = ["work_serializer_test.cc"],
exec_properties = LARGE_MACHINE,
external_deps = [
"gtest",
],
flaky = True,
language = "C++",
shard_count = 5,
tags = [
"no_windows", # LARGE_MACHINE is not configured for windows RBE
],
deps = [
"//:gpr",
"//:grpc",
"//test/core/event_engine:event_engine_test_utils",
"//test/core/test_util:grpc_test_util",
],
)
grpc_cc_test(
name = "validation_errors_test",
srcs = ["validation_errors_test.cc"],
external_deps = [
"gtest",
],
language = "C++",
deps = [
"//src/core:validation_errors",
"//test/core/test_util:grpc_test_util",
],
)
grpc_cc_test(
name = "notification_test",
srcs = ["notification_test.cc"],
external_deps = [
"gtest",
],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = ["//src/core:notification"],
)
grpc_cc_test(
name = "load_file_test",
srcs = ["load_file_test.cc"],
external_deps = [
"gtest",
],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:load_file",
"//test/core/test_util:grpc_test_util",
],
)
grpc_cc_test(
name = "uuid_v4_test",
srcs = ["uuid_v4_test.cc"],
external_deps = [
"gtest",
],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//src/core:uuid_v4",
"//test/core/test_util:grpc_test_util",
],
)
[logging] Centralize configuration for trace flags (#36576) All TraceFlags are now configured in `src/core/lib/debug/trace_flags.yaml`. The format is: ``` my_flag: default: false # the default value; default=false description: Some Description debug_only: false # debug_only flags only work in debug builds; default=false internal: false # internal flags will not show up in documentation; default=false ``` To regenerate the trace flag source code, run `tools/codegen/core/gen_trace_flags.py` (requires mako). This script is also run when sanity checking. This PR also adds two new features: ### Glob-based flag configuration Trace flag configuration now supports `?` (single wildcard character) and `*` (one or more wildcard characters). For example, using `GRPC_TRACE='event_engine*'` will enable all flags that match that glob. It expands to: * event_engine * event_engine_client_channel_resolver * event_engine_dns * event_engine_endpoint * event_engine_endpoint_data * event_engine_poller ### A cleaner trace-logging macro in abseil logging format If your goal is only to add log statements when the `fault_injection_filter` trace flag is enabled, you can use the macro: ``` GRPC_TRACE_LOG(fault_injection, INFO) << "Filtered:" << 42; ``` When the trace flag is enabled, the the log will show something like this: ``` I0000 00:00:1715733657.430042 16 file.cc:174] Filtered:42 ``` ---- Note: just like with the gpr_log to abseil logging conversion, the pre-existing trace logging usages can be replaced with the new tracing macro across multiple PRs. Closes #36576 PiperOrigin-RevId: 641295215
6 months ago
grpc_cc_test(
name = "glob_test",
srcs = ["glob_test.cc"],
external_deps = ["gtest"],
language = "C++",
uses_event_engine = False,
uses_polling = False,
deps = [
"//:gpr",
"//src/core:useful",
"//test/core/test_util:grpc_test_util",
],
)