File paths to allow "./" prefix
bazel_path conversion would treat "./" as a package boundary
which would be incorrect
Bug: b/243072036
Test: unit test build_conversion_test.go and `m libc`
Change-Id: I0fc44d2fd7a4270442c8755219a11fd585244c5c
diff --git a/bp2build/build_conversion_test.go b/bp2build/build_conversion_test.go
index 9f4f7c1..10a13bf 100644
--- a/bp2build/build_conversion_test.go
+++ b/bp2build/build_conversion_test.go
@@ -971,6 +971,24 @@
},
},
{
+ Description: "filegroup with dot-slash-prefixed srcs",
+ ModuleTypeUnderTest: "filegroup",
+ ModuleTypeUnderTestFactory: android.FileGroupFactory,
+ Blueprint: `filegroup {
+ name: "fg_foo",
+ srcs: ["./a", "./b"],
+ bazel_module: { bp2build_available: true },
+}`,
+ ExpectedBazelTargets: []string{
+ MakeBazelTargetNoRestrictions("filegroup", "fg_foo", map[string]string{
+ "srcs": `[
+ "a",
+ "b",
+ ]`,
+ }),
+ },
+ },
+ {
Description: "filegroup with excludes srcs",
ModuleTypeUnderTest: "filegroup",
ModuleTypeUnderTestFactory: android.FileGroupFactory,