Implement XzExtentWriter.
The new XzExtentWriter class is an ExtentWriter that uses xz-embedded
to decompress an xz stream and write it to the underlying extent
writer. This will be used to implement REPLACE_XZ in a follow up CL.
Bug: 23604708
Test: Added unittests.
Change-Id: Ifd2ba0c917b66ab33e5cff1d6069da833ad54882
diff --git a/testrunner.cc b/testrunner.cc
index 325d1af..35295a9 100644
--- a/testrunner.cc
+++ b/testrunner.cc
@@ -16,6 +16,8 @@
// based on pam_google_testrunner.cc
+#include <xz.h>
+
#include <base/at_exit.h>
#include <base/command_line.h>
#include <chromeos/test_helpers.h>
@@ -26,6 +28,8 @@
int main(int argc, char **argv) {
LOG(INFO) << "started";
base::AtExitManager exit_manager;
+ // xz-embedded requires to initialize its CRC-32 table once on startup.
+ xz_crc32_init();
// TODO(garnold) temporarily cause the unittest binary to exit with status
// code 2 upon catching a SIGTERM. This will help diagnose why the unittest
// binary is perceived as failing by the buildbot. We should revert it to use