2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-11-27 02:43:28 +00:00
rules_foreign_cc/test/detect_root_test/BUILD.bazel
UebelAndre 175b29c6f7
Renamed BUILD files to BUILD.bazel (#540)
* Renamed BUILD files to BUILD.bazel

* Ran Buildifier
2021-03-03 10:08:03 -08:00

62 lines
1 KiB
Python

load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
load(":detect_root_test_rule.bzl", "detect_root_test_rule")
filegroup(
name = "fg",
srcs = glob(
["dir1/**"],
),
)
filegroup(
name = "fg_srcs",
srcs = glob(
["dir1/srcs/**"],
),
)
detect_root_test_rule(
name = "srcs_is_fg",
srcs = ":fg",
out = "out_fg.txt",
)
detect_root_test_rule(
name = "srcs_is_fg_srcs",
srcs = ":fg_srcs",
out = "out_fg_srcs.txt",
)
detect_root_test_rule(
name = "srcs_in_repo",
srcs = "@rules_foreign_cc_detect_root_test_repo//:srcs",
out = "out_repo.txt",
)
diff_test(
name = "repo_test",
file1 = ":srcs_in_repo",
file2 = "expected/out_repo.txt",
)
diff_test(
name = "fg_test",
file1 = ":srcs_is_fg",
file2 = "expected/out_fg.txt",
)
diff_test(
name = "fg_srcs_test",
file1 = ":srcs_is_fg_srcs",
file2 = "expected/out_fg_srcs.txt",
)
test_suite(
name = "tests",
tests = [
"fg_srcs_test",
"fg_test",
"repo_test",
],
)