2022-06-28 06:46:00 +00:00
|
|
|
load("//lib:diff_test.bzl", "diff_test")
|
|
|
|
load("//lib:copy_to_directory.bzl", "copy_to_directory")
|
2022-08-01 16:56:52 +00:00
|
|
|
load("//lib:copy_to_bin.bzl", "copy_to_bin")
|
2022-06-28 06:46:00 +00:00
|
|
|
load(":lib.bzl", "lib")
|
|
|
|
load(":pkg.bzl", "pkg")
|
|
|
|
|
2022-08-01 16:56:52 +00:00
|
|
|
copy_to_bin(
|
|
|
|
name = "copy_1",
|
|
|
|
srcs = ["1"],
|
|
|
|
)
|
|
|
|
|
2022-06-28 06:46:00 +00:00
|
|
|
lib(
|
|
|
|
name = "lib",
|
|
|
|
srcs = ["1"],
|
2022-07-29 03:39:12 +00:00
|
|
|
# intentionally dup on "1" to make sure it is gracefully handled
|
|
|
|
others = [
|
|
|
|
"1",
|
2022-08-01 16:56:52 +00:00
|
|
|
# also pass in a copy_to_bin copy of "1" to spice things up;
|
|
|
|
# this case is handled in the fix in https://github.com/aspect-build/bazel-lib/pull/205
|
|
|
|
"copy_1",
|
2022-07-29 03:39:12 +00:00
|
|
|
"2",
|
|
|
|
],
|
2022-06-28 06:46:00 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# pkg should copy DefaultInfo files and OtherInfo files
|
|
|
|
pkg(
|
|
|
|
name = "pkg",
|
|
|
|
srcs = [":lib"],
|
|
|
|
out = "pkg",
|
|
|
|
)
|
|
|
|
|
|
|
|
copy_to_directory(
|
|
|
|
name = "expected_pkg",
|
|
|
|
srcs = [
|
|
|
|
"1",
|
|
|
|
"2",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
diff_test(
|
|
|
|
name = "test",
|
|
|
|
file1 = ":pkg",
|
|
|
|
file2 = ":expected_pkg",
|
|
|
|
)
|