Fix broken golden file test under bazel

pull/14662/head
Alexander Polcyn 7 years ago
parent 2e251697b1
commit f133259617
  1. 18
      test/cpp/codegen/BUILD
  2. 6
      test/cpp/codegen/run_golden_file_test.sh

@ -61,7 +61,6 @@ grpc_cc_binary(
srcs = ["golden_file_test.cc"], srcs = ["golden_file_test.cc"],
deps = [ deps = [
"//:grpc++", "//:grpc++",
"//src/proto/grpc/testing:compiler_test_proto",
"//test/core/util:gpr_test_util", "//test/core/util:gpr_test_util",
], ],
external_deps = [ external_deps = [
@ -70,6 +69,20 @@ grpc_cc_binary(
], ],
) )
genrule(
name = "copy_compiler_test_grpc_pb_h",
srcs = ["//src/proto/grpc/testing:_compiler_test_proto_grpc_codegen"],
cmd = "cat $(GENDIR)/src/proto/grpc/testing/compiler_test.grpc.pb.h > $@",
outs = ["compiler_test.grpc.pb.h"],
)
genrule(
name = "copy_compiler_test_mock_grpc_pb_h",
srcs = ["//src/proto/grpc/testing:_compiler_test_proto_grpc_codegen"],
cmd = "cat $(GENDIR)/src/proto/grpc/testing/compiler_test_mock.grpc.pb.h > $@",
outs = ["compiler_test_mock.grpc.pb.h"],
)
grpc_sh_test( grpc_sh_test(
name = "run_golden_file_test", name = "run_golden_file_test",
srcs = ["run_golden_file_test.sh"], srcs = ["run_golden_file_test.sh"],
@ -77,6 +90,7 @@ grpc_sh_test(
":golden_file_test", ":golden_file_test",
":compiler_test_golden", ":compiler_test_golden",
":compiler_test_mock_golden", ":compiler_test_mock_golden",
"//src/proto/grpc/testing:_compiler_test_proto_grpc_codegen", ":compiler_test.grpc.pb.h",
":compiler_test_mock.grpc.pb.h",
], ],
) )

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
set -ex set -eux
GENERATED_FILES_PATH="$TEST_SRCDIR/../../../../../genfiles/src/proto/grpc/testing/" GENERATED_PB_H_DIR="${TEST_SRCDIR}/com_github_grpc_grpc/test/cpp/codegen/"
test/cpp/codegen/golden_file_test --generated_file_path="$GENERATED_FILES_PATH" test/cpp/codegen/golden_file_test --generated_file_path="$GENERATED_PB_H_DIR"

Loading…
Cancel
Save