Loading tools/releasetools/common.py +1 −3 Original line number Diff line number Diff line Loading @@ -834,7 +834,7 @@ def GetSparseImage(which, tmpdir, input_zip, allow_shared_blocks, reconstructed from the block list, for whom we should avoid applying imgdiff. Args: which: The partition name, which must be "system" or "vendor". which: The partition name, e.g. "system", "vendor". tmpdir: The directory that contains the prebuilt image and block map file. input_zip: The target-files ZIP archive. allow_shared_blocks: Whether having shared blocks is allowed. Loading @@ -843,8 +843,6 @@ def GetSparseImage(which, tmpdir, input_zip, allow_shared_blocks, Returns: A SparseImage object, with file_map info loaded. """ assert which in ("system", "vendor") path = os.path.join(tmpdir, "IMAGES", which + ".img") mappath = os.path.join(tmpdir, "IMAGES", which + ".map") Loading tools/releasetools/test_common.py +5 −3 Original line number Diff line number Diff line Loading @@ -641,11 +641,13 @@ class CommonUtilsTest(test_utils.ReleaseToolsTestCase): }, 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') Loading Loading
tools/releasetools/common.py +1 −3 Original line number Diff line number Diff line Loading @@ -834,7 +834,7 @@ def GetSparseImage(which, tmpdir, input_zip, allow_shared_blocks, reconstructed from the block list, for whom we should avoid applying imgdiff. Args: which: The partition name, which must be "system" or "vendor". which: The partition name, e.g. "system", "vendor". tmpdir: The directory that contains the prebuilt image and block map file. input_zip: The target-files ZIP archive. allow_shared_blocks: Whether having shared blocks is allowed. Loading @@ -843,8 +843,6 @@ def GetSparseImage(which, tmpdir, input_zip, allow_shared_blocks, Returns: A SparseImage object, with file_map info loaded. """ assert which in ("system", "vendor") path = os.path.join(tmpdir, "IMAGES", which + ".img") mappath = os.path.join(tmpdir, "IMAGES", which + ".map") Loading
tools/releasetools/test_common.py +5 −3 Original line number Diff line number Diff line Loading @@ -641,11 +641,13 @@ class CommonUtilsTest(test_utils.ReleaseToolsTestCase): }, 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') Loading