AU: Beginnings of delta support
- proto file for delta files; still needs hardlink support
- code to generate a delta update from two directory trees (old, new).
- code to parse delta update
- Actions: postinst-runner, install, bootable flag setter, filesystem
copier, Omaha response handler, Omaha request preparer,
- misc utility functions, like StringHasSuffix(), templatized Action
classes to feed/collect an object from another action.
- FilesystemIterator: iterates a directory tree with optional
exclusion path. Tolerates deleting of files during iteration.
- Subprocess class: support for synchronously or asynchronously
running an external command. Doesn't pass any env variables.
- Integration test that strings many Actions together and tests using
actual Omaha/Lorry. Currently only tests full updates.
- New simple HTTP server for unittest that supports fake flaky
connections.
- Some refactoring.
Review URL: http://codereview.chromium.org/466036
git-svn-id: svn://chrome-svn/chromeos/trunk@334 06c00378-0e64-4dae-be16-12b19f9950a1
diff --git a/file_writer_unittest.cc b/file_writer_unittest.cc
index ed8bcaa..6e494ec 100644
--- a/file_writer_unittest.cc
+++ b/file_writer_unittest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <string>
@@ -9,6 +10,7 @@
#include <gtest/gtest.h>
#include "update_engine/file_writer.h"
#include "update_engine/test_utils.h"
+#include "update_engine/utils.h"
using std::string;
using std::vector;
@@ -24,7 +26,8 @@
O_CREAT | O_LARGEFILE | O_TRUNC | O_WRONLY,
0644));
ASSERT_EQ(4, file_writer.Write("test", 4));
- vector<char> actual_data = ReadFile(path);
+ vector<char> actual_data;
+ EXPECT_TRUE(utils::ReadFile(path, &actual_data));
EXPECT_FALSE(memcmp("test", &actual_data[0], actual_data.size()));
EXPECT_EQ(0, file_writer.Close());