xref: /aosp_15_r20/external/bazel-skylib/tests/directory/BUILD (revision bcb5dc7965af6ee42bf2f21341a2ec00233a8c8a)
1*bcb5dc79SHONG Yifanload("@bazel_skylib//rules:copy_file.bzl", "copy_file")
2*bcb5dc79SHONG Yifanload("@bazel_skylib//rules/directory:directory.bzl", "directory")
3*bcb5dc79SHONG Yifanload(":directory_test.bzl", "directory_test_suite")
4*bcb5dc79SHONG Yifanload(":glob_test.bzl", "glob_test_suite")
5*bcb5dc79SHONG Yifanload(":subdirectory_test.bzl", "subdirectory_test_suite")
6*bcb5dc79SHONG Yifan
7*bcb5dc79SHONG Yifanpackage(default_applicable_licenses = ["@bazel_skylib//:license"])
8*bcb5dc79SHONG Yifan
9*bcb5dc79SHONG Yifandirectory(
10*bcb5dc79SHONG Yifan    name = "root",
11*bcb5dc79SHONG Yifan    srcs = glob(["testdata/**"]),
12*bcb5dc79SHONG Yifan)
13*bcb5dc79SHONG Yifan
14*bcb5dc79SHONG Yifanfilegroup(
15*bcb5dc79SHONG Yifan    name = "f1_filegroup",
16*bcb5dc79SHONG Yifan    srcs = ["testdata/f1"],
17*bcb5dc79SHONG Yifan)
18*bcb5dc79SHONG Yifan
19*bcb5dc79SHONG Yifanfilegroup(
20*bcb5dc79SHONG Yifan    name = "f2_filegroup",
21*bcb5dc79SHONG Yifan    srcs = ["testdata/subdir/f2"],
22*bcb5dc79SHONG Yifan)
23*bcb5dc79SHONG Yifan
24*bcb5dc79SHONG Yifancopy_file(
25*bcb5dc79SHONG Yifan    name = "generated_file",
26*bcb5dc79SHONG Yifan    src = "testdata/f1",
27*bcb5dc79SHONG Yifan    out = "dir/generated",
28*bcb5dc79SHONG Yifan)
29*bcb5dc79SHONG Yifan
30*bcb5dc79SHONG Yifandirectory_test_suite(
31*bcb5dc79SHONG Yifan    name = "directory_tests",
32*bcb5dc79SHONG Yifan)
33*bcb5dc79SHONG Yifan
34*bcb5dc79SHONG Yifanglob_test_suite(
35*bcb5dc79SHONG Yifan    name = "glob_tests",
36*bcb5dc79SHONG Yifan)
37*bcb5dc79SHONG Yifan
38*bcb5dc79SHONG Yifansubdirectory_test_suite(
39*bcb5dc79SHONG Yifan    name = "subdirectory_tests",
40*bcb5dc79SHONG Yifan)
41