Fix checkbuild for modules with last variant disabled

The soong checkbuild target is created by the last varaint of each
module.  Don't return early if the variant is disabled, which would
prevent creating the checkbuild target.

Test: m -j checkbuild
Change-Id: Ib260bae7fb4be7255f5c1b34dfbd50225f308005
This commit is contained in:
Colin Cross 2016-09-19 15:18:11 -07:00
parent b0f28957ae
commit 9b1d13db73

View file

@ -366,10 +366,6 @@ func (p *ModuleBase) InstallInData() bool {
}
func (a *ModuleBase) generateModuleTarget(ctx blueprint.ModuleContext) {
if a != ctx.FinalModule().(Module).base() {
return
}
allInstalledFiles := Paths{}
allCheckbuildFiles := Paths{}
ctx.VisitAllModuleVariants(func(module blueprint.Module) {
@ -439,21 +435,21 @@ func (a *ModuleBase) GenerateBuildActions(ctx blueprint.ModuleContext) {
missingDeps: ctx.GetMissingDependencies(),
}
if !a.Enabled() {
return
if a.Enabled() {
a.module.GenerateAndroidBuildActions(androidCtx)
if ctx.Failed() {
return
}
a.installFiles = append(a.installFiles, androidCtx.installFiles...)
a.checkbuildFiles = append(a.checkbuildFiles, androidCtx.checkbuildFiles...)
}
a.module.GenerateAndroidBuildActions(androidCtx)
if ctx.Failed() {
return
}
a.installFiles = append(a.installFiles, androidCtx.installFiles...)
a.checkbuildFiles = append(a.checkbuildFiles, androidCtx.checkbuildFiles...)
a.generateModuleTarget(ctx)
if ctx.Failed() {
return
if a == ctx.FinalModule().(Module).base() {
a.generateModuleTarget(ctx)
if ctx.Failed() {
return
}
}
}