Revert "Add SkipToTransitiveDepsTag interface for dependency tags"

This reverts commit 1fb7c35129.

Change-Id: Ib4c5815a06785cd876caa37acc0522adc26bc495
This commit is contained in:
Jiyong Park
2024-05-15 02:09:42 +09:00
parent cd9dca20a0
commit 1d4907e027
3 changed files with 5 additions and 73 deletions

View File

@@ -25,9 +25,8 @@ import (
type componentTestModule struct {
ModuleBase
props struct {
Deps []string
Build_only_deps []string
Skip_install *bool
Deps []string
Skip_install *bool
}
}
@@ -37,18 +36,6 @@ type installDepTag struct {
InstallAlwaysNeededDependencyTag
}
// dep tag for build_only_deps
type buildOnlyDepTag struct {
blueprint.BaseDependencyTag
InstallAlwaysNeededDependencyTag
}
var _ SkipToTransitiveDepsTag = (*buildOnlyDepTag)(nil)
func (tag buildOnlyDepTag) SkipToTransitiveDeps() bool {
return true
}
func componentTestModuleFactory() Module {
m := &componentTestModule{}
m.AddProperties(&m.props)
@@ -58,7 +45,6 @@ func componentTestModuleFactory() Module {
func (m *componentTestModule) DepsMutator(ctx BottomUpMutatorContext) {
ctx.AddDependency(ctx.Module(), installDepTag{}, m.props.Deps...)
ctx.AddDependency(ctx.Module(), buildOnlyDepTag{}, m.props.Build_only_deps...)
}
func (m *componentTestModule) GenerateAndroidBuildActions(ctx ModuleContext) {
@@ -412,30 +398,3 @@ func TestPackagingWithSkipInstallDeps(t *testing.T) {
}
`, []string{"lib64/foo", "lib64/bar", "lib64/baz"})
}
func TestPackagingWithSkipToTransitvDeps(t *testing.T) {
// packag -[deps]-> foo -[build_only_deps]-> bar -[deps]-> baz
// bar isn't installed, but it brings baz to its parent.
multiTarget := false
runPackagingTest(t, multiTarget,
`
component {
name: "foo",
build_only_deps: ["bar"],
}
component {
name: "bar",
deps: ["baz"],
}
component {
name: "baz",
}
package_module {
name: "package",
deps: ["foo"],
}
`, []string{"lib64/foo", "lib64/baz"})
}