aboutsummaryrefslogtreecommitdiff
path: root/tests/copy_directory/BUILD.bazel
blob: f766e99f97eb875a9e6ccdab7810391f6abe1d3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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"],
)