Bug 1461490 - update verify allowlist followup for windows ESR52, r=bhearsum
authorNick Thomas <nthomas@mozilla.com>
Thu, 07 Jun 2018 11:45:29 +1200
changeset 8422 88b450a68f24
parent 8421 0d3c79c8b045
child 8423 db9d67c3554f
push id6149
push usernthomas@mozilla.com
push date2018-06-07 21:23 +0000
reviewersbhearsum
bugs1461490
Bug 1461490 - update verify allowlist followup for windows ESR52, r=bhearsum MozReview-Commit-ID: GoRGM0KtxMi
release/compare-directories.py
--- a/release/compare-directories.py
+++ b/release/compare-directories.py
@@ -85,38 +85,38 @@ def walk_dir(path):
     all_files = []
     all_dirs = []
 
     for root, dirs, files in os.walk(path):
         all_dirs.extend([os.path.join(root, d) for d in dirs])
         all_files.extend([os.path.join(root, f) for f in files])
 
     # trim off directory prefix for easier comparison
-    all_dirs = [d.replace(path + '/', '') for d in all_dirs]
-    all_files = [f.replace(path + '/', '') for f in all_files]
+    all_dirs = [d[len(path)+1:] for d in all_dirs]
+    all_files = [f[len(path)+1:] for f in all_files]
 
     return all_dirs, all_files
 
 
 def compare_listings(source_list, target_list, label, source_dir, target_dir):
     obj1 = set(source_list)
     obj2 = set(target_list)
     difference_found = False
 
     left_diff = obj1 - obj2
     if left_diff:
         logging.error('{} only in {}:'.format(label, source_dir))
-        for d in left_diff:
+        for d in sorted(left_diff):
             logging.error('  {}'.format(d))
         difference_found = True
 
     right_diff = obj2 - obj1
     if right_diff:
         logging.error('{} only in {}:'.format(label, target_dir))
-        for d in right_diff:
+        for d in sorted(right_diff):
             logging.error('  {}'.format(d))
         difference_found = True
 
     return difference_found
 
 
 def hash_file(filename):
     h = hashlib.sha256()