From 2b3f56ed22b952011d6d8693b11c29b08a39d35d Mon Sep 17 00:00:00 2001 From: Liz Kammer Date: Thu, 23 Mar 2023 11:51:49 -0400 Subject: Add apex_available aidl + aidl&lang libraries Test: b build com.android.neuralnetworks com.android.media.swcodec Change-Id: I008b915b22e4c8c2cf1f0aee6cfdaf17374cb3a9 --- bp2build/filegroup_conversion_test.go | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'bp2build/filegroup_conversion_test.go') 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"]`}), }}) -- cgit v1.2.3-59-g8ed1b