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