Don't add Cycles tests if tests folder does not exist
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 23 Jan 2015 15:56:03 +0000 (20:56 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 23 Jan 2015 15:56:03 +0000 (20:56 +0500)
Also print message about those tests being disabled.

tests/python/CMakeLists.txt

index 59d3aa116197172aef87aaa792056738b24e5cc3..c366aad892f958aada3a4ec14ccff72bc30fbbcd 100644 (file)
@@ -361,12 +361,14 @@ add_test(export_fbx_all_objects ${TEST_BLENDER_EXE}
 )
 
 if(WITH_CYCLES)
-       if(OPENIMAGEIO_IDIFF)
+       if(OPENIMAGEIO_IDIFF AND EXISTS "${TEST_SRC_DIR}/cycles/ctests/shader")
                add_test(cycles_shaders_test
                        ${CMAKE_CURRENT_LIST_DIR}/cycles_render_tests.py
                        -blender "${TEST_BLENDER_EXE_BARE}"
                        -testdir "${TEST_SRC_DIR}/cycles/ctests/shader"
                        -idiff "${OPENIMAGEIO_IDIFF}"
                )
+       else()
+               MESSAGE(STATUS "Disabling Cycles tests because tests folder does not exist")
        endif()
 endif()