Пример #1
0
 def test_GetCareMap_nonSparseImage(self):
   OPTIONS.info_dict = {
       'system_image_size' : 53248,
   }
   # 'foo' is the image filename, which is expected to be not used by
   # GetCareMap().
   name, care_map = GetCareMap('system', 'foo')
   self.assertEqual('system', name)
   self.assertEqual(RangeSet("0-12").to_string_raw(), care_map)
Пример #2
0
 def test_GetCareMap(self):
     sparse_image = test_utils.construct_sparse_image([(0xCAC1, 6),
                                                       (0xCAC3, 4),
                                                       (0xCAC1, 6)])
     OPTIONS.info_dict = {
         'system_adjusted_partition_size': 12,
     }
     name, care_map = GetCareMap('system', sparse_image)
     self.assertEqual('system', name)
     self.assertEqual(RangeSet("0-5 10-12").to_string_raw(), care_map)
 def test_GetCareMap(self):
     sparse_image = test_utils.construct_sparse_image([(0xCAC1, 6),
                                                       (0xCAC3, 4),
                                                       (0xCAC1, 6)])
     OPTIONS.info_dict = {
         'extfs_sparse_flag': '-s',
         'system_image_size': 53248,
     }
     name, care_map = GetCareMap('system', sparse_image)
     self.assertEqual('system', name)
     self.assertEqual(RangeSet("0-5 10-12").to_string_raw(), care_map)