mirror of https://github.com/grpc/grpc.git
parent
d4ad4ad03b
commit
5f5402505e
10 changed files with 90 additions and 84 deletions
@ -1,12 +0,0 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package grpc_tools.complicated; |
||||
|
||||
import "grpc_tools/simplest.proto"; |
||||
|
||||
message ComplicatedMessage { |
||||
bool yes = 1; |
||||
bool no = 2; |
||||
bool why = 3; |
||||
grpc_tools.simplest.SimplestMessage simplest_message = 4; |
||||
}; |
@ -1,11 +0,0 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package grpc_tools.simpler; |
||||
|
||||
import "grpc_tools/simplest.proto"; |
||||
|
||||
message SimplerMessage { |
||||
int64 do_i_even_exist = 1; |
||||
grpc_tools.simplest.SimplestMessage simplest_message = 2; |
||||
}; |
||||
|
@ -0,0 +1,41 @@ |
||||
package(default_testonly = 1) |
||||
|
||||
load("//bazel:python_rules.bzl", "py_grpc_library", "py_proto_library") |
||||
|
||||
proto_library( |
||||
name = "simplest_proto", |
||||
srcs = ["simplest.proto"], |
||||
strip_import_prefix = "/tools/distrib/python/grpcio_tools/", |
||||
testonly = True, |
||||
) |
||||
|
||||
proto_library( |
||||
name = "complicated_proto", |
||||
srcs = ["complicated.proto"], |
||||
deps = [":simplest_proto"], |
||||
strip_import_prefix = "/tools/distrib/python/grpcio_tools/", |
||||
testonly = True, |
||||
) |
||||
|
||||
py_proto_library( |
||||
name = "complicated_py_pb2", |
||||
deps = ["complicated_proto"], |
||||
testonly = True, |
||||
) |
||||
|
||||
py_test( |
||||
name = "protoc_test", |
||||
srcs = ["protoc_test.py"], |
||||
deps = [ |
||||
"//tools/distrib/python/grpcio_tools/grpc_tools:grpc_tools", |
||||
":complicated_py_pb2", |
||||
], |
||||
data = [ |
||||
"simple.proto", |
||||
"simpler.proto", |
||||
"simplest.proto", |
||||
"complicated.proto", |
||||
"flawed.proto", |
||||
], |
||||
python_version = "PY3", |
||||
) |
@ -0,0 +1,12 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package grpc_tools.test.complicated; |
||||
|
||||
import "grpc_tools/test/simplest.proto"; |
||||
|
||||
message ComplicatedMessage { |
||||
bool yes = 1; |
||||
bool no = 2; |
||||
bool why = 3; |
||||
grpc_tools.test.simplest.SimplestMessage simplest_message = 4; |
||||
}; |
@ -0,0 +1,11 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package grpc_tools.test.simpler; |
||||
|
||||
import "grpc_tools/test/simplest.proto"; |
||||
|
||||
message SimplerMessage { |
||||
int64 do_i_even_exist = 1; |
||||
grpc_tools.test.simplest.SimplestMessage simplest_message = 2; |
||||
}; |
||||
|
@ -1,6 +1,6 @@ |
||||
syntax = "proto3"; |
||||
|
||||
package grpc_tools.simplest; |
||||
package grpc_tools.test.simplest; |
||||
|
||||
message SimplestMessage { |
||||
int64 i_definitely_dont_exist = 1; |
Loading…
Reference in new issue