Merge pull request #14662 from apolcyn/fix_broken_file_test_under_bazel

Fix a broken bazel test
reviewable/pr14615/r3
apolcyn 7 years ago committed by GitHub
commit 1213682122
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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"],
deps = [
"//:grpc++",
"//src/proto/grpc/testing:compiler_test_proto",
"//test/core/util:gpr_test_util",
],
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(
name = "run_golden_file_test",
srcs = ["run_golden_file_test.sh"],
@ -77,6 +90,7 @@ grpc_sh_test(
":golden_file_test",
":compiler_test_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
# limitations under the License.
set -ex
set -eux
GENERATED_FILES_PATH="$TEST_SRCDIR/../../../../../genfiles/src/proto/grpc/testing/"
test/cpp/codegen/golden_file_test --generated_file_path="$GENERATED_FILES_PATH"
GENERATED_PB_H_DIR="${TEST_SRCDIR}/com_github_grpc_grpc/test/cpp/codegen/"
test/cpp/codegen/golden_file_test --generated_file_path="$GENERATED_PB_H_DIR"

Loading…
Cancel
Save