releasetools: Remove the name restriction in common.GetSparseImage.
The function used to be serving system and vendor partitions only (as
they were the only partitions using sparse image at the point). The code
itself doesn't rely on anything specific to system/vendor.
Test: python -m unittest test_common
Change-Id: Ia4ecdeedb262f3d9db082128eaf9bab299983333
diff --git a/tools/releasetools/test_common.py b/tools/releasetools/test_common.py
index d4fa5f3..dce27fe 100644
--- a/tools/releasetools/test_common.py
+++ b/tools/releasetools/test_common.py
@@ -641,11 +641,13 @@
},
sparse_image.file_map)
- def test_GetSparseImage_invalidImageName(self):
+ def test_GetSparseImage_missingImageFile(self):
self.assertRaises(
- AssertionError, common.GetSparseImage, 'system2', None, None, False)
+ AssertionError, common.GetSparseImage, 'system2', self.testdata_dir,
+ None, False)
self.assertRaises(
- AssertionError, common.GetSparseImage, 'unknown', None, None, False)
+ AssertionError, common.GetSparseImage, 'unknown', self.testdata_dir,
+ None, False)
def test_GetSparseImage_missingBlockMapFile(self):
target_files = common.MakeTempFile(prefix='target_files-', suffix='.zip')