Protocol Buffers - Google's data interchange format (grpc依赖)
https://developers.google.com/protocol-buffers/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
165 lines
3.2 KiB
165 lines
3.2 KiB
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix") |
|
load("@rules_ruby//ruby:defs.bzl", "ruby_library", "ruby_test") |
|
load("//ruby:defs.bzl", "internal_ruby_proto_library") |
|
|
|
ruby_library( |
|
name = "common_tests", |
|
srcs = ["common_tests.rb"], |
|
) |
|
|
|
internal_ruby_proto_library( |
|
name = "test_ruby_protos", |
|
srcs = glob(["*.proto"]), |
|
includes = [ |
|
".", |
|
"ruby/tests", |
|
"src", |
|
], |
|
visibility = [ |
|
"//ruby:__subpackages__", |
|
], |
|
deps = ["//ruby:well_known_ruby_protos"], |
|
) |
|
|
|
ruby_test( |
|
name = "implementation", |
|
srcs = ["implementation.rb"], |
|
deps = [ |
|
"//ruby:protobuf", |
|
"@protobuf_bundle//:test-unit", |
|
], |
|
) |
|
|
|
ruby_test( |
|
name = "basic", |
|
srcs = ["basic.rb"], |
|
deps = [ |
|
":common_tests", |
|
":test_ruby_protos", |
|
"//ruby:protobuf", |
|
"@protobuf_bundle//:test-unit", |
|
], |
|
) |
|
|
|
ruby_test( |
|
name = "basic_proto2", |
|
srcs = ["basic_proto2.rb"], |
|
deps = [ |
|
":common_tests", |
|
":test_ruby_protos", |
|
"//ruby:protobuf", |
|
"@protobuf_bundle//:test-unit", |
|
], |
|
) |
|
|
|
ruby_test( |
|
name = "encode_decode_test", |
|
srcs = ["encode_decode_test.rb"], |
|
deps = [ |
|
":test_ruby_protos", |
|
"//ruby:protobuf", |
|
"@protobuf_bundle//:test-unit", |
|
], |
|
) |
|
|
|
ruby_test( |
|
name = "gc_test", |
|
srcs = ["gc_test.rb"], |
|
deps = [ |
|
":test_ruby_protos", |
|
"//ruby:protobuf", |
|
"@protobuf_bundle//:test-unit", |
|
], |
|
) |
|
|
|
ruby_test( |
|
name = "generated_code_test", |
|
srcs = ["generated_code_test.rb"], |
|
deps = [ |
|
":test_ruby_protos", |
|
"//ruby:protobuf", |
|
"@protobuf_bundle//:test-unit", |
|
], |
|
) |
|
|
|
ruby_test( |
|
name = "multi_level_nesting_test", |
|
srcs = ["multi_level_nesting_test.rb"], |
|
deps = [ |
|
":test_ruby_protos", |
|
"//ruby:protobuf", |
|
"@protobuf_bundle//:test-unit", |
|
], |
|
) |
|
|
|
ruby_test( |
|
name = "object_cache_test", |
|
srcs = ["object_cache_test.rb"], |
|
deps = [ |
|
":test_ruby_protos", |
|
"//ruby:protobuf", |
|
"@protobuf_bundle//:test-unit", |
|
], |
|
) |
|
|
|
ruby_test( |
|
name = "repeated_field_test", |
|
srcs = ["repeated_field_test.rb"], |
|
deps = [ |
|
":test_ruby_protos", |
|
"//ruby:protobuf", |
|
"@protobuf_bundle//:test-unit", |
|
], |
|
) |
|
|
|
ruby_test( |
|
name = "ruby_version", |
|
srcs = ["ruby_version.rb"], |
|
deps = [ |
|
":test_ruby_protos", |
|
"//ruby:protobuf", |
|
"@protobuf_bundle//:test-unit", |
|
], |
|
) |
|
|
|
ruby_test( |
|
name = "stress", |
|
srcs = ["stress.rb"], |
|
deps = [ |
|
":test_ruby_protos", |
|
"//ruby:protobuf", |
|
"@protobuf_bundle//:test-unit", |
|
], |
|
) |
|
|
|
ruby_test( |
|
name = "type_errors", |
|
srcs = ["type_errors.rb"], |
|
deps = [ |
|
":test_ruby_protos", |
|
"//ruby:protobuf", |
|
"@protobuf_bundle//:test-unit", |
|
], |
|
) |
|
|
|
ruby_test( |
|
name = "well_known_types_test", |
|
srcs = ["well_known_types_test.rb"], |
|
deps = [ |
|
":test_ruby_protos", |
|
"//ruby:protobuf", |
|
"@protobuf_bundle//:test-unit", |
|
], |
|
) |
|
|
|
pkg_files( |
|
name = "dist_files", |
|
srcs = glob([ |
|
"*.proto", |
|
"*.rb", |
|
]) + [ |
|
"BUILD.bazel", |
|
], |
|
strip_prefix = strip_prefix.from_root(""), |
|
visibility = ["//ruby:__pkg__"], |
|
)
|
|
|