github.com/0xKiwi/rules_go@v0.24.3/tests/core/output_groups/BUILD.bazel (about) 1 load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test") 2 3 go_library( 4 name = "lib", 5 srcs = ["lib.go"], 6 importpath = "lib", 7 ) 8 9 go_test( 10 name = "lib_test", 11 srcs = ["lib_test.go"], 12 embed = [":lib"], 13 ) 14 15 go_binary( 16 name = "bin", 17 srcs = ["bin.go"], 18 ) 19 20 filegroup( 21 name = "compilation_outputs", 22 testonly = True, 23 srcs = [ 24 ":bin", 25 ":lib", 26 ":lib_test", 27 ], 28 output_group = "compilation_outputs", 29 ) 30 31 go_test( 32 name = "compilation_outputs_test", 33 srcs = ["compilation_outputs_test.go"], 34 data = [":compilation_outputs"], 35 deps = ["//go/tools/bazel:go_default_library"], 36 )