forked from bartvdbraak/blender
Tests: add more descriptive messages when idiff is not available
Based on patch contributed by Diana Picus in D4355.
This commit is contained in:
parent
c83f13d451
commit
387c1f2e0d
@ -524,7 +524,12 @@ function(add_python_test testname testscript)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if(OPENIMAGEIO_IDIFF AND EXISTS "${TEST_SRC_DIR}/render/shader")
|
||||
if(WITH_CYCLES OR WITH_OPENGL_RENDER_TESTS)
|
||||
if(NOT OPENIMAGEIO_IDIFF)
|
||||
MESSAGE(STATUS "Disabling render tests because OIIO idiff does not exist")
|
||||
elseif(NOT EXISTS "${TEST_SRC_DIR}/render/shader")
|
||||
MESSAGE(STATUS "Disabling render tests because tests folder does not exist at ${TEST_SRC_DIR}")
|
||||
else()
|
||||
macro(add_cycles_render_test subject)
|
||||
if(WITH_CYCLES)
|
||||
add_python_test(
|
||||
@ -577,12 +582,15 @@ if(OPENIMAGEIO_IDIFF AND EXISTS "${TEST_SRC_DIR}/render/shader")
|
||||
add_cycles_render_test(shadow_catcher)
|
||||
add_cycles_render_test(sss)
|
||||
add_cycles_render_test(volume)
|
||||
elseif(WITH_CYCLES)
|
||||
MESSAGE(STATUS "Disabling Cycles tests because tests folder does not exist at ${TEST_SRC_DIR}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WITH_OPENGL_DRAW_TESTS)
|
||||
if(OPENIMAGEIO_IDIFF AND EXISTS "${TEST_SRC_DIR}/opengl")
|
||||
if(NOT OPENIMAGEIO_IDIFF)
|
||||
MESSAGE(STATUS "Disabling OpenGL draw tests because OIIO idiff does not exist")
|
||||
elseif(NOT EXISTS "${TEST_SRC_DIR}/opengl")
|
||||
MESSAGE(STATUS "Disabling OpenGL draw tests because tests folder does not exist at ${TEST_SRC_DIR}")
|
||||
else()
|
||||
# Use all subdirectories of opengl folder.
|
||||
file(GLOB children RELATIVE ${TEST_SRC_DIR}/opengl ${TEST_SRC_DIR}/opengl/*)
|
||||
foreach(child ${children})
|
||||
@ -602,8 +610,6 @@ if(WITH_OPENGL_DRAW_TESTS)
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
MESSAGE(STATUS "Disabling OpenGL tests because tests folder does not exist")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user