2
0
Fork 0
mirror of https://github.com/bazel-contrib/bazel-lib synced 2024-12-03 11:52:43 +00:00
bazel-lib/lib/tests/copy_to_bin/BUILD.bazel

70 lines
1.2 KiB
Python
Raw Normal View History

2022-04-12 23:31:04 +00:00
"tests for copy_to_bin"
load("//lib:copy_to_bin.bzl", "copy_to_bin")
load("//lib:output_files.bzl", "output_files")
copy_to_bin(
name = "copy",
srcs = [
"file1",
"file2",
],
)
output_files(
name = "pull_out_file1",
paths = ["%s/file1" % package_name()],
target = ":copy",
)
output_files(
name = "pull_out_file2",
paths = ["%s/file2" % package_name()],
target = ":copy",
)
sh_test(
name = "file1_test",
timeout = "short",
2022-04-12 23:31:04 +00:00
srcs = ["test.sh"],
args = [
"lib/tests/copy_to_bin/file1",
"$(execpath file1)",
"$(execpath :pull_out_file1)",
],
data = [
"file1",
":pull_out_file1",
],
)
sh_test(
name = "file2_test",
timeout = "short",
2022-04-12 23:31:04 +00:00
srcs = ["test.sh"],
args = [
"lib/tests/copy_to_bin/file2",
"$(execpath file2)",
"$(execpath :pull_out_file2)",
],
data = [
"file2",
":pull_out_file2",
],
)
# Case: two different targets copying same file to bin
copy_to_bin(
name = "copy_same_file_1",
srcs = [
"file3",
],
)
copy_to_bin(
name = "copy_same_file_2",
srcs = [
"file3",
],
)