diff options
author | Tianjie Xu <xunchang@google.com> | 2018-04-27 18:53:47 +0200 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-04-27 18:53:47 +0200 |
commit | 7ad3e673ba387657e9488d8813abac85ea538f4e (patch) | |
tree | e2c475554ef7018220ccbe23a55abd96711f0a04 /applypatch/applypatch.cpp | |
parent | Merge "updater_sample: fix gen_update_config.py" (diff) | |
parent | Merge "Save the target file when applypatch tests fail" (diff) | |
download | android_bootable_recovery-7ad3e673ba387657e9488d8813abac85ea538f4e.tar android_bootable_recovery-7ad3e673ba387657e9488d8813abac85ea538f4e.tar.gz android_bootable_recovery-7ad3e673ba387657e9488d8813abac85ea538f4e.tar.bz2 android_bootable_recovery-7ad3e673ba387657e9488d8813abac85ea538f4e.tar.lz android_bootable_recovery-7ad3e673ba387657e9488d8813abac85ea538f4e.tar.xz android_bootable_recovery-7ad3e673ba387657e9488d8813abac85ea538f4e.tar.zst android_bootable_recovery-7ad3e673ba387657e9488d8813abac85ea538f4e.zip |
Diffstat (limited to 'applypatch/applypatch.cpp')
-rw-r--r-- | applypatch/applypatch.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp index 39b8030d9..14137de96 100644 --- a/applypatch/applypatch.cpp +++ b/applypatch/applypatch.cpp @@ -672,6 +672,14 @@ static int GenerateTarget(const FileContents& source_file, const std::unique_ptr bonus_digest); printf("bonus size %zu sha1 %s\n", bonus_data->data.size(), short_sha1(bonus_digest).c_str()); + // TODO(b/67849209) Remove after debugging the unit test flakiness. + if (android::base::GetMinimumLogSeverity() <= android::base::LogSeverity::DEBUG) { + if (WriteToPartition(reinterpret_cast<const unsigned char*>(memory_sink_str.c_str()), + memory_sink_str.size(), target_filename) != 0) { + LOG(DEBUG) << "Failed to write patched data " << target_filename; + } + } + return 1; } else { printf("now %s\n", short_sha1(target_sha1).c_str()); |