[Bf-blender-cvs] [3153bd0f5d2] blender-v3.4-release: SVG: Add more sophisticated test suit

Sergey Sharybin noreply at git.blender.org
Thu Nov 10 11:05:02 CET 2022


Commit: 3153bd0f5d25ae651896c0105dea295d71a2eade
Author: Sergey Sharybin
Date:   Thu Nov 10 10:29:00 2022 +0100
Branches: blender-v3.4-release
https://developer.blender.org/rB3153bd0f5d25ae651896c0105dea295d71a2eade

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.

===================================================================

M	tests/python/CMakeLists.txt
M	tests/python/bl_io_curve_svg_test.py
M	tests/python/modules/render_report.py

===================================================================

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



More information about the Bf-blender-cvs mailing list