bundle config for apexes are auto-generated
bundle config file for apexes are auto-generated. It is included in the
<apex>-base.zip file, which is expected to be extracted and then fed
into the bundletool.
This change is in preparation for the upcoming change to include
information about embedded apks in the bundle confir file.
Exempt-From-Owner-Approval: cherry-pick from master
Bug: 148002117
Test: m
Merged-In: If25d75e0f62036dc777faf8593ed8eb9a74950b0
(cherry picked from commit bd15961043fe4f727e43a63a11671db317595345)
Change-Id: If25d75e0f62036dc777faf8593ed8eb9a74950b0
diff --git a/apex/apex_test.go b/apex/apex_test.go
index b56909c..f283e4b 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -3609,6 +3609,35 @@
ensureRealfileExists(t, files, "lib64/myotherlib.so") // this is a real file
}
+func TestAppBundle(t *testing.T) {
+ ctx, _ := testApex(t, `
+ apex {
+ name: "myapex",
+ key: "myapex.key",
+ apps: ["AppFoo"],
+ }
+
+ apex_key {
+ name: "myapex.key",
+ public_key: "testkey.avbpubkey",
+ private_key: "testkey.pem",
+ }
+
+ android_app {
+ name: "AppFoo",
+ srcs: ["foo/bar/MyClass.java"],
+ sdk_version: "none",
+ system_modules: "none",
+ apex_available: [ "myapex" ],
+ }
+ `)
+
+ bundleConfigRule := ctx.ModuleForTests("myapex", "android_common_myapex_image").Description("Bundle Config")
+ content := bundleConfigRule.Args["content"]
+
+ ensureContains(t, content, `"compression":{"uncompressed_glob":["apex_payload.img","apex_manifest.*"]}`)
+}
+
func TestMain(m *testing.M) {
run := func() int {
setUp()