merge_target_files: Checks VINTF metadata of resulting target files

Bug: 139300422
Bug: 131425279
Test: test_merge_target_files
Change-Id: I972db2fc40555ab0fc38316f0a6e6f5e8f163371
This commit is contained in:
Yifan Hong 2019-08-21 16:37:11 -07:00
parent 9276cf0226
commit ade0d3f4a2
2 changed files with 5 additions and 0 deletions

View File

@ -335,6 +335,7 @@ python_binary_host {
libs: [
"releasetools_add_img_to_target_files",
"releasetools_build_super_image",
"releasetools_check_target_files_vintf",
"releasetools_common",
"releasetools_img_from_target_files",
"releasetools_ota_from_target_files",

View File

@ -87,6 +87,7 @@ import zipfile
import add_img_to_target_files
import build_super_image
import check_target_files_vintf
import common
import img_from_target_files
import ota_from_target_files
@ -906,6 +907,9 @@ def merge_target_files(temp_dir, framework_target_files, framework_item_list,
vendor_target_files, vendor_item_list, framework_misc_info_keys,
rebuild_recovery)
if not check_target_files_vintf.CheckVintf(output_target_files_temp_dir):
raise RuntimeError("Incompatible VINTF metadata")
generate_images(output_target_files_temp_dir, rebuild_recovery)
generate_super_empty_image(output_target_files_temp_dir, output_super_empty)