aboutsummaryrefslogtreecommitdiff
path: root/tests/copy_directory/BUILD.bazel
diff options
context:
space:
mode:
Diffstat (limited to 'tests/copy_directory/BUILD.bazel')
-rw-r--r--tests/copy_directory/BUILD.bazel43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/copy_directory/BUILD.bazel b/tests/copy_directory/BUILD.bazel
new file mode 100644
index 0000000..f766e99
--- /dev/null
+++ b/tests/copy_directory/BUILD.bazel
@@ -0,0 +1,43 @@
+# This package aids testing the 'copy_directory' rule.
+
+load("//rules:copy_directory.bzl", "copy_directory")
+load(":empty_directory.bzl", "empty_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",
+)
+
+empty_directory(
+ name = "empty_dir",
+)
+
+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"],
+)