From 2d22c1a70cf41462b7564c610823543f91b37eb2 Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Fri, 15 Jun 2018 13:07:13 -0700 Subject: update_payload: Allow specifying partition options for major version 2 This commit adds the ability to specify partition options for more than just kernel/rootfs. This supersedes -p/--root-part-size, -P/--kern-part-size, --dst_kern, --dst_root, --src_kern, --src_root, --out_dst_kern, and --out_dst_root. They are replaced by --part_names used in conjunction with --part_sizes, --dst_part_paths, --src_part_paths, and --out_dst_part_paths. Backwards-compatibility with the old flags is kept, so long as they are not used alongside the new flags. BUG=b:794404 TEST=no errors during run_unittests and test_paycheck.sh Change-Id: Icc1118abbf89dd268be3eafe41723657c5178197 Reviewed-on: https://chromium-review.googlesource.com/1103063 Commit-Ready: Tudor Brindus Tested-by: Tudor Brindus Reviewed-by: Amin Hassani --- scripts/update_payload/checker_unittest.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'scripts/update_payload/checker_unittest.py') diff --git a/scripts/update_payload/checker_unittest.py b/scripts/update_payload/checker_unittest.py index d42f4b40..ed5ee80d 100755 --- a/scripts/update_payload/checker_unittest.py +++ b/scripts/update_payload/checker_unittest.py @@ -1205,10 +1205,13 @@ class PayloadCheckerTest(mox.MoxTestBase): payload_checker = _GetPayloadChecker(payload_gen.WriteToFileWithData, **kwargs) - kwargs = {'pubkey_file_name': test_utils._PUBKEY_FILE_NAME, - 'rootfs_part_size': rootfs_part_size, - 'metadata_size': metadata_size, - 'kernel_part_size': kernel_part_size} + kwargs = { + 'pubkey_file_name': test_utils._PUBKEY_FILE_NAME, + 'metadata_size': metadata_size, + 'part_sizes': { + common.KERNEL: kernel_part_size, + common.ROOTFS: rootfs_part_size}} + should_fail = (fail_wrong_payload_type or fail_mismatched_block_size or fail_mismatched_metadata_size or fail_excess_data or fail_rootfs_part_size_exceeded or -- cgit v1.2.3