From 00fdcd3fa9a5cc8bc339404109fd33bc089b75b7 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 4 Sep 2023 10:28:58 +0100 Subject: [PATCH] d/log-reftests.py: Log uuencoded variant GSK reftest renderings too The variant GSK reftest renderings (flipped, repeated, etc.) might fail differently, in which case we will want to look at their outputs. --- debian/log-reftests.py | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/debian/log-reftests.py b/debian/log-reftests.py index eefb1cbdfb..382f495c34 100755 --- a/debian/log-reftests.py +++ b/debian/log-reftests.py @@ -18,22 +18,29 @@ if __name__ == '__main__': 'gl', 'x11', ), ): - diff = (outputs / (node.stem + '.diff.png')) + for tail in ('', '-flipped', '-repeated', '-rotated', '-masked'): + diff = (outputs / (node.stem + tail + '.diff.png')) - if diff.exists(): - ref = Path('testsuite', 'gsk', 'compare', node.stem + '.png') - out = (outputs / (node.stem + '.out.png')) + if diff.exists(): + if tail: + ref = outputs / (node.stem + tail + '.ref.png') + else: + ref = Path( + 'testsuite', 'gsk', 'compare', node.stem + '.png', + ) - for path in (ref, out, diff): - if path.exists(): - print('begin-base64 644 %s' % path) - sys.stdout.flush() - with open(path, 'rb') as reader: - base64.encode(reader, sys.stdout.buffer) - print('====') - print('') + out = (outputs / (node.stem + tail + '.out.png')) - print('') + for path in (ref, out, diff): + if path.exists(): + print('begin-base64 644 %s' % path) + sys.stdout.flush() + with open(path, 'rb') as reader: + base64.encode(reader, sys.stdout.buffer) + print('====') + print('') + + print('') for ui in Path('testsuite', 'reftests').glob('*.ui'): for outputs in ( -- 2.30.2