diff --git a/render/rendertest.py b/render/rendertest.py index b54dbf4..3dea56c 100755 --- a/render/rendertest.py +++ b/render/rendertest.py @@ -127,7 +127,7 @@ def render(): '+exec', 'rendertest.script'], env=env, check=True) -def compare_one(test: str, channel: str, image_base: str, image_gold: str, image_test: str, image_diff: str, image_flip: str): +def compare_one(test: str, channel: str, image_base: str, image_gold: str, image_test: str, image_diff: str): result = subprocess.run([imagecompare, image_gold, image_test, image_diff], text=True, capture_output=True) match result.returncode: case 0: @@ -144,7 +144,6 @@ def compare_one(test: str, channel: str, image_base: str, image_gold: str, image ret['image_gold'] = os.path.relpath(image_gold, REPORT_ROOT) ret['image_test'] = os.path.relpath(image_test, REPORT_ROOT) ret['image_diff'] = os.path.relpath(image_diff, REPORT_ROOT) - ret['image_flip'] = os.path.relpath(image_flip, REPORT_ROOT) return ret def compare(): @@ -157,19 +156,11 @@ def compare(): for test in args.tests: for channel, _ in channels.items(): image_base = f'{test}_{channel}' - #image_test = f'{screenshot_base}/{image_base}.tga' image_test = f'{ROOT}/work/gold/{image_base}.png' image_gold = f'{ROOT}/gold/{image_base}.png' image_diff = f'{WORKDIR}/{image_base}_diff.png' - image_flip = f'{WORKDIR}/{image_base}_flip.gif' - diffs.append(executor.submit(compare_one, test, channel, image_base, image_gold, image_test, image_diff, image_flip)) - - # legacy - #executor.submit(subprocess.run, [convert, - # '(', image_gold, '-bordercolor', 'gold', '-border', '2x2', '-gravity', 'SouthWest', '-font', 'Impact', '-pointsize', '24', '-fill', 'gold', '-stroke', 'black', '-annotate', '0', 'GOLD', ')', - # '(', image_test, '-bordercolor', 'white', '-border', '2x2', '-fill', 'white', '-annotate', '0', 'TEST', ')', - # '-loop', '0', '-set', 'delay', '100', image_flip], check=True) + diffs.append(executor.submit(compare_one, test, channel, image_base, image_gold, image_test, image_diff)) results = [diff.result() for diff in diffs] # json.dump(results, open(f'{WORKDIR}/data.json', 'w'))