Don't compress apexes produced by apex_test module

AFAIU, apex_test is used by modules to create a test version of their
apex for e2e testing of the update flow. Since it's a regular pattern
for test_apex to use the same apex_defaults as the "production" apex,
and due to the fact that we are only going to compress pre-installed
version of the apex, it makes sense to explicitly not compress
test apexes.

Bug: 185082717
Test: build test_com.android.media verified it's not compressed
Test: atest sdkextensions_e2e_tests
Change-Id: I1179235efe068fefc582369a4218ba967e7efbf3
This commit is contained in:
Nikita Ioffe
2021-04-14 17:34:54 +01:00
parent 9e7bfdae31
commit 05b999ecb2

View File

@@ -785,7 +785,7 @@ func (a *apexBundle) buildUnflattenedApex(ctx android.ModuleContext) {
ctx.PropertyErrorf("test_only_force_compression", "not available")
return
}
compressionEnabled := ctx.Config().CompressedApex() && proptools.BoolDefault(a.properties.Compressible, false)
compressionEnabled := ctx.Config().CompressedApex() && proptools.BoolDefault(a.properties.Compressible, false) && !a.testApex
if apexType == imageApex && (compressionEnabled || a.testOnlyShouldForceCompression()) {
a.isCompressed = true
unsignedCompressedOutputFile := android.PathForModuleOut(ctx, a.Name()+".capex.unsigned")