summaryrefslogtreecommitdiff
path: root/scripts/update_payload/checker_unittest.py
diff options
context:
space:
mode:
authorTudor Brindus <tbrindus@chromium.org>2018-06-15 13:07:13 -0700
committerchrome-bot <chrome-bot@chromium.org>2018-06-25 17:20:25 -0700
commit2d22c1a70cf41462b7564c610823543f91b37eb2 (patch)
tree2097ee4a77e7b7ff26700a07a65ed7e6764d3b20 /scripts/update_payload/checker_unittest.py
parent8d05a7e15bfcc4f551a0f59be6d0d1eb083887e9 (diff)
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 <tbrindus@chromium.org> Tested-by: Tudor Brindus <tbrindus@chromium.org> Reviewed-by: Amin Hassani <ahassani@chromium.org>
Diffstat (limited to 'scripts/update_payload/checker_unittest.py')
-rwxr-xr-xscripts/update_payload/checker_unittest.py11
1 files changed, 7 insertions, 4 deletions
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