Generate BUILD files for every directory that has an Android.bp file.

Test: Added an integration test
Test: bazel build --package_path=out/soong/workspace //bionic/...

Change-Id: Ie34bd23ab3c5428e6c9c9919e5fb6fcb4e709adc
This commit is contained in:
Rupert Shuttleworth
2021-04-21 07:10:09 -04:00
parent b21166e236
commit 2a4fc3ecdc
11 changed files with 180 additions and 19 deletions

View File

@@ -183,6 +183,7 @@ func customBp2BuildMutatorFromStarlark(ctx android.TopDownMutatorContext) {
// Helper method for tests to easily access the targets in a dir.
func generateBazelTargetsForDir(codegenCtx *CodegenContext, dir string) BazelTargets {
buildFileToTargets, _ := GenerateBazelTargets(codegenCtx)
// TODO: Set generateFilegroups to true and/or remove the generateFilegroups argument completely
buildFileToTargets, _ := GenerateBazelTargets(codegenCtx, false)
return buildFileToTargets[dir]
}