aboutsummaryrefslogtreecommitdiff
path: root/tests/legacy/empty_package/BUILD.bazel
blob: d90e59f74e9fc424293aa495f8d3d7125dca915b (plain)
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
37
38
39
40
41
42
43
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "cgo",
    srcs = [
        "cgo.c",
        "cgo.go",
    ],
    cgo = True,
    importpath = "github.com/bazelbuild/rules_go/tests/empty_package/cgo",
)

go_library(
    name = "mixed",
    srcs = [
        "mixed_cgo.go",
        "mixed_pure.go",
    ],
    importpath = "github.com/bazelbuild/rules_go/tests/empty_package/mixed",
    deps = [":cgo"],
)

go_test(
    name = "empty_package_cgo",
    size = "small",
    srcs = ["empty_package_test.go"],
    pure = "off",
    x_defs = {
        "Expect": "2",
    },
    deps = [":mixed"],
)

go_test(
    name = "empty_package_pure",
    size = "small",
    srcs = ["empty_package_test.go"],
    pure = "on",
    x_defs = {
        "Expect": "1",
    },
    deps = [":mixed"],
)