diff options
author | 2025-01-23 12:56:20 -0800 | |
---|---|---|
committer | 2025-01-23 12:56:20 -0800 | |
commit | 866ab39da69b9dd6defb39a064764fa3e0a6db23 (patch) | |
tree | 68aabc63b2d07236fa6dc4c92831378766205405 /android/module.go | |
parent | 4d78e0108b85354098811ec86307cc8d2550555f (diff) |
Convert android_app and android_test's module-info.json to soong
This produces the following diffs, which I beleive are benign:
https://paste.googleplex.com/5631028455276544
We need to convert these to soong so that you can run these tests
with atest in soong-only builds.
Bug: 389720048
Test: diff'd out/target/product/vsoc_x86_64/module-info.json
Change-Id: Ic25e14d2cfbb56d9527302baefa6f69f55f113ee
Diffstat (limited to 'android/module.go')
-rw-r--r-- | android/module.go | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/android/module.go b/android/module.go index c81380eea..da7541637 100644 --- a/android/module.go +++ b/android/module.go @@ -2145,6 +2145,22 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext) } } + // M(C)TS supports a full test suite and partial per-module MTS test suites, with naming mts-${MODULE}. + // To reduce repetition, if we find a partial M(C)TS test suite without an full M(C)TS test suite, + // we add the full test suite to our list. This was inherited from + // AndroidMkEntries.AddCompatibilityTestSuites. + suites := ctx.moduleInfoJSON.CompatibilitySuites + if PrefixInList(suites, "mts-") && !InList("mts", suites) { + suites = append(suites, "mts") + } + if PrefixInList(suites, "mcts-") && !InList("mcts", suites) { + suites = append(suites, "mcts") + } + ctx.moduleInfoJSON.CompatibilitySuites = suites + + required := append(m.RequiredModuleNames(ctx), m.VintfFragmentModuleNames(ctx)...) + required = append(required, ctx.moduleInfoJSON.ExtraRequired...) + ctx.moduleInfoJSON.core = CoreModuleInfoJSON{ RegisterName: m.moduleInfoRegisterName(ctx, ctx.moduleInfoJSON.SubName), Path: []string{ctx.ModuleDir()}, @@ -2154,7 +2170,7 @@ func (m *ModuleBase) GenerateBuildActions(blueprintCtx blueprint.ModuleContext) TargetDependencies: targetRequired, HostDependencies: hostRequired, Data: data, - Required: append(m.RequiredModuleNames(ctx), m.VintfFragmentModuleNames(ctx)...), + Required: required, } SetProvider(ctx, ModuleInfoJSONProvider, ctx.moduleInfoJSON) } @@ -2266,7 +2282,7 @@ func (m *ModuleBase) moduleInfoRegisterName(ctx ModuleContext, subName string) s arches = slices.DeleteFunc(arches, func(target Target) bool { return target.NativeBridge != ctx.Target().NativeBridge }) - if len(arches) > 0 && ctx.Arch().ArchType != arches[0].Arch.ArchType { + if len(arches) > 0 && ctx.Arch().ArchType != arches[0].Arch.ArchType && ctx.Arch().ArchType != Common { if ctx.Arch().ArchType.Multilib == "lib32" { suffix = "_32" } else { |