aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/proto
diff options
context:
space:
mode:
authorGravatar Naresh <ghostwriternr@gmail.com>2018-10-11 08:43:34 +0000
committerGravatar Naresh <ghostwriternr@gmail.com>2018-10-11 08:43:34 +0000
commit9172775bc82b071acb81f08e81e7d7706a9dee3f (patch)
treeada1a362ebbb2bc2d243809c9dad4200b91beecd /src/proto
parent912b8ab4d49cd6cde76675d37c896e5edcf67487 (diff)
Bazel rules for gRPC Python interop tests
Add interop tests for gRPC Python. py_proto_library rules are added to src/proto/grpc/testing/BUILD since grpc_proto_library is not compatible with py_* rules. 'requests' python module is added to requirements.bazel.txt as it is a dependency for google-auth. Previously, this was installed through tools/run_tests/helper_scripts/build_python.sh before running tests.
Diffstat (limited to 'src/proto')
-rw-r--r--src/proto/grpc/testing/BUILD34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/proto/grpc/testing/BUILD b/src/proto/grpc/testing/BUILD
index 16721ff2ed..7048911b9a 100644
--- a/src/proto/grpc/testing/BUILD
+++ b/src/proto/grpc/testing/BUILD
@@ -15,6 +15,8 @@
licenses(["notice"]) # Apache v2
load("//bazel:grpc_build_system.bzl", "grpc_proto_library", "grpc_package")
+load("@grpc_python_dependencies//:requirements.bzl", "requirement")
+load("@org_pubref_rules_protobuf//python:rules.bzl", "py_proto_library")
grpc_package(name = "testing", visibility = "public")
@@ -58,12 +60,30 @@ grpc_proto_library(
has_services = False,
)
+py_proto_library(
+ name = "py_empty_proto",
+ protos = ["empty.proto",],
+ with_grpc = True,
+ deps = [
+ requirement('protobuf'),
+ ],
+)
+
grpc_proto_library(
name = "messages_proto",
srcs = ["messages.proto"],
has_services = False,
)
+py_proto_library(
+ name = "py_messages_proto",
+ protos = ["messages.proto",],
+ with_grpc = True,
+ deps = [
+ requirement('protobuf'),
+ ],
+)
+
grpc_proto_library(
name = "metrics_proto",
srcs = ["metrics.proto"],
@@ -116,3 +136,17 @@ grpc_proto_library(
"messages_proto",
],
)
+
+py_proto_library(
+ name = "py_test_proto",
+ protos = ["test.proto",],
+ with_grpc = True,
+ deps = [
+ requirement('protobuf'),
+ ],
+ proto_deps = [
+ ":py_empty_proto",
+ ":py_messages_proto",
+ ]
+)
+