Loading tools/releasetools/test_check_target_files_vintf.py +2 −0 Original line number Original line Diff line number Diff line Loading @@ -78,6 +78,8 @@ class CheckTargetFilesVintfTest(test_utils.ReleaseToolsTestCase): for root, _, files in os.walk(test_delta_dir): for root, _, files in os.walk(test_delta_dir): rel_root = os.path.relpath(root, test_delta_dir) rel_root = os.path.relpath(root, test_delta_dir) for f in files: for f in files: if not f.endswith('.xml'): continue output_file = os.path.join(test_dir, rel_root, f) output_file = os.path.join(test_dir, rel_root, f) with open(os.path.join(root, f)) as inp: with open(os.path.join(root, f)) as inp: write_string_to_file(inp.read(), output_file) write_string_to_file(inp.read(), output_file) Loading tools/releasetools/test_ota_from_target_files.py +3 −3 Original line number Original line Diff line number Diff line Loading @@ -596,7 +596,7 @@ class OtaFromTargetFilesTest(test_utils.ReleaseToolsTestCase): with zipfile.ZipFile(target_file) as verify_zip: with zipfile.ZipFile(target_file) as verify_zip: namelist = verify_zip.namelist() namelist = verify_zip.namelist() ab_partitions = verify_zip.read('META/ab_partitions.txt') ab_partitions = verify_zip.read('META/ab_partitions.txt').decode() self.assertIn('META/ab_partitions.txt', namelist) self.assertIn('META/ab_partitions.txt', namelist) self.assertIn('IMAGES/system.img', namelist) self.assertIn('IMAGES/system.img', namelist) Loading Loading @@ -676,9 +676,9 @@ class OtaFromTargetFilesTest(test_utils.ReleaseToolsTestCase): with zipfile.ZipFile(target_file) as verify_zip: with zipfile.ZipFile(target_file) as verify_zip: namelist = verify_zip.namelist() namelist = verify_zip.namelist() updated_misc_info = verify_zip.read('META/misc_info.txt') updated_misc_info = verify_zip.read('META/misc_info.txt').decode() updated_dynamic_partitions_info = verify_zip.read( updated_dynamic_partitions_info = verify_zip.read( 'META/dynamic_partitions_info.txt') 'META/dynamic_partitions_info.txt').decode() self.assertIn('META/ab_partitions.txt', namelist) self.assertIn('META/ab_partitions.txt', namelist) self.assertIn('IMAGES/system.img', namelist) self.assertIn('IMAGES/system.img', namelist) Loading Loading
tools/releasetools/test_check_target_files_vintf.py +2 −0 Original line number Original line Diff line number Diff line Loading @@ -78,6 +78,8 @@ class CheckTargetFilesVintfTest(test_utils.ReleaseToolsTestCase): for root, _, files in os.walk(test_delta_dir): for root, _, files in os.walk(test_delta_dir): rel_root = os.path.relpath(root, test_delta_dir) rel_root = os.path.relpath(root, test_delta_dir) for f in files: for f in files: if not f.endswith('.xml'): continue output_file = os.path.join(test_dir, rel_root, f) output_file = os.path.join(test_dir, rel_root, f) with open(os.path.join(root, f)) as inp: with open(os.path.join(root, f)) as inp: write_string_to_file(inp.read(), output_file) write_string_to_file(inp.read(), output_file) Loading
tools/releasetools/test_ota_from_target_files.py +3 −3 Original line number Original line Diff line number Diff line Loading @@ -596,7 +596,7 @@ class OtaFromTargetFilesTest(test_utils.ReleaseToolsTestCase): with zipfile.ZipFile(target_file) as verify_zip: with zipfile.ZipFile(target_file) as verify_zip: namelist = verify_zip.namelist() namelist = verify_zip.namelist() ab_partitions = verify_zip.read('META/ab_partitions.txt') ab_partitions = verify_zip.read('META/ab_partitions.txt').decode() self.assertIn('META/ab_partitions.txt', namelist) self.assertIn('META/ab_partitions.txt', namelist) self.assertIn('IMAGES/system.img', namelist) self.assertIn('IMAGES/system.img', namelist) Loading Loading @@ -676,9 +676,9 @@ class OtaFromTargetFilesTest(test_utils.ReleaseToolsTestCase): with zipfile.ZipFile(target_file) as verify_zip: with zipfile.ZipFile(target_file) as verify_zip: namelist = verify_zip.namelist() namelist = verify_zip.namelist() updated_misc_info = verify_zip.read('META/misc_info.txt') updated_misc_info = verify_zip.read('META/misc_info.txt').decode() updated_dynamic_partitions_info = verify_zip.read( updated_dynamic_partitions_info = verify_zip.read( 'META/dynamic_partitions_info.txt') 'META/dynamic_partitions_info.txt').decode() self.assertIn('META/ab_partitions.txt', namelist) self.assertIn('META/ab_partitions.txt', namelist) self.assertIn('IMAGES/system.img', namelist) self.assertIn('IMAGES/system.img', namelist) Loading