Пример #1
0
 def test_ab_partition_too_big(self):
     self.info_dict.update(
         common.LoadDictionaryFromLines("""
     system_image_size=100
     """.split("\n")))
     with self.assertRaises(RuntimeError):
         CheckPartitionSizes(self.info_dict)
Пример #2
0
 def test_non_dap(self):
     self.info_dict.update(
         common.LoadDictionaryFromLines("""
     use_dynamic_partitions=false
     """.split("\n")))
     with self.assertRaises(RuntimeError):
         CheckPartitionSizes(self.info_dict)
Пример #3
0
 def test_retrofit_vab(self):
     self.info_dict.update(
         common.LoadDictionaryFromLines("""
     virtual_ab=true
     virtual_ab_retrofit=true
     """.split("\n")))
     CheckPartitionSizes(self.info_dict)
 def test_ab_group_too_big(self):
     self.info_dict.update(
         common.LoadDictionaryFromLines("""
     super_group_group_size=110
     """.split("\n")))
     with self.assertRaises(RuntimeError):
         CheckPartitionSizes(self.info_dict)
 def test_non_ab(self):
     self.info_dict.update(
         common.LoadDictionaryFromLines("""
     ab_update=false
     super_partition_size=100
     super_super_device_size=100
     """.split("\n")))
     CheckPartitionSizes(self.info_dict)
 def test_vab(self):
     self.info_dict.update(
         common.LoadDictionaryFromLines("""
     virtual_ab=true
     super_partition_size=100
     super_super_device_size=100
     """.split("\n")))
     CheckPartitionSizes(self.info_dict)
 def test_retrofit_vab_too_big(self):
   self.info_dict.update(common.LoadDictionaryFromLines("""
       virtual_ab=true
       virtual_ab_retrofit=true
       system_image_size=100
       """.split("\n")))
   with self.assertRaises(RuntimeError):
     CheckPartitionSizes(self.info_dict)
 def test_retrofit_dap(self):
   self.info_dict.update(common.LoadDictionaryFromLines("""
       dynamic_partition_retrofit=true
       super_block_devices=system vendor
       super_system_device_size=75
       super_vendor_device_size=25
       super_partition_size=100
       """.split("\n")))
   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)
Пример #10
0
 def test_block_devices_not_match(self):
   self.info_dict.update(common.LoadDictionaryFromLines("""
       dynamic_partition_retrofit=true
       super_block_devices=system vendor
       super_system_device_size=80
       super_vendor_device_size=25
       super_partition_size=100
       """.split("\n")))
   with self.assertRaises(RuntimeError):
     CheckPartitionSizes(self.info_dict)
Пример #11
0
 def test_no_image(self):
     del self.info_dict["system_image_size"]
     with self.assertRaises(KeyError):
         CheckPartitionSizes(self.info_dict)
Пример #12
0
 def test_ab(self):
     CheckPartitionSizes(self.info_dict)