• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("@io_bazel_rules_go//go:def.bzl", "go_path", "go_test")
2
3test_suite(name = "go_path")
4
5[go_path(
6    name = mode + "_path",
7    testonly = True,
8    data = ["extra.txt"],
9    include_pkg = True,
10    mode = mode,
11    deps = [
12        "//tests/core/go_path/cmd/bin",
13        "//tests/core/go_path/cmd/bin:cross",
14        "//tests/core/go_path/pkg/lib:embed_test",
15        "//tests/core/go_path/pkg/lib:go_default_library",
16        "//tests/core/go_path/pkg/lib:go_default_test",
17        "//tests/core/go_path/pkg/lib:vendored",
18    ],
19) for mode in ("archive", "copy")]
20
21go_path(
22    name = "transition_path",
23    testonly = True,
24    data = ["extra.txt"],
25    include_pkg = True,
26    mode = "copy",
27    deps = ["//tests/core/go_path/cmd/bin:pie"],
28)
29
30go_path(
31    name = "nodata_path",
32    testonly = True,
33    data = ["extra.txt"],
34    include_data = False,
35    mode = "copy",
36    deps = ["//tests/core/go_path/pkg/lib:go_default_library"],
37)
38
39go_path(
40    name = "notransitive_path",
41    testonly = True,
42    include_transitive = False,
43    mode = "copy",
44    deps = ["//tests/core/go_path/pkg/lib:go_default_library"],
45)
46
47go_path(
48    name = "embed_path",
49    mode = "copy",
50    deps = ["//tests/core/go_path/pkg/lib:generated_embeded"],
51)
52
53go_path(
54    name = "embed_no_srcs_path",
55    mode = "copy",
56    deps = ["//tests/core/go_path/pkg/lib:generated_embeded_no_srcs"],
57)
58
59go_test(
60    name = "go_path_test",
61    srcs = ["go_path_test.go"],
62    args = [
63        "-archive_path=$(location :archive_path)",
64        "-copy_path=$(location :copy_path)",
65        "-nodata_path=$(location :nodata_path)",
66        "-embed_path=$(location :embed_path)",
67        "-embed_no_srcs_path=$(location :embed_no_srcs_path)",
68        "-notransitive_path=$(location :notransitive_path)",
69    ],
70    data = [
71        ":archive_path",
72        ":copy_path",
73        ":embed_no_srcs_path",
74        ":embed_path",
75        ":nodata_path",
76        ":notransitive_path",
77        ":transition_path",
78    ],
79    rundir = ".",
80    deps = ["//go/tools/bazel:go_default_library"],
81)
82