Skip to content

Commit 64c20ec

Browse files
tbirdsohjmjohnson
authored andcommitted
ENH: Modify test macro with option for Python baseline test only
1 parent 6fac7f2 commit 64c20ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMake/ITKSphinxExamplesMacros.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ endmacro()
108108
# // ${EXAMPLE_NAME}TestPython.
109109
# )
110110
function(compare_to_baseline)
111-
set(options)
111+
set(options
112+
PYTHON_ONLY
113+
)
112114

113115
set(oneValueArgs
114116
EXAMPLE_NAME
@@ -160,6 +162,7 @@ function(compare_to_baseline)
160162
set(test_name ${LOCAL_COMPARISON_TEST_NAME})
161163
endif()
162164

165+
if(NOT ${PYTHON_ONLY})
163166
add_test(NAME ${test_name}
164167
COMMAND "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ImageCompareCommand"
165168
--test-image "${test_image}"
@@ -169,6 +172,7 @@ function(compare_to_baseline)
169172
set_tests_properties(${test_name}
170173
PROPERTIES DEPENDS ${depends}
171174
)
175+
endif()
172176

173177
if(ITK_WRAP_PYTHON AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${LOCAL_COMPARISON_EXAMPLE_NAME}/Code.py")
174178
set(python_test_name ${test_name}Python)

0 commit comments

Comments
 (0)