aboutsummaryrefslogtreecommitdiff
path: root/tests/core/runfiles/BUILD.bazel
blob: c7db6d3d35c507b8584d0e84e0f77c7361745110 (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
44
45
46
47
48
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library", "go_test")

package(default_visibility = ["//visibility:public"])

test_suite(
    name = "runfiles_tests",
    tests = [
        ":local_test",
        "@runfiles_remote_test//:remote_test",
    ],
)

go_test(
    name = "local_test",
    srcs = ["runfiles_test.go"],
    deps = [":check_runfiles"],
)

go_binary(
    name = "local_cmd",
    srcs = ["runfiles_cmd.go"],
    deps = [":check_runfiles"],
)

go_binary(
    name = "local_bin",
    srcs = ["empty_bin.go"],
)

go_library(
    name = "check_runfiles",
    srcs = ["check_runfiles.go"],
    data = [
        "local_file.txt",
        ":local_bin",
        ":local_group",
        "@runfiles_remote_test//:remote_bin",
        "@runfiles_remote_test//:remote_file.txt",
        "@runfiles_remote_test//:remote_group",
    ],
    importpath = "github.com/bazelbuild/rules_go/tests/core/runfiles/check",
    deps = ["//go/tools/bazel:go_default_library"],
)

filegroup(
    name = "local_group",
    srcs = ["local_group.txt"],
)