load("@io_bazel_rules_go//go:def.bzl", "go_path", "go_test") test_suite(name = "go_path") [go_path( name = mode + "_path", testonly = True, data = ["extra.txt"], include_pkg = True, mode = mode, deps = [ "//tests/core/go_path/cmd/bin", "//tests/core/go_path/cmd/bin:cross", "//tests/core/go_path/pkg/lib:embed_test", "//tests/core/go_path/pkg/lib:go_default_library", "//tests/core/go_path/pkg/lib:go_default_test", "//tests/core/go_path/pkg/lib:vendored", ], ) for mode in ("archive", "copy")] go_path( name = "transition_path", testonly = True, data = ["extra.txt"], include_pkg = True, mode = "copy", deps = ["//tests/core/go_path/cmd/bin:pie"], ) go_path( name = "nodata_path", testonly = True, data = ["extra.txt"], include_data = False, mode = "copy", deps = ["//tests/core/go_path/pkg/lib:go_default_library"], ) go_path( name = "notransitive_path", testonly = True, include_transitive = False, mode = "copy", deps = ["//tests/core/go_path/pkg/lib:go_default_library"], ) go_path( name = "embed_path", mode = "copy", deps = ["//tests/core/go_path/pkg/lib:generated_embeded"], ) go_path( name = "embed_no_srcs_path", mode = "copy", deps = ["//tests/core/go_path/pkg/lib:generated_embeded_no_srcs"], ) go_test( name = "go_path_test", srcs = ["go_path_test.go"], args = [ "-archive_path=$(location :archive_path)", "-copy_path=$(location :copy_path)", "-nodata_path=$(location :nodata_path)", "-embed_path=$(location :embed_path)", "-embed_no_srcs_path=$(location :embed_no_srcs_path)", "-notransitive_path=$(location :notransitive_path)", ], data = [ ":archive_path", ":copy_path", ":embed_no_srcs_path", ":embed_path", ":nodata_path", ":notransitive_path", ":transition_path", ], rundir = ".", deps = ["//go/tools/bazel:go_default_library"], )