From 7326892c7dfb3ba2a2dfbe3242e0a28d68615462 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Tue, 3 Jul 2018 14:46:15 -0700 Subject: Remove the debug code for bspatch flakiness We already know the flakiness happens in bspatch, and the issue is tracked in b/80193170. Bug: 67849209 Test: unit tests pass Change-Id: Ib4772b8f2f0225125096fe7407d083b5bb542cfb --- applypatch/applypatch.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'applypatch/applypatch.cpp') diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp index b1f5607a6..eb0a2a7b5 100644 --- a/applypatch/applypatch.cpp +++ b/applypatch/applypatch.cpp @@ -587,11 +587,6 @@ static int GenerateTarget(const FileContents& source_file, const std::unique_ptr SHA_CTX ctx; SHA1_Init(&ctx); SinkFn sink = [&memory_sink_str, &ctx](const unsigned char* data, size_t len) { - if (len != 0) { - uint8_t digest[SHA_DIGEST_LENGTH]; - SHA1(data, len, digest); - LOG(DEBUG) << "Appending " << len << " bytes data, SHA-1: " << short_sha1(digest); - } SHA1_Update(&ctx, data, len); memory_sink_str.append(reinterpret_cast(data), len); return len; @@ -632,14 +627,6 @@ static int GenerateTarget(const FileContents& source_file, const std::unique_ptr << short_sha1(bonus_digest); } - // TODO(b/67849209) Remove after debugging the unit test flakiness. - if (android::base::GetMinimumLogSeverity() <= android::base::LogSeverity::DEBUG) { - if (WriteToPartition(reinterpret_cast(memory_sink_str.c_str()), - memory_sink_str.size(), target_filename) != 0) { - LOG(DEBUG) << "Failed to write patched data " << target_filename; - } - } - return 1; } else { LOG(INFO) << " now " << short_sha1(target_sha1); -- cgit v1.2.3