aboutsummaryrefslogtreecommitdiff
path: root/tests/core/go_plugin_with_proto_library/BUILD.bazel
diff options
context:
space:
mode:
authorSpandan Das <spandandas@google.com>2023-06-15 00:09:40 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-06-15 00:09:40 +0000
commit96939a977e4ffc1fec4dd7bdca23142216948ab7 (patch)
treed9fac15bb5a835ae6ba757dc5eaf6ef597ea44cf /tests/core/go_plugin_with_proto_library/BUILD.bazel
parent9803cf8403d7105bddc1d5304d6e694b781a6605 (diff)
parentde80525bbabc1267e61286f2d4dccc553c7063e9 (diff)
downloadbazelbuild-rules_go-96939a977e4ffc1fec4dd7bdca23142216948ab7.tar.gz
Merge remote-tracking branch 'aosp/upstream-master' into merge_rules_go am: 49dcd02124 am: 711a453236 am: 6cf433ad1b am: de80525bba
Original change: https://android-review.googlesource.com/c/platform/external/bazelbuild-rules_go/+/2625353 Change-Id: I7004a94c375c5e52d9a4c49147ceefb8c95fed92 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'tests/core/go_plugin_with_proto_library/BUILD.bazel')
-rw-r--r--tests/core/go_plugin_with_proto_library/BUILD.bazel31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/core/go_plugin_with_proto_library/BUILD.bazel b/tests/core/go_plugin_with_proto_library/BUILD.bazel
new file mode 100644
index 00000000..468d8b35
--- /dev/null
+++ b/tests/core/go_plugin_with_proto_library/BUILD.bazel
@@ -0,0 +1,31 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_test")
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+
+test_suite(name = "go_plugin_with_proto_library")
+
+go_test(
+ name = "go_default_test",
+ srcs = ["all_test.go"],
+ data = [":plugin"],
+ deps = [":validate"],
+)
+
+go_binary(
+ name = "plugin",
+ srcs = ["plugin.go"],
+ out = "plugin.so",
+ linkmode = "plugin",
+ deps = [":validate"],
+)
+
+proto_library(
+ name = "validate_proto",
+ srcs = ["validate.proto"],
+)
+
+go_proto_library(
+ name = "validate",
+ gc_goopts = ["-trimpath=$(BINDIR)=>."],
+ importpath = "go_plugin_with_proto_library/validate",
+ proto = ":validate_proto",
+)