Merge commit '0703fd873fe2ed492266a4457a1e217971c2f4f0' into manual_merge_1e3d9fb376aaf1be6de1bd16a9004ccc95226ab0

Change-Id: I7115a50254e23e3f7d9cdab960c671195746978e
This commit is contained in:
Jooyung Han
2020-09-02 14:14:18 +09:00
5 changed files with 64 additions and 18 deletions

View File

@@ -248,7 +248,7 @@ func testApexContext(_ *testing.T, bp string, handlers ...testCustomizer) (*andr
ctx.RegisterModuleType("cc_test", cc.TestFactory)
ctx.RegisterModuleType("vndk_prebuilt_shared", cc.VndkPrebuiltSharedFactory)
ctx.RegisterModuleType("vndk_libraries_txt", cc.VndkLibrariesTxtFactory)
ctx.RegisterModuleType("prebuilt_etc", prebuilt_etc.PrebuiltEtcFactory)
prebuilt_etc.RegisterPrebuiltEtcBuildComponents(ctx)
ctx.RegisterModuleType("platform_compat_config", java.PlatformCompatConfigFactory)
ctx.RegisterModuleType("sh_binary", sh.ShBinaryFactory)
ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
@@ -2272,6 +2272,32 @@ func TestVendorApex_use_vndk_as_stable(t *testing.T) {
ensureListContains(t, requireNativeLibs, ":vndk")
}
func TestVendorApex_withPrebuiltFirmware(t *testing.T) {
ctx, _ := testApex(t, `
apex {
name: "myapex",
key: "myapex.key",
prebuilts: ["myfirmware"],
vendor: true,
}
apex_key {
name: "myapex.key",
public_key: "testkey.avbpubkey",
private_key: "testkey.pem",
}
prebuilt_firmware {
name: "myfirmware",
src: "myfirmware.bin",
filename_from_src: true,
vendor: true,
}
`)
ensureExactContents(t, ctx, "myapex", "android_common_myapex_image", []string{
"firmware/myfirmware.bin",
})
}
func TestAndroidMk_UseVendorRequired(t *testing.T) {
ctx, config := testApex(t, `
apex {