Merge "Update apex dependency even for test and non-installable APEXes" am: 4e29184a4e
am: ee239878f4
am: 088d5cf1cb
Change-Id: I68fe4bcf81ccc2cd9b16857c59cc1d484a006547
This commit is contained in:
@@ -1047,12 +1047,7 @@ func apexDepsMutator(mctx android.BottomUpMutatorContext) {
|
|||||||
depName := mctx.OtherModuleName(child)
|
depName := mctx.OtherModuleName(child)
|
||||||
// If the parent is apexBundle, this child is directly depended.
|
// If the parent is apexBundle, this child is directly depended.
|
||||||
_, directDep := parent.(*apexBundle)
|
_, directDep := parent.(*apexBundle)
|
||||||
if a.installable() && !a.testApex {
|
android.UpdateApexDependency(apexBundleName, depName, directDep)
|
||||||
// TODO(b/123892969): Workaround for not having any way to annotate test-apexs
|
|
||||||
// non-installable apex's cannot be installed and so should not prevent libraries from being
|
|
||||||
// installed to the system.
|
|
||||||
android.UpdateApexDependency(apexBundleName, depName, directDep)
|
|
||||||
}
|
|
||||||
|
|
||||||
if am, ok := child.(android.ApexModule); ok && am.CanHaveApexVariants() &&
|
if am, ok := child.(android.ApexModule); ok && am.CanHaveApexVariants() &&
|
||||||
(directDep || am.DepIsInSameApex(mctx, child)) {
|
(directDep || am.DepIsInSameApex(mctx, child)) {
|
||||||
|
@@ -2367,11 +2367,6 @@ func TestTestApex(t *testing.T) {
|
|||||||
|
|
||||||
// Ensure that the platform variant ends with _shared
|
// Ensure that the platform variant ends with _shared
|
||||||
ensureListContains(t, ctx.ModuleVariantsForTests("mylib_common_test"), "android_arm64_armv8-a_shared")
|
ensureListContains(t, ctx.ModuleVariantsForTests("mylib_common_test"), "android_arm64_armv8-a_shared")
|
||||||
|
|
||||||
if android.InAnyApex("mylib_common_test") {
|
|
||||||
t.Log("Found mylib_common_test in some apex!")
|
|
||||||
t.Fail()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestApexWithTarget(t *testing.T) {
|
func TestApexWithTarget(t *testing.T) {
|
||||||
|
Reference in New Issue
Block a user