|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
"""This module contains unit tests for rust_proto_library and its aspect.""" |
|
|
|
|
|
|
|
|
|
load("@bazel_skylib//lib:unittest.bzl", "analysistest", "asserts") |
|
|
|
|
load("//bazel:proto_library.bzl", "proto_library") |
|
|
|
|
load("//rust:aspects.bzl", "RustProtoInfo") |
|
|
|
|
load("//rust:defs.bzl", "rust_cc_proto_library", "rust_upb_proto_library") |
|
|
|
|
load(":defs.bzl", "ActionsInfo", "attach_cc_aspect", "attach_upb_aspect") |
|
|
|
@ -210,21 +211,18 @@ def rust_proto_library_unit_test(name): |
|
|
|
|
|
|
|
|
|
Args: |
|
|
|
|
name: name of the test suite""" |
|
|
|
|
native.proto_library( |
|
|
|
|
proto_library( |
|
|
|
|
# Use a '-' in the target name to test that its replaced by a '_' in the crate name. |
|
|
|
|
name = "grand-parent_proto", |
|
|
|
|
srcs = ["grandparent1.proto", "grandparent2.proto"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
native.proto_library( |
|
|
|
|
proto_library( |
|
|
|
|
name = "parent_proto", |
|
|
|
|
srcs = ["parent.proto"], |
|
|
|
|
deps = [":grand-parent_proto"], |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
native.proto_library(name = "parent2_proto", srcs = ["parent2.proto"]) |
|
|
|
|
|
|
|
|
|
native.proto_library( |
|
|
|
|
proto_library(name = "parent2_proto", srcs = ["parent2.proto"]) |
|
|
|
|
proto_library( |
|
|
|
|
name = "child_proto", |
|
|
|
|
srcs = ["child.proto"], |
|
|
|
|
deps = [":parent_proto", ":parent2_proto"], |
|
|
|
|