blob: 2c72ab9b6ef281035e75ef5ec3d3287cd8bc3664 [file] [log] [blame]
# This package aids testing the 'copy_directory' rule.
load("//rules:copy_directory.bzl", "copy_directory")
licenses(["notice"])
package(default_testonly = 1)
# Copy of directory containing files a and b, and a subdir containing c
copy_directory(
name = "copy_of_dir_with_subdir",
src = "dir_with_subdir",
out = "dir_copy",
)
genrule(
name = "empty_directory",
outs = ["empty_dir"],
cmd = "mkdir $@",
)
copy_directory(
name = "copy_of_empty_dir",
src = "empty_dir",
out = "empty_dir_copy",
)
copy_directory(
name = "copy_of_dir_with_symlink",
src = "dir_with_symlink",
out = "dir_with_symlink_copy",
)
sh_test(
name = "copy_directory_tests",
srcs = ["copy_directory_tests.sh"],
data = [
":copy_of_dir_with_subdir",
":copy_of_dir_with_symlink",
":copy_of_empty_dir",
"//tests:unittest.bash",
],
deps = ["@bazel_tools//tools/bash/runfiles"],
)