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

Unified Diff: tools/determinism/compare_build_artifacts.py

Issue 2293383005: Print result returned by compare_files. (Closed)
Patch Set: forgot to set max_filepath_len. Created 4 years, 3 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: tools/determinism/compare_build_artifacts.py
diff --git a/tools/determinism/compare_build_artifacts.py b/tools/determinism/compare_build_artifacts.py
index fb5293e118ad2a44e2baff91c8906117c223b021..d486cb99db63af1ac1eaa66dcce8164b7e3b6d87 100755
--- a/tools/determinism/compare_build_artifacts.py
+++ b/tools/determinism/compare_build_artifacts.py
@@ -544,19 +544,22 @@ def get_deps(build_dir, target):
def compare_deps(first_dir, second_dir, targets):
"""Print difference of dependent files."""
for target in targets:
- print 'Checking %s difference:' % target
first_deps = get_deps(first_dir, target)
- second_deps =get_deps(second_dir, target)
+ second_deps = get_deps(second_dir, target)
+ print 'Checking %s difference: (%s deps)' % (target, len(first_deps))
if set(first_deps) != set(second_deps):
# Since we do not thiks this case occur, we do not do anything special
# for this case.
print 'deps on %s are different: %s' % (
target, set(first_deps).symmetric_difference(set(second_deps)))
continue
+ max_filepath_len = max(len(n) for n in first_deps)
for d in first_deps:
first_file = os.path.join(first_dir, d)
second_file = os.path.join(second_dir, d)
- compare_files(first_file, second_file)
+ result = compare_files(first_file, second_file)
+ if result:
+ print('%-*s: %s' % (max_filepath_len, d, result))
def compare_build_artifacts(first_dir, second_dir, target_platform,
« 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