Merge "Replace android.BuildOs with Config.BuildOS" am: 78fd15f7d6 am: bf2f93f8e8

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1773108

Change-Id: Ib6e5eea644f359c59e597943222d3f1f51b564d0
This commit is contained in:
Colin Cross
2021-07-23 00:39:59 +00:00
committed by Automerger Merge Worker
22 changed files with 457 additions and 421 deletions

View File

@@ -83,6 +83,9 @@ type robolectricTest struct {
testConfig android.Path
data android.Paths
forceOSType android.OsType
forceArchType android.ArchType
}
func (r *robolectricTest) TestSuites() []string {
@@ -115,6 +118,9 @@ func (r *robolectricTest) DepsMutator(ctx android.BottomUpMutatorContext) {
}
func (r *robolectricTest) GenerateAndroidBuildActions(ctx android.ModuleContext) {
r.forceOSType = ctx.Config().BuildOS
r.forceArchType = ctx.Config().BuildArch
r.testConfig = tradefed.AutoGenRobolectricTestConfig(ctx, r.testProperties.Test_config,
r.testProperties.Test_config_template, r.testProperties.Test_suites,
r.testProperties.Auto_gen_config)
@@ -345,7 +351,7 @@ func RobolectricTestFactory() android.Module {
func (r *robolectricTest) InstallBypassMake() bool { return true }
func (r *robolectricTest) InstallInTestcases() bool { return true }
func (r *robolectricTest) InstallForceOS() (*android.OsType, *android.ArchType) {
return &android.BuildOs, &android.BuildArch
return &r.forceOSType, &r.forceArchType
}
func robolectricRuntimesFactory() android.Module {
@@ -366,6 +372,9 @@ type robolectricRuntimes struct {
props robolectricRuntimesProperties
runtimes []android.InstallPath
forceOSType android.OsType
forceArchType android.ArchType
}
func (r *robolectricRuntimes) TestSuites() []string {
@@ -385,6 +394,9 @@ func (r *robolectricRuntimes) GenerateAndroidBuildActions(ctx android.ModuleCont
return
}
r.forceOSType = ctx.Config().BuildOS
r.forceArchType = ctx.Config().BuildArch
files := android.PathsForModuleSrc(ctx, r.props.Jars)
androidAllDir := android.PathForModuleInstall(ctx, "android-all")
@@ -415,5 +427,5 @@ func (r *robolectricRuntimes) GenerateAndroidBuildActions(ctx android.ModuleCont
func (r *robolectricRuntimes) InstallBypassMake() bool { return true }
func (r *robolectricRuntimes) InstallInTestcases() bool { return true }
func (r *robolectricRuntimes) InstallForceOS() (*android.OsType, *android.ArchType) {
return &android.BuildOs, &android.BuildArch
return &r.forceOSType, &r.forceArchType
}