Add apex_available aidl + aidl&lang libraries

Test: b build com.android.neuralnetworks com.android.media.swcodec
Change-Id: I008b915b22e4c8c2cf1f0aee6cfdaf17374cb3a9
This commit is contained in:
Liz Kammer
2023-03-23 11:51:49 -04:00
parent 10e5a0e987
commit 2b3f56ed22
8 changed files with 55 additions and 14 deletions

View File

@@ -74,6 +74,7 @@ func TestFilegroupWithAidlSrcs(t *testing.T) {
expectedBazelAttrs: AttrNameToString{
"srcs": `["aidl/foo.aidl"]`,
"strip_import_prefix": `"aidl"`,
"tags": `["apex_available=//apex_available:anyapex"]`,
},
},
{
@@ -85,18 +86,21 @@ func TestFilegroupWithAidlSrcs(t *testing.T) {
}`,
expectedBazelAttrs: AttrNameToString{
"srcs": `["aidl/foo.aidl"]`,
"tags": `["apex_available=//apex_available:anyapex"]`,
},
},
}
for _, test := range testcases {
expectedBazelTargets := []string{
MakeBazelTargetNoRestrictions("aidl_library", "foo", test.expectedBazelAttrs),
}
runFilegroupTestCase(t, Bp2buildTestCase{
Description: test.name,
Blueprint: test.bp,
ExpectedBazelTargets: expectedBazelTargets,
t.Run(test.name, func(t *testing.T) {
expectedBazelTargets := []string{
MakeBazelTargetNoRestrictions("aidl_library", "foo", test.expectedBazelAttrs),
}
runFilegroupTestCase(t, Bp2buildTestCase{
Description: test.name,
Blueprint: test.bp,
ExpectedBazelTargets: expectedBazelTargets,
})
})
}
}
@@ -136,7 +140,11 @@ filegroup {
MakeBazelTargetNoRestrictions("proto_library", "foo_bp2build_converted", AttrNameToString{
"srcs": `["proto/foo.proto"]`,
"strip_import_prefix": `"proto"`,
"tags": `["manual"]`}),
"tags": `[
"apex_available=//apex_available:anyapex",
"manual",
]`,
}),
MakeBazelTargetNoRestrictions("filegroup", "foo", AttrNameToString{
"srcs": `["proto/foo.proto"]`}),
}})