summaryrefslogtreecommitdiff
path: root/apex/apex_test.go
diff options
context:
space:
mode:
author Jooyung Han <jooyung@google.com> 2024-11-27 01:39:39 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-11-27 01:39:39 +0000
commit5c5dc9dce3df18029df755cc303eb82267645a34 (patch)
treea30d02832904f753768bb1db74a5e97676870321 /apex/apex_test.go
parent9138df77ce4432a6598e1287752bb76bc2241f8b (diff)
parenta8fb73be3258237caaa226df2aef6f4fea20d004 (diff)
Merge "apex: Do not compress EROFS APEX" into main
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index 6e9295911..ce5edad6a 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -9094,6 +9094,33 @@ func TestCompressedApex(t *testing.T) {
ensureContains(t, androidMk, "LOCAL_MODULE_STEM := myapex.capex\n")
}
+func TestCompressedApexIsDisabledWhenUsingErofs(t *testing.T) {
+ t.Parallel()
+ ctx := testApex(t, `
+ apex {
+ name: "myapex",
+ key: "myapex.key",
+ compressible: true,
+ updatable: false,
+ payload_fs_type: "erofs",
+ }
+ apex_key {
+ name: "myapex.key",
+ public_key: "testkey.avbpubkey",
+ private_key: "testkey.pem",
+ }
+ `,
+ android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
+ variables.CompressedApex = proptools.BoolPtr(true)
+ }),
+ )
+
+ compressRule := ctx.ModuleForTests("myapex", "android_common_myapex").MaybeRule("compressRule")
+ if compressRule.Rule != nil {
+ t.Error("erofs apex should not be compressed")
+ }
+}
+
func TestApexSet_ShouldRespectCompressedApexFlag(t *testing.T) {
t.Parallel()
for _, compressionEnabled := range []bool{true, false} {