Loading tools/releasetools/edify_generator.py +1 −1 Original line number Diff line number Diff line Loading @@ -301,7 +301,7 @@ class EdifyGenerator(object): len(patchpairs) == 2), \ "Failed to handle unknown format. Use PatchPartition() instead." # Also sanity check the args. # Also validity check the args. assert tokens[3] == patchpairs[0], \ "Found mismatching values for source SHA-1: {} vs {}".format( tokens[3], patchpairs[0]) Loading tools/releasetools/test_add_img_to_target_files.py +1 −1 Original line number Diff line number Diff line Loading @@ -370,7 +370,7 @@ class AddImagesToTargetFilesTest(test_utils.ReleaseToolsTestCase): with zipfile.ZipFile(output_file, 'w') as output_zip: # Create an existing META/care_map.pb entry. common.ZipWriteStr(output_zip, 'META/care_map.pb', 'dummy care_map.pb') 'fake care_map.pb') # Request to add META/care_map.pb again. AddCareMapForAbOta(output_zip, ['system', 'vendor'], image_paths) Loading tools/releasetools/test_common.py +3 −3 Original line number Diff line number Diff line Loading @@ -1619,12 +1619,12 @@ class InstallRecoveryScriptFormatTest(test_utils.ReleaseToolsTestCase): def setUp(self): self._tempdir = common.MakeTempDir() # Create a dummy dict that contains the fstab info for boot&recovery. # Create a fake dict that contains the fstab info for boot&recovery. self._info = {"fstab" : {}} dummy_fstab = [ fake_fstab = [ "/dev/soc.0/by-name/boot /boot emmc defaults defaults", "/dev/soc.0/by-name/recovery /recovery emmc defaults defaults"] self._info["fstab"] = common.LoadRecoveryFSTab("\n".join, 2, dummy_fstab) self._info["fstab"] = common.LoadRecoveryFSTab("\n".join, 2, fake_fstab) # Construct the gzipped recovery.img and boot.img self.recovery_data = bytearray([ 0x1f, 0x8b, 0x08, 0x00, 0x81, 0x11, 0x02, 0x5a, 0x00, 0x03, 0x2b, 0x4a, Loading tools/releasetools/test_ota_from_target_files.py +4 −4 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ def construct_target_files(secondary=False): 'META/ab_partitions.txt', '\n'.join([partition[1] for partition in ab_partitions])) # Create dummy images for each of them. # Create fake images for each of them. for path, partition in ab_partitions: target_files_zip.writestr( '{}/{}.img'.format(path, partition), Loading Loading @@ -754,7 +754,7 @@ class PropertyFilesTest(test_utils.ReleaseToolsTestCase): class StreamingPropertyFilesTest(PropertyFilesTest): """Additional sanity checks specialized for StreamingPropertyFiles.""" """Additional validity checks specialized for StreamingPropertyFiles.""" def test_init(self): property_files = StreamingPropertyFiles() Loading Loading @@ -835,7 +835,7 @@ class StreamingPropertyFilesTest(PropertyFilesTest): class AbOtaPropertyFilesTest(PropertyFilesTest): """Additional sanity checks specialized for AbOtaPropertyFiles.""" """Additional validity checks specialized for AbOtaPropertyFiles.""" # The size for payload and metadata signature size. SIGNATURE_SIZE = 256 Loading Loading @@ -1003,7 +1003,7 @@ class AbOtaPropertyFilesTest(PropertyFilesTest): class NonAbOtaPropertyFilesTest(PropertyFilesTest): """Additional sanity checks specialized for NonAbOtaPropertyFiles.""" """Additional validity checks specialized for NonAbOtaPropertyFiles.""" def test_init(self): property_files = NonAbOtaPropertyFiles() Loading tools/releasetools/test_verity_utils.py +1 −1 Original line number Diff line number Diff line Loading @@ -234,7 +234,7 @@ class VerifiedBootVersion1VerityImageBuilderTest(ReleaseToolsTestCase): @SkipIfExternalToolsUnavailable() def test_Build_SanityCheck(self): # A sanity check for the test itself: the image shouldn't be verifiable # A validity check for the test itself: the image shouldn't be verifiable # with wrong key. self.assertRaises( common.ExternalError, Loading Loading
tools/releasetools/edify_generator.py +1 −1 Original line number Diff line number Diff line Loading @@ -301,7 +301,7 @@ class EdifyGenerator(object): len(patchpairs) == 2), \ "Failed to handle unknown format. Use PatchPartition() instead." # Also sanity check the args. # Also validity check the args. assert tokens[3] == patchpairs[0], \ "Found mismatching values for source SHA-1: {} vs {}".format( tokens[3], patchpairs[0]) Loading
tools/releasetools/test_add_img_to_target_files.py +1 −1 Original line number Diff line number Diff line Loading @@ -370,7 +370,7 @@ class AddImagesToTargetFilesTest(test_utils.ReleaseToolsTestCase): with zipfile.ZipFile(output_file, 'w') as output_zip: # Create an existing META/care_map.pb entry. common.ZipWriteStr(output_zip, 'META/care_map.pb', 'dummy care_map.pb') 'fake care_map.pb') # Request to add META/care_map.pb again. AddCareMapForAbOta(output_zip, ['system', 'vendor'], image_paths) Loading
tools/releasetools/test_common.py +3 −3 Original line number Diff line number Diff line Loading @@ -1619,12 +1619,12 @@ class InstallRecoveryScriptFormatTest(test_utils.ReleaseToolsTestCase): def setUp(self): self._tempdir = common.MakeTempDir() # Create a dummy dict that contains the fstab info for boot&recovery. # Create a fake dict that contains the fstab info for boot&recovery. self._info = {"fstab" : {}} dummy_fstab = [ fake_fstab = [ "/dev/soc.0/by-name/boot /boot emmc defaults defaults", "/dev/soc.0/by-name/recovery /recovery emmc defaults defaults"] self._info["fstab"] = common.LoadRecoveryFSTab("\n".join, 2, dummy_fstab) self._info["fstab"] = common.LoadRecoveryFSTab("\n".join, 2, fake_fstab) # Construct the gzipped recovery.img and boot.img self.recovery_data = bytearray([ 0x1f, 0x8b, 0x08, 0x00, 0x81, 0x11, 0x02, 0x5a, 0x00, 0x03, 0x2b, 0x4a, Loading
tools/releasetools/test_ota_from_target_files.py +4 −4 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ def construct_target_files(secondary=False): 'META/ab_partitions.txt', '\n'.join([partition[1] for partition in ab_partitions])) # Create dummy images for each of them. # Create fake images for each of them. for path, partition in ab_partitions: target_files_zip.writestr( '{}/{}.img'.format(path, partition), Loading Loading @@ -754,7 +754,7 @@ class PropertyFilesTest(test_utils.ReleaseToolsTestCase): class StreamingPropertyFilesTest(PropertyFilesTest): """Additional sanity checks specialized for StreamingPropertyFiles.""" """Additional validity checks specialized for StreamingPropertyFiles.""" def test_init(self): property_files = StreamingPropertyFiles() Loading Loading @@ -835,7 +835,7 @@ class StreamingPropertyFilesTest(PropertyFilesTest): class AbOtaPropertyFilesTest(PropertyFilesTest): """Additional sanity checks specialized for AbOtaPropertyFiles.""" """Additional validity checks specialized for AbOtaPropertyFiles.""" # The size for payload and metadata signature size. SIGNATURE_SIZE = 256 Loading Loading @@ -1003,7 +1003,7 @@ class AbOtaPropertyFilesTest(PropertyFilesTest): class NonAbOtaPropertyFilesTest(PropertyFilesTest): """Additional sanity checks specialized for NonAbOtaPropertyFiles.""" """Additional validity checks specialized for NonAbOtaPropertyFiles.""" def test_init(self): property_files = NonAbOtaPropertyFiles() Loading
tools/releasetools/test_verity_utils.py +1 −1 Original line number Diff line number Diff line Loading @@ -234,7 +234,7 @@ class VerifiedBootVersion1VerityImageBuilderTest(ReleaseToolsTestCase): @SkipIfExternalToolsUnavailable() def test_Build_SanityCheck(self): # A sanity check for the test itself: the image shouldn't be verifiable # A validity check for the test itself: the image shouldn't be verifiable # with wrong key. self.assertRaises( common.ExternalError, Loading