[Bf-blender-cvs] [9b618c1] master: Cycles tests: raise failure threshold, copy failed image for comparison.
Brecht Van Lommel
noreply at git.blender.org
Sun Jun 19 20:36:54 CEST 2016
Commit: 9b618c1a5a523e74a5c8f9b0c55a56c54a2388d7
Author: Brecht Van Lommel
Date: Tue Jun 14 00:39:49 2016 +0200
Branches: master
https://developer.blender.org/rB9b618c1a5a523e74a5c8f9b0c55a56c54a2388d7
Cycles tests: raise failure threshold, copy failed image for comparison.
===================================================================
M tests/python/cycles_render_tests.py
===================================================================
diff --git a/tests/python/cycles_render_tests.py b/tests/python/cycles_render_tests.py
index 36fad17..fb9e63a 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
More information about the Bf-blender-cvs
mailing list