Debian Codegraph @

test/cpp/codegen/BUILD

raw
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_binary", "grpc_cc_test", "grpc_package", "grpc_sh_test")
16
17 licenses(["notice"])
18
19 grpc_package(name = "test/cpp/codegen")
20
21 grpc_cc_test(
22 name = "codegen_test_full",
23 srcs = ["codegen_test_full.cc"],
24 external_deps = [
25 "gtest",
26 ],
27 uses_event_engine = False,
28 uses_polling = False,
29 deps = [
30 "//:grpc++",
31 "//test/core/util:grpc_test_util",
32 ],
33 )
34
35 grpc_cc_test(
36 name = "codegen_test_minimal",
37 srcs = ["codegen_test_minimal.cc"],
38 external_deps = [
39 "gtest",
40 ],
41 uses_event_engine = False,
42 uses_polling = False,
43 deps = [
44 "//:grpc++",
45 "//test/core/util:grpc_test_util",
46 ],
47 )
48
49 grpc_cc_test(
50 name = "proto_utils_test",
51 srcs = ["proto_utils_test.cc"],
52 external_deps = [
53 "gtest",
54 "protobuf",
55 ],
56 uses_event_engine = False,
57 uses_polling = False,
58 deps = [
59 "//:grpc++",
60 "//test/core/util:grpc_test_util",
61 ],
62 )
63
64 grpc_cc_binary(
65 name = "golden_file_test",
66 testonly = True,
67 srcs = ["golden_file_test.cc"],
68 external_deps = [
69 "absl/flags:flag",
70 "gtest",
71 ],
72 deps = [
73 "//:grpc++",
74 "//test/core/util:grpc_test_util",
75 "//test/cpp/util:test_config",
76 ],
77 )
78
79 genrule(
80 name = "copy_compiler_test_grpc_pb_h",
81 srcs = ["//src/proto/grpc/testing:_compiler_test_proto_grpc_codegen"],
82 outs = ["compiler_test.grpc.pb.h"],
83 cmd = "cat $(GENDIR)/src/proto/grpc/testing/compiler_test.grpc.pb.h > $@",
84 )
85
86 genrule(
87 name = "copy_compiler_test_mock_grpc_pb_h",
88 srcs = ["//src/proto/grpc/testing:_compiler_test_proto_grpc_codegen"],
89 outs = ["compiler_test_mock.grpc.pb.h"],
90 cmd = "cat $(GENDIR)/src/proto/grpc/testing/compiler_test_mock.grpc.pb.h > $@",
91 )
92
93 grpc_sh_test(
94 name = "run_golden_file_test",
95 srcs = ["run_golden_file_test.sh"],
96 data = [
97 ":compiler_test.grpc.pb.h",
98 ":compiler_test_golden",
99 ":compiler_test_mock.grpc.pb.h",
100 ":compiler_test_mock_golden",
101 ":golden_file_test",
102 ],
103 uses_polling = False,
104 )