summaryrefslogtreecommitdiff
path: root/bp2build/filegroup_conversion_test.go
diff options
context:
space:
mode:
author Liz Kammer <eakammer@google.com> 2023-03-23 11:51:49 -0400
committer Liz Kammer <eakammer@google.com> 2023-03-24 15:14:53 -0400
commit2b3f56ed22b952011d6d8693b11c29b08a39d35d (patch)
treeac45b27eabb0291f347a247cda2807b4ae5ded42 /bp2build/filegroup_conversion_test.go
parent10e5a0e987f56ab2dfcf754995df470317759615 (diff)
Add apex_available aidl + aidl&lang libraries
Test: b build com.android.neuralnetworks com.android.media.swcodec Change-Id: I008b915b22e4c8c2cf1f0aee6cfdaf17374cb3a9
Diffstat (limited to 'bp2build/filegroup_conversion_test.go')
-rw-r--r--bp2build/filegroup_conversion_test.go24
1 files changed, 16 insertions, 8 deletions
diff --git a/bp2build/filegroup_conversion_test.go b/bp2build/filegroup_conversion_test.go
index e978fb319..7ce559d9b 100644
--- a/bp2build/filegroup_conversion_test.go
+++ b/bp2build/filegroup_conversion_test.go
@@ -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"]`}),
}})