Returns empty apex_infos if the apex target dir does not exist.
This is needed for partial builds that do not have the apex directory in their target files package. Test: build target files for a partial vendor-only build. Change-Id: I076bfbd1a81cccddcef795f5edeaf2b51538cdec
This commit is contained in:
@@ -33,7 +33,7 @@ from ota_from_target_files import (
|
||||
GetTargetFilesZipWithoutPostinstallConfig,
|
||||
Payload, PayloadSigner, POSTINSTALL_CONFIG,
|
||||
StreamingPropertyFiles, AB_PARTITIONS)
|
||||
from apex_utils import GetApexInfoFromTargetFiles
|
||||
from apex_utils import GetSystemApexInfoFromTargetFiles
|
||||
from test_utils import PropertyFilesTestCase
|
||||
|
||||
|
||||
@@ -281,9 +281,9 @@ class OtaFromTargetFilesTest(test_utils.ReleaseToolsTestCase):
|
||||
metadata)
|
||||
|
||||
@test_utils.SkipIfExternalToolsUnavailable()
|
||||
def test_GetApexInfoFromTargetFiles(self):
|
||||
def test_GetSystemApexInfoFromTargetFiles(self):
|
||||
target_files = construct_target_files(compressedApex=True)
|
||||
apex_infos = GetApexInfoFromTargetFiles(target_files)
|
||||
apex_infos = GetSystemApexInfoFromTargetFiles(target_files)
|
||||
self.assertEqual(len(apex_infos), 1)
|
||||
self.assertEqual(apex_infos[0].package_name, "com.android.apex.compressed")
|
||||
self.assertEqual(apex_infos[0].version, 1)
|
||||
|
Reference in New Issue
Block a user