diff options
author | Hans Goudey <h.goudey@me.com> | 2020-08-12 04:59:16 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-08-12 04:59:16 +0300 |
commit | ef11238c743e6985fe325280fb13e05d6ec27378 (patch) | |
tree | 1dd2605a676bee52296535825b99f000a9c255eb /tests/python | |
parent | 1f768bbe4145daed111636ca09dd53b25b8d29b5 (diff) | |
parent | ec5f39208785c1bbe723054ffe69e1ac2ab470dd (diff) |
Merge branch 'master' into property-search-uiproperty-search-ui
Diffstat (limited to 'tests/python')
-rw-r--r-- | tests/python/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/python/cycles_render_tests.py | 7 | ||||
-rwxr-xr-x | tests/python/modules/render_report.py | 11 |
3 files changed, 17 insertions, 3 deletions
diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt index a3df01fdbe2..1b78a938a04 100644 --- a/tests/python/CMakeLists.txt +++ b/tests/python/CMakeLists.txt @@ -337,7 +337,7 @@ add_blender_test( --python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py -- --run={'FINISHED'}&bpy.ops.export_mesh.ply\(filepath='${TEST_OUT_DIR}/io_tests/export_ply_vertices.ply'\) --md5_source=${TEST_OUT_DIR}/io_tests/export_ply_vertices.ply - --md5=37faba0aa2014451b27f951afa92f870 --md5_method=FILE + --md5=ee6ce2e69c1d9a7418ff0548f6338f70 --md5_method=FILE ) diff --git a/tests/python/cycles_render_tests.py b/tests/python/cycles_render_tests.py index 79ba11fdd44..bdf4283eb3e 100644 --- a/tests/python/cycles_render_tests.py +++ b/tests/python/cycles_render_tests.py @@ -7,6 +7,7 @@ import shlex import shutil import subprocess import sys +from pathlib import Path def get_arguments(filepath, output_filepath): @@ -63,6 +64,12 @@ def main(): report.set_pixelated(True) report.set_reference_dir("cycles_renders") report.set_compare_engines('cycles', 'eevee') + + # Increase threshold for motion blur, see T78777. + test_dir_name = Path(test_dir).name + if test_dir_name == 'motion_blur': + report.set_fail_threshold(0.032) + ok = report.run(test_dir, blender, get_arguments, batch=True) sys.exit(not ok) diff --git a/tests/python/modules/render_report.py b/tests/python/modules/render_report.py index 0cce1791a88..506c1a1518a 100755 --- a/tests/python/modules/render_report.py +++ b/tests/python/modules/render_report.py @@ -104,6 +104,8 @@ class Report: 'reference_dir', 'idiff', 'pixelated', + 'fail_threshold', + 'fail_percent', 'verbose', 'update', 'failed_tests', @@ -118,6 +120,8 @@ class Report: self.reference_dir = 'reference_renders' self.idiff = idiff self.compare_engines = None + self.fail_threshold = 0.016 + self.fail_percent = 1 self.pixelated = False self.verbose = os.environ.get("BLENDER_VERBOSE") is not None @@ -136,6 +140,9 @@ class Report: def set_pixelated(self, pixelated): self.pixelated = pixelated + def set_fail_threshold(self, threshold): + self.fail_threshold = threshold + def set_reference_dir(self, reference_dir): self.reference_dir = reference_dir @@ -366,8 +373,8 @@ class Report: # Diff images test with threshold. command = ( self.idiff, - "-fail", "0.016", - "-failpercent", "1", + "-fail", str(self.fail_threshold), + "-failpercent", str(self.fail_percent), ref_img, tmp_filepath, ) |