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

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

Issue 698663002: Deterministic build: more detailled comparison. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: 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 69544334374abc5fe4d821caac95acf777559789..8001ba3b72b662876c35f124c6d2d4aac73edd02 100644
--- a/scripts/slave/recipe_modules/isolate/resources/compare_build_artifacts.py
+++ b/scripts/slave/recipe_modules/isolate/resources/compare_build_artifacts.py
@@ -85,8 +85,11 @@ def compare_build_artifacts(first_dir, second_dir):
if not files_diffs:
result = 'equal'
else:
- result = 'DIFFERENT: %s' % ('different size' if result == -1 else
- '%d different bytes' % files_diffs)
+ 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))
+ 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