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

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

Issue 682193002: Deterministic recipe: Print the number of files equals or differents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Fix calculation 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 9e5535c7cb85cd205ef95d5d23e5f18fc29a84f3..42d8ce00e2608f6af9c0170fa4f773134e3478e1 100644
--- a/scripts/slave/recipe_modules/isolate/resources/compare_build_artifacts.py
+++ b/scripts/slave/recipe_modules/isolate/resources/compare_build_artifacts.py
@@ -53,7 +53,7 @@ def compare_build_artifacts(first_dir, second_dir):
if diff:
print >> sys.stderr, 'Different list of files in both directories'
print >> sys.stderr, '\n'.join(' ' + i for i in sorted(diff))
- res = 1
+ res += len(diff)
for f in sorted(first_list & second_list):
first_file = os.path.join(first_dir, f)
@@ -62,9 +62,12 @@ def compare_build_artifacts(first_dir, second_dir):
print('%s: equal' % f)
else:
print('%s: DIFFERENT' % f)
- res = 1
+ res += 1
- return res
+ print '%d files are equal, %d are different.' % (
+ len(first_list & second_list) - res, res)
+
+ return 0 if res == 0 else 1
def main():
« 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