Don't create non-primary arch variant for recovery-only module
To save space, only the primary arch variant is installed to the recovery partition. This has been done in the imageMutator by not creating recovery variant for the non-primary arch. However, this caused a problem for recover-only module, i.e., recovery: true. Such module ends up creating no variant for the non-primary arch. Since every other modules are at least in one image variant, any dependency fro such module with no image variant can't be satisfied. In order to solve the problem, archMutator is modified to create only the primary arch for recovery-only modules. Bug: 111321972 Test: m -j (TestRecovery added) Change-Id: Ie32ae06fb094efcfd8531cdf6071139d292d93ab
This commit is contained in:
@@ -92,6 +92,16 @@ func (ctx *TestContext) ModuleForTests(name, variant string) TestingModule {
|
||||
return TestingModule{module}
|
||||
}
|
||||
|
||||
func (ctx *TestContext) ModuleVariantsForTests(name string) []string {
|
||||
var variants []string
|
||||
ctx.VisitAllModules(func(m blueprint.Module) {
|
||||
if ctx.ModuleName(m) == name {
|
||||
variants = append(variants, ctx.ModuleSubDir(m))
|
||||
}
|
||||
})
|
||||
return variants
|
||||
}
|
||||
|
||||
// MockFileSystem causes the Context to replace all reads with accesses to the provided map of
|
||||
// filenames to contents stored as a byte slice.
|
||||
func (ctx *TestContext) MockFileSystem(files map[string][]byte) {
|
||||
|
Reference in New Issue
Block a user