Merge "Omit bazel.LabelList attrs if no path is specified" am: 2f2b0d4c05
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1590692 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I3640ad908e581f112366b43fb778a35df1195a40
This commit is contained in:
@@ -395,6 +395,9 @@ func BazelLabelForModuleSrcExcludes(ctx BazelConversionPathContext, paths, exclu
|
||||
// `android:"path"` so that dependencies on other modules will have already been handled by the
|
||||
// path_properties mutator.
|
||||
func expandSrcsForBazel(ctx BazelConversionPathContext, paths, expandedExcludes []string) bazel.LabelList {
|
||||
if paths == nil {
|
||||
return bazel.LabelList{}
|
||||
}
|
||||
labels := bazel.LabelList{
|
||||
Includes: []bazel.Label{},
|
||||
}
|
||||
|
@@ -468,6 +468,21 @@ genrule {
|
||||
fs map[string]string
|
||||
dir string
|
||||
}{
|
||||
{
|
||||
description: "filegroup with does not specify srcs",
|
||||
moduleTypeUnderTest: "filegroup",
|
||||
moduleTypeUnderTestFactory: android.FileGroupFactory,
|
||||
moduleTypeUnderTestBp2BuildMutator: android.FilegroupBp2Build,
|
||||
bp: `filegroup {
|
||||
name: "fg_foo",
|
||||
bazel_module: { bp2build_available: true },
|
||||
}`,
|
||||
expectedBazelTargets: []string{
|
||||
`filegroup(
|
||||
name = "fg_foo",
|
||||
)`,
|
||||
},
|
||||
},
|
||||
{
|
||||
description: "filegroup with no srcs",
|
||||
moduleTypeUnderTest: "filegroup",
|
||||
|
Reference in New Issue
Block a user