mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-25 17:08:39 +00:00
Allow to run cpp tests under grpc/tests/ using bazel. (#6040)
This is the first step to upgrade grpc dependency to the latest version. - Patch protobuf 3.6.1. and grpc 1.15.1 to fix build errors when using the latest Bazel version (3.4.1). - Add grpc/tests:grpc_test. One can kick off tests in Bazel by calling `bazel test grpc/tests/...`. - Add missing build targets in tests/BUILD in order to support grpc/tests/BUILD
This commit is contained in:
24
bazel/protobuf_deps_3_6_1.patch
Normal file
24
bazel/protobuf_deps_3_6_1.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
diff --git a/protobuf.bzl b/protobuf.bzl
|
||||
index 78f19c621..3b6d183b9 100644
|
||||
--- a/protobuf.bzl
|
||||
+++ b/protobuf.bzl
|
||||
@@ -130,7 +130,7 @@ proto_gen = rule(
|
||||
"protoc": attr.label(
|
||||
cfg = "host",
|
||||
executable = True,
|
||||
- single_file = True,
|
||||
+ allow_single_file = True,
|
||||
mandatory = True,
|
||||
),
|
||||
"plugin": attr.label(
|
||||
@@ -266,8 +266,8 @@ def internal_gen_well_known_protos_java(srcs):
|
||||
Args:
|
||||
srcs: the well known protos
|
||||
"""
|
||||
- root = Label("%s//protobuf_java" % (REPOSITORY_NAME)).workspace_root
|
||||
- pkg = PACKAGE_NAME + "/" if PACKAGE_NAME else ""
|
||||
+ root = Label("%s//protobuf_java" % (native.repository_name())).workspace_root
|
||||
+ pkg = native.package_name() + "/" if native.package_name() else ""
|
||||
if root == "":
|
||||
include = " -I%ssrc " % pkg
|
||||
else:
|
||||
Reference in New Issue
Block a user