Check super size for factory OTA at build time
For VAB launched device, factory OTA will write system_other
partition to the super image. So we want to check that
sum(dynamic partitions) + system_other + overhead <= super at
build time.
Since we don't know the overhead at build time, we might instead
check sum(all partitions) < super.
Bug: 185809374
Test: m check-all-partition-sizes, unittests
Change-Id: Ia7ba5999d23924a1927e9a9463856a4d0ea90c20
Merged-In: Ia7ba5999d23924a1927e9a9463856a4d0ea90c20
(cherry-picked from commit 294ec7d9e5
)
Change-Id: I479d1b399a1639b595ae5d7f1481c771a3439e51
This commit is contained in:
@@ -33,6 +33,7 @@ class CheckPartitionSizesTest(test_utils.ReleaseToolsTestCase):
|
||||
system_image_size=50
|
||||
vendor_image_size=20
|
||||
product_image_size=20
|
||||
system_other_image_size=10
|
||||
""".split("\n"))
|
||||
|
||||
def test_ab(self):
|
||||
@@ -126,3 +127,13 @@ class CheckPartitionSizesTest(test_utils.ReleaseToolsTestCase):
|
||||
""".split("\n")))
|
||||
with self.assertRaises(RuntimeError):
|
||||
CheckPartitionSizes(self.info_dict)
|
||||
|
||||
def test_vab_too_big_with_system_other(self):
|
||||
self.info_dict.update(common.LoadDictionaryFromLines("""
|
||||
virtual_ab=true
|
||||
system_other_image_size=20
|
||||
super_partition_size=101
|
||||
super_super_device_size=101
|
||||
""".split("\n")))
|
||||
with self.assertRaises(RuntimeError):
|
||||
CheckPartitionSizes(self.info_dict)
|
||||
|
Reference in New Issue
Block a user