Commit 02f0a6d2 authored by Brad King's avatar Brad King

Use vtk_add_test_(python|tcl) where possible

Convert some direct add_test calls to use the helper functions instead.

Change-Id: I4f6b92e24804885c6b1449b21ae8efffd22ffdbf
parent 5b018861
......@@ -2,7 +2,7 @@ if (VTK_PYTHON_EXE)
#
# Test base functionality.
#
string (REPLACE "vtk" "" _baselinedname ${vtk-module})
set(TestConversion_OPTS NO_VALID)
foreach ( tfile
TestConversion
TestContour
......@@ -11,12 +11,8 @@ if (VTK_PYTHON_EXE)
TestSlice
TestSort
)
add_test(NAME ${vtk-module}Python-${tfile}
COMMAND ${VTK_PYTHON_EXE}
${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
-B ${VTK_DATA_ROOT}/Baseline/${_baselinedname}
-D ${VTK_DATA_ROOT}/Data
--normalize)
set(${tfile}_ARGS --normalize)
vtk_add_test_python(${tfile}.py AcceleratorsPiston NO_RT ${${tfile}_OPTS})
endforeach ( )
#
......@@ -31,7 +27,7 @@ if (VTK_PYTHON_EXE)
add_test(NAME ${vtk-module}Python-TestPlaced${tfile}
COMMAND ${VTK_PYTHON_EXE}
${CMAKE_CURRENT_SOURCE_DIR}/Test${tfile}.py
-B ${VTK_DATA_ROOT}/Baseline/${_baselinedname}
-B ${VTK_DATA_ROOT}/Baseline/AcceleratorsPiston
-D ${VTK_DATA_ROOT}/Data)
endforeach ( )
......@@ -41,7 +37,7 @@ if (VTK_PYTHON_EXE)
add_test(NAME ${vtk-module}Python-TestDirectRendering
COMMAND ${VTK_PYTHON_EXE}
${CMAKE_CURRENT_SOURCE_DIR}/TestRendering.py
-B ${VTK_DATA_ROOT}/Baseline/${_baselinedname}
-B ${VTK_DATA_ROOT}/Baseline/AcceleratorsPiston
-D ${VTK_DATA_ROOT}/Data
--gpu_render)
......
......@@ -21,11 +21,7 @@ if(VTK_PYTHON_EXE)
endif()
if(tests)
foreach(tfile ${tests})
add_test(NAME ${vtk-module}Python-${tfile}
COMMAND ${VTK_PYTHON_EXE}
${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
-D ${VTK_DATA_ROOT}
-B ${VTK_DATA_ROOT}/Baseline/Charts)
vtk_add_test_python(${tfile}.py Charts NO_RT NO_OUTPUT)
endforeach()
endif()
else()
......
......@@ -15,8 +15,6 @@ if(VTK_PYTHON_EXE)
TestWeakref
TestCommand
)
add_test(NAME ${vtk-module}Python-${tfile}
COMMAND ${VTK_PYTHON_EXE}
${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
vtk_add_test_python(${tfile}.py NO_DATA NO_VALID NO_OUTPUT)
endforeach()
endif()
......@@ -9,8 +9,5 @@ set(tests
)
foreach(test ${tests})
add_test(NAME ${vtk-module}Tcl-${test}
COMMAND ${VTK_TCL_EXE}
${CMAKE_CURRENT_SOURCE_DIR}/${test}.tcl
-A ${VTK_SOURCE_DIR}/Wrapping/Tcl)
vtk_add_test_tcl(${test}.tcl NO_DATA NO_RT)
endforeach()
# Tests without test images
#
add_test(NAME ${vtk-module}Tcl-otherDataSetAttributes
COMMAND ${VTK_TCL_EXE}
${CMAKE_CURRENT_SOURCE_DIR}/otherDataSetAttributes.tcl
-A ${VTK_SOURCE_DIR}/Wrapping/Tcl)
vtk_add_test_tcl(otherDataSetAttributes.tcl NO_DATA NO_RT)
# Tests with images
if(VTK_DATA_ROOT)
......
if(VTK_PYTHON_EXE)
foreach(tfile
TestReleaseData
)
add_test(NAME ${vtk-module}Python-${tfile}
COMMAND ${VTK_PYTHON_EXE}
${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
endforeach()
vtk_add_test_python(TestReleaseData.py NO_DATA NO_VALID NO_OUTPUT)
endif()
\ No newline at end of file
......@@ -3,8 +3,5 @@ set(tests
)
foreach(test ${tests})
add_test(NAME ${vtk-module}Tcl-${test}
COMMAND ${VTK_TCL_EXE}
${CMAKE_CURRENT_SOURCE_DIR}/${test}.tcl
-A ${VTK_SOURCE_DIR}/Wrapping/Tcl)
vtk_add_test_tcl(${test}.tcl NO_DATA NO_RT)
endforeach()
......@@ -5,9 +5,7 @@ if(VTK_PYTHON_EXE)
TestAMRSliceFilter
)
if(VTK_DATA_ROOT)
add_test(NAME ${vtk-module}Python-${tfile}
COMMAND ${VTK_PYTHON_EXE}
${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py -D ${VTK_DATA_ROOT})
vtk_add_test_python(${tfile}.py NO_VALID NO_OUTPUT)
set_tests_properties(${vtk-module}Python-${tfile} PROPERTIES FAIL_REGULAR_EXPRESSION "Error")
endif()
endforeach()
......
if(VTK_PYTHON_EXE)
foreach(tfile
kMeansDistanceCalculator
)
add_test(NAME ${vtk-module}Python-${tfile}
COMMAND ${VTK_PYTHON_EXE}
${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py)
endforeach()
vtk_add_test_python(kMeansDistanceCalculator.py NO_DATA NO_VALID NO_OUTPUT)
endif()
......@@ -7,9 +7,6 @@ set(tests
foreach( tfile ${tests})
if(VTK_DATA_ROOT)
add_test(NAME ${vtk-module}Tcl-${tfile} COMMAND ${VTK_TCL_EXE}
${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.tcl
-D ${VTK_DATA_ROOT}
)
vtk_add_test_tcl(${tfile}.tcl NO_RT)
endif()
endforeach()
......@@ -29,11 +29,5 @@ if(VTK_DATA_ROOT)
endif()
foreach( tfile ${tests})
add_test(NAME ${vtk-module}Tcl-${tfile} COMMAND ${VTK_TCL_EXE}
${vtkTestingRendering_SOURCE_DIR}/rtImageTest.tcl
${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.tcl
-D ${VTK_DATA_ROOT}
-T ${VTK_TEST_OUTPUT_DIR}
-V Baseline/Graphics/${tfile}.png
)
vtk_add_test_tcl(${tfile}.tcl Graphics)
endforeach()
if(VTK_PYTHON_EXE)
foreach(tfile
TestTkRenderWidget
TestTkRenderWindowInteractor
)
if(VTK_DATA_ROOT)
add_test(NAME ${vtk-module}Python-${tfile}
COMMAND ${VTK_PYTHON_EXE}
${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.py
-D ${VTK_DATA_ROOT}
-T ${VTK_TEST_OUTPUT_DIR}
-B ${VTK_DATA_ROOT}/Baseline/Rendering/
)
endif()
endforeach()
if(VTK_PYTHON_EXE AND VTK_DATA_ROOT)
vtk_add_test_python(TestTkRenderWidget.py Rendering NO_RT)
vtk_add_test_python(TestTkRenderWindowInteractor.py Rendering NO_RT)
endif()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment