apex_manifest in protobuf binary format

For Q compatibility, .json files are also bundled.

Three different apex_manifest files are built from input.
- apex_manifest.json: Q-readable .json file
- apex_manifest_full.json: input + dependency
- apex_manifest.pb: apex: converted from apex_manifest_full.json

apexer will handle these files.

Bug: 143654022
Test: m
Change-Id: I9697094057f0c0543282b1b46b7535cf21431176
This commit is contained in:
Jooyung Han
2019-11-02 02:52:25 +09:00
parent 0fb92346ac
commit 01a3ee287a
2 changed files with 94 additions and 31 deletions

View File

@@ -517,6 +517,26 @@ func TestBasicApex(t *testing.T) {
ensureListContains(t, noticeInputs, "custom_notice")
}
func TestApexManifest(t *testing.T) {
ctx, _ := testApex(t, `
apex {
name: "myapex",
key: "myapex.key",
}
apex_key {
name: "myapex.key",
public_key: "testkey.avbpubkey",
private_key: "testkey.pem",
}
`)
module := ctx.ModuleForTests("myapex", "android_common_myapex_image")
module.Output("apex_manifest.pb")
module.Output("apex_manifest.json")
module.Output("apex_manifest_full.json")
}
func TestBasicZipApex(t *testing.T) {
ctx, _ := testApex(t, `
apex {