aboutsummaryrefslogtreecommitdiff
path: root/tests/core/go_plugin_with_proto_library/BUILD.bazel
diff options
context:
space:
mode:
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",
+)