Add InstallForceOS, fix testcases for host
Robolectric tests compile against device modules but are installed and run as host modules. Allow a module to override its install OS. Test: TestPathForModuleInstall Change-Id: Icf37bb3d4cc1222a9b079602c6a5fdb8b51c86ed
This commit is contained in:
@@ -172,6 +172,7 @@ type ModuleContext interface {
|
||||
InstallInRecovery() bool
|
||||
InstallInRoot() bool
|
||||
InstallBypassMake() bool
|
||||
InstallForceOS() *OsType
|
||||
|
||||
RequiredModuleNames() []string
|
||||
HostRequiredModuleNames() []string
|
||||
@@ -213,6 +214,7 @@ type Module interface {
|
||||
InstallInRecovery() bool
|
||||
InstallInRoot() bool
|
||||
InstallBypassMake() bool
|
||||
InstallForceOS() *OsType
|
||||
SkipInstall()
|
||||
ExportedToMake() bool
|
||||
NoticeFile() OptionalPath
|
||||
@@ -893,6 +895,10 @@ func (m *ModuleBase) InstallBypassMake() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *ModuleBase) InstallForceOS() *OsType {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ModuleBase) Owner() string {
|
||||
return String(m.commonProperties.Owner)
|
||||
}
|
||||
@@ -1683,6 +1689,10 @@ func (m *moduleContext) InstallBypassMake() bool {
|
||||
return m.module.InstallBypassMake()
|
||||
}
|
||||
|
||||
func (m *moduleContext) InstallForceOS() *OsType {
|
||||
return m.module.InstallForceOS()
|
||||
}
|
||||
|
||||
func (m *moduleContext) skipInstall(fullInstallPath InstallPath) bool {
|
||||
if m.module.base().commonProperties.SkipInstall {
|
||||
return true
|
||||
|
Reference in New Issue
Block a user