X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Fbuild%2Foutput-distance.py;h=49a659b73febd69fff0f79f01b0536b016cf7c1c;hb=2545fab01a601743bb3ecc18942cf14263ccfc6c;hp=f6375088248245e0cf82ba1671eb136eef259249;hpb=26c0145254ec784594331822b6f0700aac7fe3c5;p=lilypond.git diff --git a/scripts/build/output-distance.py b/scripts/build/output-distance.py index f637508824..49a659b73f 100755 --- a/scripts/build/output-distance.py +++ b/scripts/build/output-distance.py @@ -89,7 +89,7 @@ def compare_png_images (old, new, dest_dir): system ('convert -depth 8 -crop %dx%d+0+0 %s %s/crop1.png' % (dims + (old, dir))) system ('convert -depth 8 -crop %dx%d+0+0 %s %s/crop2.png' % (dims + (new, dir))) - system ('compare -depth 8 -dissimilarity-threshold 1 %(dir)s/crop1.png %(dir)s/crop2.png %(dir)s/diff.png' % locals ()) + system1 ('compare -depth 8 -dissimilarity-threshold 1 %(dir)s/crop1.png %(dir)s/crop2.png %(dir)s/diff.png' % locals ()) system ("convert -depth 8 %(dir)s/diff.png -blur 0x3 -negate -channel alpha,blue -type TrueColorMatte -fx 'intensity' %(dir)s/matte.png" % locals ()) @@ -505,7 +505,7 @@ class TextFileCompareLink (FileCompareLink): str = '' if oldnew == 1: str = '\n'.join ([d.replace ('\n','') for d in self.diff_lines]) - str = '
%s
' % str + str = '
%s
' % cgi.escape (str) return str class LogFileCompareLink (TextFileCompareLink): @@ -528,7 +528,7 @@ class ProfileFileLink (FileCompareLink): str += '%-8s: %8d (%5.3f)\n' % (k, int (self.results[oldnew][k]), self.get_ratio (k)) - return '
%s
' % str + return '
%s
' % cgi.escape (str) def get_ratio (self, key): (v1,v2) = (self.results[0].get (key, -1), @@ -827,7 +827,7 @@ class ComparisonData: re.sub (r'\\sourcefilename "([^"]+)"', note_original, open (sf).read ()) else: - print 'no source for', val + print 'no source for', val.file_names[1] def compare_trees (self, dir1, dir2): self.compare_directories (dir1, dir2) @@ -842,6 +842,10 @@ class ComparisonData: sys.exit(1) for d in dirs: + # don't walk the share folders + if d.startswith("share"): + continue + d1 = os.path.join (dir1, d) d2 = os.path.join (dir2, d) @@ -887,14 +891,18 @@ class ComparisonData: self.compare_general_files (klasses[ext], f1, f2) def compare_general_files (self, klass, f1, f2): + prefix = os.path.commonprefix ([f1, f2]) name = os.path.split (f1)[1] + name = os.path.join (prefix, name) file_link = klass (f1, f2) self.file_links[name] = file_link def compare_signature_files (self, f1, f2): + prefix = os.path.commonprefix ([f1, f2]) name = os.path.split (f1)[1] name = re.sub ('-[0-9]+.signature', '', name) + name = os.path.join (prefix, name) file_link = None try: @@ -980,9 +988,12 @@ class ComparisonData: summary += '

%d unchanged

' % len (unchanged) + me = sys.argv[0] + html = ''' LilyPond regression test results +