github.com/stackb/rules_proto@v0.0.0-20240221195024-5428336c51f1/example/toolchain/standard/standard_test.go (about) 1 package standard 2 3 import ( 4 "testing" 5 6 "github.com/bazelbuild/rules_go/go/tools/bazel_testing" 7 ) 8 9 func TestMain(m *testing.M) { 10 bazel_testing.TestMain(m, bazel_testing.Args{ 11 Main: txtar, 12 }) 13 } 14 15 func TestRun(t *testing.T) { 16 if err := bazel_testing.RunBazel("run", "@com_google_protobuf//:protoc"); err != nil { 17 t.Fatal(err) 18 } 19 } 20 21 var txtar = ` 22 -- WORKSPACE -- 23 local_repository( 24 name = "build_stack_rules_proto", 25 path = "../build_stack_rules_proto", 26 ) 27 28 register_toolchains("@build_stack_rules_proto//toolchain:standard") 29 30 load("@build_stack_rules_proto//deps:protobuf_core_deps.bzl", "protobuf_core_deps") 31 32 protobuf_core_deps() 33 34 load("@rules_python//python:repositories.bzl", "py_repositories") 35 36 py_repositories() 37 38 -- BUILD.bazel -- 39 # empty file 40 `