diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-06-14 01:39:49 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-06-19 21:17:26 +0300 |
commit | 9b618c1a5a523e74a5c8f9b0c55a56c54a2388d7 (patch) | |
tree | 6854006b432ff45e05c81a270b5669dce73e1005 /tests/python/cycles_render_tests.py | |
parent | 48caadfdd5ed8750213451220238b05caf2c3148 (diff) |
Cycles tests: raise failure threshold, copy failed image for comparison.
Diffstat (limited to 'tests/python/cycles_render_tests.py')
-rwxr-xr-x | tests/python/cycles_render_tests.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/python/cycles_render_tests.py b/tests/python/cycles_render_tests.py index 36fad175cfa..fb9e63aa222 100755 --- a/tests/python/cycles_render_tests.py +++ b/tests/python/cycles_render_tests.py @@ -3,6 +3,7 @@ import argparse import os +import shutil import subprocess import sys import tempfile @@ -53,19 +54,23 @@ def verify_output(filepath): dirpath = os.path.dirname(filepath) reference_dirpath = os.path.join(dirpath, "reference_renders") reference_image = os.path.join(reference_dirpath, testname + ".png") + failed_image = os.path.join(reference_dirpath, testname + ".fail.png") if not os.path.exists(reference_image): return False command = ( IDIFF, - "-fail", "0.01", + "-fail", "0.015", "-failpercent", "1", reference_image, TEMP_FILE, ) try: subprocess.check_output(command) + if os.path.exists(failed_image): + os.remove(failed_image) return True except subprocess.CalledProcessError as e: + shutil.copy(TEMP_FILE, failed_image) if VERBOSE: print(e.output.decode("utf-8")) return e.returncode == 1 |