2024-02-22 11:05:41 +00:00
|
|
|
load("@bazel_skylib//rules:native_binary.bzl", "native_binary")
|
2024-06-03 23:19:58 +00:00
|
|
|
load("@bazel_skylib//rules/directory:directory.bzl", "directory")
|
2024-09-05 16:05:23 +00:00
|
|
|
load("@bazel_skylib//rules/directory:subdirectory.bzl", "subdirectory")
|
2024-02-22 11:05:41 +00:00
|
|
|
|
2024-02-21 01:58:00 +00:00
|
|
|
package(default_visibility = ["//tests/rule_based_toolchain:__subpackages__"])
|
|
|
|
|
2024-06-03 23:19:58 +00:00
|
|
|
directory(
|
|
|
|
name = "directory",
|
|
|
|
srcs = glob(
|
2024-09-05 16:05:23 +00:00
|
|
|
["**"],
|
2024-06-03 23:19:58 +00:00
|
|
|
exclude = ["BUILD"],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
|
2024-09-05 16:05:23 +00:00
|
|
|
subdirectory(
|
|
|
|
name = "subdirectory_1",
|
|
|
|
parent = ":directory",
|
|
|
|
path = "subdir1",
|
|
|
|
)
|
|
|
|
|
|
|
|
subdirectory(
|
|
|
|
name = "subdirectory_2",
|
|
|
|
parent = ":directory",
|
|
|
|
path = "subdir2",
|
|
|
|
)
|
|
|
|
|
|
|
|
subdirectory(
|
|
|
|
name = "subdirectory_3",
|
|
|
|
parent = ":directory",
|
|
|
|
path = "subdir3",
|
|
|
|
)
|
|
|
|
|
2024-02-21 01:58:00 +00:00
|
|
|
exports_files(
|
|
|
|
glob(
|
|
|
|
["*"],
|
|
|
|
exclude = ["BUILD"],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
|
2024-02-22 11:05:41 +00:00
|
|
|
native_binary(
|
|
|
|
name = "bin_wrapper",
|
|
|
|
src = "bin_wrapper.sh",
|
|
|
|
out = "bin_wrapper",
|
|
|
|
data = [":bin"],
|
|
|
|
)
|
|
|
|
|
2024-02-21 01:58:00 +00:00
|
|
|
filegroup(
|
|
|
|
name = "multiple",
|
|
|
|
srcs = [
|
|
|
|
"multiple1",
|
|
|
|
"multiple2",
|
|
|
|
],
|
|
|
|
)
|
2024-02-22 11:05:41 +00:00
|
|
|
|
|
|
|
# Analysis_test is unable to depend on source files directly, but it can depend
|
|
|
|
# on a filegroup containing a single file.
|
|
|
|
filegroup(
|
|
|
|
name = "bin_filegroup",
|
|
|
|
srcs = ["bin"],
|
|
|
|
)
|
2024-06-03 23:23:48 +00:00
|
|
|
|
|
|
|
# Analysis_test is unable to depend on source files directly, but it can depend
|
|
|
|
# on a filegroup containing a single file.
|
|
|
|
filegroup(
|
|
|
|
name = "bin_wrapper_filegroup",
|
|
|
|
srcs = ["bin_wrapper.sh"],
|
|
|
|
)
|