Handle resume of VABC updates by emitting labels
To support resuming an update with Virtual AB Compression, we emit
labels in between operations. Before writing any data to CowWriter, we
emit label 0. After writing all SOURCE_COPY, we emit label 1. Each time
we finished writing an InstallOp, we emit a label incremented by 1. When
resuming, we pass the label to CowWriter.
Test: treehugger
Change-Id: I126efc406286a30a6090a9ce14c65a7d273aee56
diff --git a/payload_consumer/partition_writer_unittest.cc b/payload_consumer/partition_writer_unittest.cc
index 1ef4783..ca2ef41 100644
--- a/payload_consumer/partition_writer_unittest.cc
+++ b/payload_consumer/partition_writer_unittest.cc
@@ -112,8 +112,12 @@
DeltaArchiveManifest manifest_{};
PartitionUpdate partition_update_{};
InstallPlan::Partition install_part_{};
- PartitionWriter writer_{
- partition_update_, install_part_, &dynamic_control_, kBlockSize, false};
+ PartitionWriter writer_{partition_update_,
+ install_part_,
+ &dynamic_control_,
+ kBlockSize,
+ &prefs_,
+ false};
};
// Test that the error-corrected file descriptor is used to read a partition
// when no hash is available for SOURCE_COPY but it falls back to the normal