From 3153bd0f5d25ae651896c0105dea295d71a2eade Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 10 Nov 2022 10:29:00 +0100 Subject: SVG: Add more sophisticated test suit This test suit tests SVG on a big files, as opposite of testing one specific aspect of the standard by atomic files. --- tests/python/CMakeLists.txt | 2 +- tests/python/bl_io_curve_svg_test.py | 5 ++++- tests/python/modules/render_report.py | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt index 0d74cfafda5..14b00ace251 100644 --- a/tests/python/CMakeLists.txt +++ b/tests/python/CMakeLists.txt @@ -632,7 +632,7 @@ endif() # SVG Import if(True) - set(_svg_render_tests path) + set(_svg_render_tests complex path) foreach(render_test ${_svg_render_tests}) add_python_test( diff --git a/tests/python/bl_io_curve_svg_test.py b/tests/python/bl_io_curve_svg_test.py index 092dfa5497a..f36036a5b52 100644 --- a/tests/python/bl_io_curve_svg_test.py +++ b/tests/python/bl_io_curve_svg_test.py @@ -50,7 +50,10 @@ def main(): from modules import render_report report = render_report.Report('IO Curve SVG', output_dir, idiff) report.set_pixelated(True) - print(test_dir) + + test_dir_name = Path(test_dir).name + if test_dir_name == 'complex': + report.set_fail_percent(0.01) ok = report.run(test_dir, blender, get_arguments, batch=True) diff --git a/tests/python/modules/render_report.py b/tests/python/modules/render_report.py index 15d46d6d127..5dcb73b65cc 100755 --- a/tests/python/modules/render_report.py +++ b/tests/python/modules/render_report.py @@ -166,6 +166,9 @@ class Report: def set_fail_threshold(self, threshold): self.fail_threshold = threshold + def set_fail_percent(self, percent): + self.fail_percent = percent + def set_reference_dir(self, reference_dir): self.reference_dir = reference_dir -- cgit v1.2.3