Revert "Export non-apex variants of modules to make"

Revert submission 2462194-androidmk_for_apex_dependencies

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=full-eng&lkgb=9723453&lkbb=9724944&fkbb=9723508, bug b/272663333.

Reverted changes: /q/submissionid:2462194-androidmk_for_apex_dependencies

Bug: 272663333
Change-Id: I847fa910a8d54de19954f56fe92a80a9bcd0ee18
This commit is contained in:
Iván Budnik
2023-03-10 16:11:26 +00:00
committed by Gerrit Code Review
parent ad222f271a
commit 295da16b95
9 changed files with 42 additions and 49 deletions

View File

@@ -15,7 +15,6 @@
package android
import (
"strings"
"testing"
"github.com/google/blueprint"
@@ -29,8 +28,6 @@ type componentTestModule struct {
Deps []string
Skip_install *bool
}
builtFile Path
}
// dep tag used in this test. All dependencies are considered as installable.
@@ -51,21 +48,13 @@ func (m *componentTestModule) DepsMutator(ctx BottomUpMutatorContext) {
}
func (m *componentTestModule) GenerateAndroidBuildActions(ctx ModuleContext) {
m.builtFile = PathForModuleOut(ctx, m.Name())
builtFile := PathForModuleOut(ctx, m.Name())
dir := ctx.Target().Arch.ArchType.Multilib
installDir := PathForModuleInstall(ctx, dir)
if proptools.Bool(m.props.Skip_install) {
m.SkipInstall()
}
ctx.InstallFile(installDir, m.Name(), m.builtFile)
}
func (m *componentTestModule) AndroidMkEntries() []AndroidMkEntries {
return []AndroidMkEntries{
{
OutputFile: OptionalPathForPath(m.builtFile),
},
}
ctx.InstallFile(installDir, m.Name(), builtFile)
}
// Module that itself is a package
@@ -262,35 +251,6 @@ func TestPackagingBaseMultiTarget(t *testing.T) {
`, []string{"lib32/foo", "lib64/foo", "lib64/bar"})
}
func TestSkipInstallProducesLocalUninstallableModule(t *testing.T) {
result := GroupFixturePreparers(
PrepareForTestWithArchMutator,
FixtureRegisterWithContext(func(ctx RegistrationContext) {
ctx.RegisterModuleType("component", componentTestModuleFactory)
ctx.RegisterModuleType("package_module", packageTestModuleFactory)
}),
FixtureWithRootAndroidBp(`
component {
name: "foo",
skip_install: true,
}
package_module {
name: "package",
deps: ["foo"],
}
`),
).RunTest(t)
module := result.ModuleForTests("foo", "android_arm64_armv8-a").Module().(*componentTestModule)
entries := AndroidMkEntriesForTest(t, result.TestContext, module)
builder := &strings.Builder{}
entries[0].write(builder)
androidMkString := builder.String()
if !strings.Contains(androidMkString, "LOCAL_UNINSTALLABLE_MODULE := true") {
t.Errorf("Expected android mk entries to contain \"LOCAL_UNINSTALLABLE_MODULE := true\", got: \n%s", androidMkString)
}
}
func TestPackagingBaseSingleTarget(t *testing.T) {
multiTarget := false
runPackagingTest(t, multiTarget,