Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 1 | # Copyright 2017 gRPC authors. |
David Garcia Quintas | eb4c47e | 2017-02-17 15:41:20 -0800 | [diff] [blame] | 2 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 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 |
David Garcia Quintas | eb4c47e | 2017-02-17 15:41:20 -0800 | [diff] [blame] | 6 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
David Garcia Quintas | eb4c47e | 2017-02-17 15:41:20 -0800 | [diff] [blame] | 8 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 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. |
David Garcia Quintas | eb4c47e | 2017-02-17 15:41:20 -0800 | [diff] [blame] | 14 | |
Jan Tattermusch | 4d5c310 | 2017-06-07 10:23:56 +0200 | [diff] [blame] | 15 | licenses(["notice"]) # Apache v2 |
David Garcia Quintas | eb4c47e | 2017-02-17 15:41:20 -0800 | [diff] [blame] | 16 | |
Alexander Polcyn | 2830e3a | 2017-12-11 19:15:14 -0800 | [diff] [blame] | 17 | load("//bazel:grpc_build_system.bzl", "grpc_cc_test", "grpc_package", "grpc_cc_binary", "grpc_sh_test") |
Nicolas "Pixel" Noble | 7c26eed | 2017-04-13 01:40:54 +0200 | [diff] [blame] | 18 | |
Nicolas "Pixel" Noble | 2bc5e3a | 2017-08-15 22:32:52 +0200 | [diff] [blame] | 19 | grpc_package(name = "test/cpp/codegen") |
Nicolas "Pixel" Noble | af6c83f | 2017-05-19 00:38:10 +0200 | [diff] [blame] | 20 | |
Nicolas "Pixel" Noble | 7c26eed | 2017-04-13 01:40:54 +0200 | [diff] [blame] | 21 | grpc_cc_test( |
David Garcia Quintas | eb4c47e | 2017-02-17 15:41:20 -0800 | [diff] [blame] | 22 | name = "codegen_test_full", |
| 23 | srcs = ["codegen_test_full.cc"], |
| 24 | deps = [ |
| 25 | "//:grpc++", |
David Garcia Quintas | eb4c47e | 2017-02-17 15:41:20 -0800 | [diff] [blame] | 26 | "//test/core/util:gpr_test_util", |
| 27 | ], |
Nicolas "Pixel" Noble | 7c26eed | 2017-04-13 01:40:54 +0200 | [diff] [blame] | 28 | external_deps = [ |
| 29 | "gtest", |
| 30 | ], |
David Garcia Quintas | eb4c47e | 2017-02-17 15:41:20 -0800 | [diff] [blame] | 31 | ) |
| 32 | |
Nicolas "Pixel" Noble | 7c26eed | 2017-04-13 01:40:54 +0200 | [diff] [blame] | 33 | grpc_cc_test( |
David Garcia Quintas | eb4c47e | 2017-02-17 15:41:20 -0800 | [diff] [blame] | 34 | name = "codegen_test_minimal", |
| 35 | srcs = ["codegen_test_minimal.cc"], |
| 36 | deps = [ |
| 37 | "//:grpc++", |
David Garcia Quintas | eb4c47e | 2017-02-17 15:41:20 -0800 | [diff] [blame] | 38 | "//test/core/util:gpr_test_util", |
| 39 | ], |
Nicolas "Pixel" Noble | 7c26eed | 2017-04-13 01:40:54 +0200 | [diff] [blame] | 40 | external_deps = [ |
| 41 | "gtest", |
| 42 | ], |
David Garcia Quintas | eb4c47e | 2017-02-17 15:41:20 -0800 | [diff] [blame] | 43 | ) |
| 44 | |
Nicolas "Pixel" Noble | 7c26eed | 2017-04-13 01:40:54 +0200 | [diff] [blame] | 45 | grpc_cc_test( |
David Garcia Quintas | eb4c47e | 2017-02-17 15:41:20 -0800 | [diff] [blame] | 46 | name = "proto_utils_test", |
| 47 | srcs = ["proto_utils_test.cc"], |
| 48 | deps = [ |
| 49 | "//:grpc++", |
David Garcia Quintas | eb4c47e | 2017-02-17 15:41:20 -0800 | [diff] [blame] | 50 | "//test/core/util:gpr_test_util", |
| 51 | ], |
Nicolas "Pixel" Noble | 7c26eed | 2017-04-13 01:40:54 +0200 | [diff] [blame] | 52 | external_deps = [ |
| 53 | "gtest", |
Vijay Pai | 5e7ceeb | 2017-11-03 22:37:03 +0000 | [diff] [blame] | 54 | "protobuf", |
Nicolas "Pixel" Noble | 7c26eed | 2017-04-13 01:40:54 +0200 | [diff] [blame] | 55 | ], |
David Garcia Quintas | eb4c47e | 2017-02-17 15:41:20 -0800 | [diff] [blame] | 56 | ) |
David Garcia Quintas | e854357 | 2017-02-21 10:44:02 -0800 | [diff] [blame] | 57 | |
Alexander Polcyn | 2830e3a | 2017-12-11 19:15:14 -0800 | [diff] [blame] | 58 | grpc_cc_binary( |
David Garcia Quintas | e854357 | 2017-02-21 10:44:02 -0800 | [diff] [blame] | 59 | name = "golden_file_test", |
Alexander Polcyn | d3dbc0d | 2017-12-19 16:04:00 -0800 | [diff] [blame] | 60 | testonly = True, |
David Garcia Quintas | e854357 | 2017-02-21 10:44:02 -0800 | [diff] [blame] | 61 | srcs = ["golden_file_test.cc"], |
David Garcia Quintas | e854357 | 2017-02-21 10:44:02 -0800 | [diff] [blame] | 62 | deps = [ |
| 63 | "//:grpc++", |
David Garcia Quintas | e854357 | 2017-02-21 10:44:02 -0800 | [diff] [blame] | 64 | "//test/core/util:gpr_test_util", |
| 65 | ], |
Nicolas "Pixel" Noble | 7c26eed | 2017-04-13 01:40:54 +0200 | [diff] [blame] | 66 | external_deps = [ |
| 67 | "gtest", |
| 68 | "gflags", |
| 69 | ], |
David Garcia Quintas | e854357 | 2017-02-21 10:44:02 -0800 | [diff] [blame] | 70 | ) |
Alexander Polcyn | 2830e3a | 2017-12-11 19:15:14 -0800 | [diff] [blame] | 71 | |
Alexander Polcyn | f133259 | 2018-03-09 14:45:43 -0800 | [diff] [blame] | 72 | genrule( |
| 73 | name = "copy_compiler_test_grpc_pb_h", |
| 74 | srcs = ["//src/proto/grpc/testing:_compiler_test_proto_grpc_codegen"], |
| 75 | cmd = "cat $(GENDIR)/src/proto/grpc/testing/compiler_test.grpc.pb.h > $@", |
| 76 | outs = ["compiler_test.grpc.pb.h"], |
| 77 | ) |
| 78 | |
| 79 | genrule( |
| 80 | name = "copy_compiler_test_mock_grpc_pb_h", |
| 81 | srcs = ["//src/proto/grpc/testing:_compiler_test_proto_grpc_codegen"], |
| 82 | cmd = "cat $(GENDIR)/src/proto/grpc/testing/compiler_test_mock.grpc.pb.h > $@", |
| 83 | outs = ["compiler_test_mock.grpc.pb.h"], |
| 84 | ) |
| 85 | |
Alexander Polcyn | 2830e3a | 2017-12-11 19:15:14 -0800 | [diff] [blame] | 86 | grpc_sh_test( |
| 87 | name = "run_golden_file_test", |
| 88 | srcs = ["run_golden_file_test.sh"], |
| 89 | data = [ |
| 90 | ":golden_file_test", |
| 91 | ":compiler_test_golden", |
| 92 | ":compiler_test_mock_golden", |
Alexander Polcyn | f133259 | 2018-03-09 14:45:43 -0800 | [diff] [blame] | 93 | ":compiler_test.grpc.pb.h", |
| 94 | ":compiler_test_mock.grpc.pb.h", |
Alexander Polcyn | 2830e3a | 2017-12-11 19:15:14 -0800 | [diff] [blame] | 95 | ], |
| 96 | ) |