Add test for aidl apex_available conversion
Bug: 260694842
Test: m nothing
Change-Id: I625917da54b759ffd5c0c841b56e3f96286728eb
diff --git a/build/aidl_interface_bp2build_test.go b/build/aidl_interface_bp2build_test.go
index 319af91..5574696 100644
--- a/build/aidl_interface_bp2build_test.go
+++ b/build/aidl_interface_bp2build_test.go
@@ -363,3 +363,39 @@
},
})
}
+
+func TestAidlInterfaceWithApexAvailable(t *testing.T) {
+ runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
+ Description: `aidl_interface apex_available`,
+ Blueprint: `
+ aidl_interface {
+ name: "aidl-interface1",
+ backend: {
+ java: {
+ enabled: false,
+ },
+ cpp: {
+ enabled: false,
+ },
+ ndk: {
+ enabled: true,
+ apex_available: [
+ "com.android.abd",
+ "//apex_available:platform",
+ ],
+ },
+ }
+ }`,
+ ExpectedBazelTargets: []string{
+ bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface1", bp2build.AttrNameToString{
+ "ndk_config": `{
+ "enabled": True,
+ "tags": [
+ "apex_available=com.android.abd",
+ "apex_available=//apex_available:platform",
+ ],
+ }`,
+ }),
+ },
+ })
+}