Snap for 4733905 from 0d4ef610f4 to qt-release

Change-Id: Id16a5b61abd465f6791721b5ae54afc952c72ed9
This commit is contained in:
android-build-team Robot
2018-04-20 09:35:40 +00:00
3 changed files with 26 additions and 1 deletions
+5
View File
@@ -4,3 +4,8 @@ clang_format = true
[Builtin Hooks Options]
# Handle native codes only.
clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp
[Hook Scripts]
checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
-fw sample_updater/
+16 -1
View File
@@ -652,7 +652,22 @@ static int GenerateTarget(const FileContents& source_file, const std::unique_ptr
uint8_t current_target_sha1[SHA_DIGEST_LENGTH];
SHA1_Final(current_target_sha1, &ctx);
if (memcmp(current_target_sha1, target_sha1, SHA_DIGEST_LENGTH) != 0) {
printf("patch did not produce expected sha1\n");
printf("patch did not produce expected sha1 of %s\n", short_sha1(target_sha1).c_str());
printf("target size %zu sha1 %s\n", memory_sink_str.size(),
short_sha1(current_target_sha1).c_str());
printf("source size %zu sha1 %s\n", source_file.data.size(),
short_sha1(source_file.sha1).c_str());
uint8_t patch_digest[SHA_DIGEST_LENGTH];
SHA1(reinterpret_cast<const uint8_t*>(patch->data.data()), patch->data.size(), patch_digest);
printf("patch size %zu sha1 %s\n", patch->data.size(), short_sha1(patch_digest).c_str());
uint8_t bonus_digest[SHA_DIGEST_LENGTH];
SHA1(reinterpret_cast<const uint8_t*>(bonus_data->data.data()), bonus_data->data.size(),
bonus_digest);
printf("bonus size %zu sha1 %s\n", bonus_data->data.size(), short_sha1(bonus_digest).c_str());
return 1;
} else {
printf("now %s\n", short_sha1(target_sha1).c_str());
+5
View File
@@ -344,6 +344,11 @@ TEST_F(ApplyPatchModesTest, PatchModeEmmcTargetWithMultiplePatches) {
patch1.c_str(),
patch2.c_str(),
patch3.c_str() };
// TODO(b/67849209): Remove after addressing the flakiness.
printf("Calling applypatch_modes with the following args:\n");
for (const auto& arg : args) {
printf(" %s\n", arg);
}
ASSERT_EQ(0, applypatch_modes(args.size(), args.data()));
}