diff options
author | Alex Deymo <deymo@google.com> | 2015-08-17 11:29:22 -0700 |
---|---|---|
committer | Alex Deymo <deymo@google.com> | 2015-08-17 11:33:32 -0700 |
commit | 583f7b9e67f932f9bba7ae0ac84dce3d31107cfa (patch) | |
tree | 4fd5ca86b580c3943423e4c1f7f077e64a7aa165 /test_utils.cc | |
parent | 2a57bfa299f6409e930ed11dda26421272d1bf5f (diff) | |
parent | ac6246ae239518a27ab4e89ee01ba1b1d76d440f (diff) |
Sync update_engine from chromiumos/platform2.
The update_engine project was synced from chromium gerrit instance with
the latest changes.You can find the old version here:
https://chromium.googlesource.com/chromiumos/platform2/+/830d80acf26c8232d4b6e14916b7dad543bcf5ec/update_engine
BUG=b/23084607
Diffstat (limited to 'test_utils.cc')
-rw-r--r-- | test_utils.cc | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/test_utils.cc b/test_utils.cc index 0c022794..7965f85e 100644 --- a/test_utils.cc +++ b/test_utils.cc @@ -18,9 +18,10 @@ #include <vector> #include <base/files/file_util.h> +#include <base/format_macros.h> #include <base/logging.h> -#include <base/strings/stringprintf.h> #include <base/strings/string_util.h> +#include <base/strings/stringprintf.h> #include "update_engine/file_writer.h" #include "update_engine/utils.h" @@ -168,7 +169,7 @@ void CreateEmptyExtImageAtPath(const string& path, size_t size, int block_size) { EXPECT_EQ(0, System(StringPrintf("dd if=/dev/zero of=%s" - " seek=%zu bs=1 count=1 status=none", + " seek=%" PRIuS " bs=1 count=1 status=none", path.c_str(), size))); EXPECT_EQ(0, System(StringPrintf("mkfs.ext3 -q -b %d -F %s", block_size, path.c_str()))); @@ -302,19 +303,6 @@ bool RecursiveUnlinkDir(const string& path) { return true; } -GValue* GValueNewString(const char* str) { - GValue* gval = g_new0(GValue, 1); - g_value_init(gval, G_TYPE_STRING); - g_value_set_string(gval, str); - return gval; -} - -void GValueFree(gpointer arg) { - auto gval = reinterpret_cast<GValue*>(arg); - g_value_unset(gval); - g_free(gval); -} - base::FilePath GetBuildArtifactsPath() { base::FilePath exe_path; base::ReadSymbolicLink(base::FilePath("/proc/self/exe"), &exe_path); |