Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: scripts/slave/recipe_modules/isolate/resources/compare_build_artifacts.py

Issue 690893004: Deterministic build: Compare step: Fix the logging when the files have a different size. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Address comment. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_modules/isolate/resources/compare_build_artifacts.py
diff --git a/scripts/slave/recipe_modules/isolate/resources/compare_build_artifacts.py b/scripts/slave/recipe_modules/isolate/resources/compare_build_artifacts.py
index 8001ba3b72b662876c35f124c6d2d4aac73edd02..298797ff72665b5d5f6a57b10ef37f77b59dd3e2 100644
--- a/scripts/slave/recipe_modules/isolate/resources/compare_build_artifacts.py
+++ b/scripts/slave/recipe_modules/isolate/resources/compare_build_artifacts.py
@@ -86,9 +86,13 @@ def compare_build_artifacts(first_dir, second_dir):
result = 'equal'
else:
file_len = os.stat(first_file).st_size
- difference = ('different size' if result == -1 else
- '%d out of %d bytes are different (%.2f%%)' %
- (files_diffs, file_len, 100.0 * files_diffs / file_len))
+ difference = ''
+ if files_diffs == -1:
+ difference = 'different size: %d != %d' % (file_len,
+ os.stat(second_file).st_size)
+ else:
+ difference = '%d out of %d bytes are different (%.2f%%)' % (
+ files_diffs, file_len, 100.0 * files_diffs / file_len)
result = 'DIFFERENT: %s' % difference
res += 1
print('%-*s: %s' % (max_filepath_len, f, result))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698