summaryrefslogtreecommitdiff
path: root/bp2build/filegroup_conversion_test.go
diff options
context:
space:
mode:
author Vinh Tran <vinhdaitran@google.com> 2023-06-12 21:07:40 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-06-12 21:07:40 +0000
commite3e7711ac60adea25eb64c95a6fad0b1f7005d7f (patch)
tree3309c3f3cf2d35500bfec922b7735e19608b89e2 /bp2build/filegroup_conversion_test.go
parent8106bd0b00039e207893749517d52d682d9f47df (diff)
Revert "Revert "Add aidl.deps prop to include aidl implicit deps explicitly in Android.bp""
This reverts commit 8106bd0b00039e207893749517d52d682d9f47df. Reason for revert: Fix CI breakage Change-Id: I5f0e72988cbb6845628d0ec7e82292c0aa1914a7
Diffstat (limited to 'bp2build/filegroup_conversion_test.go')
-rw-r--r--bp2build/filegroup_conversion_test.go36
1 files changed, 36 insertions, 0 deletions
diff --git a/bp2build/filegroup_conversion_test.go b/bp2build/filegroup_conversion_test.go
index 7ce559d9b..273d55636 100644
--- a/bp2build/filegroup_conversion_test.go
+++ b/bp2build/filegroup_conversion_test.go
@@ -105,6 +105,42 @@ func TestFilegroupWithAidlSrcs(t *testing.T) {
}
}
+func TestFilegroupWithAidlDeps(t *testing.T) {
+ bp := `
+ filegroup {
+ name: "bar",
+ srcs: ["bar.aidl"],
+ }
+ filegroup {
+ name: "foo",
+ srcs: ["aidl/foo.aidl"],
+ path: "aidl",
+ aidl: {
+ deps: [":bar"],
+ }
+ }`
+
+ t.Run("filegroup with aidl deps", func(t *testing.T) {
+ expectedBazelTargets := []string{
+ MakeBazelTargetNoRestrictions("aidl_library", "bar", AttrNameToString{
+ "srcs": `["bar.aidl"]`,
+ "tags": `["apex_available=//apex_available:anyapex"]`,
+ }),
+ MakeBazelTargetNoRestrictions("aidl_library", "foo", AttrNameToString{
+ "srcs": `["aidl/foo.aidl"]`,
+ "strip_import_prefix": `"aidl"`,
+ "deps": `[":bar"]`,
+ "tags": `["apex_available=//apex_available:anyapex"]`,
+ }),
+ }
+ runFilegroupTestCase(t, Bp2buildTestCase{
+ Description: "filegroup with aidl deps",
+ Blueprint: bp,
+ ExpectedBazelTargets: expectedBazelTargets,
+ })
+ })
+}
+
func TestFilegroupWithAidlAndNonAidlSrcs(t *testing.T) {
runFilegroupTestCase(t, Bp2buildTestCase{
Description: "filegroup with aidl and non-aidl srcs",