summaryrefslogtreecommitdiff
path: root/scripts/update_payload/format_utils.py
diff options
context:
space:
mode:
authorKelvin Zhang <zhangkelvin@google.com>2020-11-13 13:10:42 -0500
committerKelvin Zhang <zhangkelvin@google.com>2020-12-10 20:29:40 +0000
commitcfe694f9ac1676444a5e535f2b7e7bb3230756b5 (patch)
tree1f9b9a03eacc7b9f1c459e7f23ef9ca441e48365 /scripts/update_payload/format_utils.py
parent90560211dd162ff558e953ee03ac4b8c50bf3dec (diff)
Add unittest for set next op index
In order to add this unittest, we need to ensure that a checkpoint is saved after each InstallOp. However, current logic throttles checkpoint by time, it also skips checkpoint if buffer offset is the same. To address these issues, 1. Add a ShouldCheckpoint() to control whether to throttle checkpoint based on time, unittest overrides this and just return true 2. Modify logic to only skip a checkpoint if operation_index hasn't changed. For SOURCE_COPY operations, buffer offset won't be advanced but operation index will. Test: treehugger Change-Id: Ib81bfe0c4ecb7200096b4b22390fb1f2fcff1581
Diffstat (limited to 'scripts/update_payload/format_utils.py')
0 files changed, 0 insertions, 0 deletions