Cycles: add denoising tests, keep new image even if no reference exists.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 10 Aug 2017 22:38:39 +0000 (00:38 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 10 Aug 2017 23:09:35 +0000 (01:09 +0200)
tests/python/CMakeLists.txt
tests/python/cycles_render_tests.py

index ca752993c7912c509ec2a6d10fffbb16daff3d55..5335987d19d7e9c0cd9d7e79757a25f18c6135ec 100644 (file)
@@ -534,6 +534,7 @@ if(WITH_CYCLES)
                if(WITH_OPENGL_TESTS)
                        add_cycles_render_test(opengl)
                endif()
+               add_cycles_render_test(denoise)
                add_cycles_render_test(displacement)
                add_cycles_render_test(image_data_types)
                add_cycles_render_test(image_mapping)
index ea84f27ab7e5b466fded600eecd6c784a4cd2d26..ffd8627dbf264de6e3ff9a58f2824dd21f23e54d 100755 (executable)
@@ -222,6 +222,14 @@ class Report:
 
 def verify_output(report, filepath):
     ref_img, new_img, diff_img = test_get_images(filepath)
+
+    # copy new image
+    if os.path.exists(new_img):
+        os.remove(new_img)
+    if os.path.exists(TEMP_FILE):
+        shutil.copy(TEMP_FILE, new_img)
+
+
     if not os.path.exists(ref_img):
         return False
 
@@ -256,12 +264,6 @@ def verify_output(report, filepath):
         if VERBOSE:
             print_message(e.output.decode("utf-8"))
 
-    # copy new image
-    if os.path.exists(new_img):
-        os.remove(new_img)
-    if os.path.exists(TEMP_FILE):
-        shutil.copy(TEMP_FILE, new_img)
-
     return not failed