Merge "Prevent apex from using preferred prebuilt_boot_image" am: fed8df3424 am: d1255ed19a am: 53a2dcc01c

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

Change-Id: I18db745fe57692c288ae83fed482852f6522803e
This commit is contained in:
Paul Duffin 2021-03-29 10:52:40 +00:00 committed by Automerger Merge Worker
commit 8692ee5aec
2 changed files with 16 additions and 1 deletions

View File

@ -567,7 +567,7 @@ var (
certificateTag = dependencyTag{name: "certificate"}
executableTag = dependencyTag{name: "executable", payload: true}
fsTag = dependencyTag{name: "filesystem", payload: true}
bootImageTag = dependencyTag{name: "bootImage", payload: true}
bootImageTag = dependencyTag{name: "bootImage", payload: true, sourceOnly: true}
compatConfigTag = dependencyTag{name: "compatConfig", payload: true, sourceOnly: true}
javaLibTag = dependencyTag{name: "javaLib", payload: true}
jniLibTag = dependencyTag{name: "jniLib", payload: true}

View File

@ -190,6 +190,16 @@ func TestBootImageInApex(t *testing.T) {
"myapex",
],
}
// Make sure that a preferred prebuilt doesn't affect the apex.
prebuilt_boot_image {
name: "mybootimage",
image_name: "boot",
prefer: true,
apex_available: [
"myapex",
],
}
`)
ensureExactContents(t, result.TestContext, "myapex", "android_common_myapex_image", []string{
@ -206,6 +216,11 @@ func TestBootImageInApex(t *testing.T) {
"javalib/arm64/boot-foo.oat",
"javalib/arm64/boot-foo.vdex",
})
java.CheckModuleDependencies(t, result.TestContext, "myapex", "android_common_myapex_image", []string{
`myapex.key`,
`mybootimage`,
})
}
// TODO(b/177892522) - add test for host apex.