Commit c5ab6fda authored by Bill Lorensen's avatar Bill Lorensen
Browse files

ENH: Tcl tests should not fail if VTK_DATA_ROOT is missing.

A test should run without VTK_DATA_ROOT unless it needs input data
from VTK_DATA_ROOT. Tests that have image baselines should still run
unless they need input data.

rtImage.tcl is modified to skip baseline comparisons if VTK_DATA_ROOT
is not defined.

CMakeLists.txt files are converted to use add_test_tcl macro for
consistency.

CMakeLists.txt files are changed to isolate tests that need input
data.

This was tested as follows:
1) configured a build with VTK_DATA_ROOT undefine
   ctest -R Tcl-
   154 tests passed
2) configured a build with VTK_DATA_ROOT defined
   ctest -R Tcl-
   390 tests passed

This means that 390-154 = 236 tcl tests require input data

Change-Id: I9067a3e3e2a710ddf353f0181cc7b22a85b5ef10
parent 95241d4d
......@@ -246,9 +246,11 @@ macro(add_test_tcl)
else()
add_test(NAME ${vtk-module}Tcl-${TName}
COMMAND ${VTK_TCL_EXE}
${vtkTestingRendering_SOURCE_DIR}/rtImageTest.tcl
${CMAKE_CURRENT_SOURCE_DIR}/${TName}.tcl
-A ${VTK_SOURCE_DIR}/Wrapping/Tcl
${${TName}_ARGS})
-D VTK_DATA_ROOT-NOTFOUND
-T ${VTK_TEST_OUTPUT_DIR}
-A ${VTK_SOURCE_DIR}/Wrapping/Tcl)
endif()
else()
message(FATAL_ERROR "VTK_TCL_EXE not set")
......
# Add tests, with the data
#
unset(tests)
if(VTK_DATA_ROOT)
list(APPEND tests
CSpline
KSpline
closedSplines
)
add_test_tcl(TestParametricFunctions Graphics)
endif()
foreach( tfile ${tests})
set(_test_args
${vtkTestingRendering_SOURCE_DIR}/rtImageTest.tcl
${CMAKE_CURRENT_SOURCE_DIR}/${tfile}.tcl
-D ${VTK_DATA_ROOT}
-T ${VTK_TEST_OUTPUT_DIR}
-V Baseline/Filtering/${tfile}.png
-A ${VTK_SOURCE_DIR}/Wrapping/Tcl)
add_test(NAME ${vtk-module}Tcl-${tfile}
COMMAND ${VTK_TCL_EXE} ${_test_args})
endforeach()
add_test_tcl(CSpline Filtering)
add_test_tcl(KSpline Filtering)
add_test_tcl(closedSplines Filtering)
......@@ -5,59 +5,21 @@ add_test(NAME ${vtk-module}Tcl-otherDataSetAttributes
${CMAKE_CURRENT_SOURCE_DIR}/otherDataSetAttributes.tcl
-A ${VTK_SOURCE_DIR}/Wrapping/Tcl)
# Tests with test images in Baseline/Filtering
#
unset(tests)
# Tests with images
if(VTK_DATA_ROOT)
set(tests
ImplicitSum
PerlinNoise
SelectionLoop
)
add_test_tcl(headBone Graphics)
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/Filtering/${tfile}.png
-A ${VTK_SOURCE_DIR}/Wrapping/Tcl)
endforeach()
# Tests with test images in Baseline/Graphics
#
unset(tests)
if(VTK_DATA_ROOT)
set(tests
headBone
LineIntersectQuadraticCells
quadricCut
scalarColors
scalarConn
TestConvexPointSet
TestQuadricClustering
TestStructuredGrid
)
endif()
add_test_tcl(ImplicitSum Filtering)
add_test_tcl(PerlinNoise Filtering)
add_test_tcl(SelectionLoop Filtering)
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
-A ${VTK_SOURCE_DIR}/Wrapping/Tcl)
endforeach()
add_test_tcl(LineIntersectQuadraticCells Graphics)
add_test_tcl(quadricCut Graphics)
add_test_tcl(scalarColors Graphics)
add_test_tcl(scalarConn Graphics)
add_test_tcl(TestConvexPointSet Graphics)
add_test_tcl(TestQuadricClustering Graphics)
add_test_tcl(TestStructuredGrid Graphics)
# Tests with test images in Baseline/Hybrid
#
add_test(NAME ${vtk-module}Tcl-TestICPTransform COMMAND ${VTK_TCL_EXE}
${vtkTestingRendering_SOURCE_DIR}/rtImageTest.tcl
${CMAKE_CURRENT_SOURCE_DIR}/TestICPTransform.tcl
-D ${VTK_DATA_ROOT}
-T ${VTK_TEST_OUTPUT_DIR}
-V Baseline/Hybrid/TestICPTransform.png
-A ${VTK_SOURCE_DIR}/Wrapping/Tcl)
add_test_tcl(TestICPTransform Hybrid)
unset(tests)
set(tests
TestAmoebaMinimizer
)
......
# Tests with test images in Baseline/Graphics
#
unset(tests)
if(VTK_DATA_ROOT)
set(tests
cylindrical
MatrixToTransform
spherical
)
add_test_tcl(cylindrical Graphics)
add_test_tcl(spherical Graphics)
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
-A ${VTK_SOURCE_DIR}/Wrapping/Tcl)
endforeach()
# Tests with test images in Baseline/Hybrid
#
unset(tests)
if(VTK_DATA_ROOT)
set(tests
TestThinPlateWarp
TestThinPlateWarp3D
)
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/Hybrid/${tfile}.png
-A ${VTK_SOURCE_DIR}/Wrapping/Tcl)
endforeach()
\ No newline at end of file
add_test_tcl(MatrixToTransform Graphics)
# Tests with test images in Baseline/Graphics
#
unset(tests)
if(VTK_DATA_ROOT)
set(tests
CellDataToPointData
Delaunay2D
Delaunay2DAlpha
Delaunay2DTransform
Delaunay3D
QuadricDecimation
StreamPolyData
TestGridSynchronizedTemplates3D
TestMarchingSquares
TestRectilinearSynchronizedTemplates
TestSynchronizedTemplates2D
TestSynchronizedTemplates3D
TestTriangleFilter
capCow
capSphere
clipArt
combStreamers
combStreamers2
constrainedDelaunay
contourCells
contourQuadraticCells
createBFont
cutLoop
deciFranFace
deciPlane
dispPlot
fieldToPolyData
fieldToRGrid
fieldToSGrid
fieldToUGrid
financialField
hull
mergeFilter
multipleComponentContour
multipleIso
polyConn
probe
probeComb
reverseNormals
skinOrder
smoothMeshOnMesh
stripF
teapotHulls
)
add_test_tcl(QuadricDecimation Graphics)
add_test_tcl(TestGridSynchronizedTemplates3D Graphics)
add_test_tcl(TestMarchingSquares Graphics)
add_test_tcl(TestRectilinearSynchronizedTemplates Graphics)
add_test_tcl(TestSynchronizedTemplates2D Graphics)
add_test_tcl(TestSynchronizedTemplates3D Graphics)
add_test_tcl(capCow Graphics)
add_test_tcl(clipArt Graphics)
add_test_tcl(combStreamers Graphics)
add_test_tcl(combStreamers2 Graphics)
add_test_tcl(createBFont Graphics)
add_test_tcl(deciFranFace Graphics)
add_test_tcl(dispPlot Graphics)
add_test_tcl(fieldToPolyData Graphics)
add_test_tcl(fieldToRGrid Graphics)
add_test_tcl(fieldToSGrid Graphics)
add_test_tcl(fieldToUGrid Graphics)
add_test_tcl(financialField Graphics)
add_test_tcl(mergeFilter Graphics)
add_test_tcl(multipleIso Graphics)
add_test_tcl(polyConn Graphics)
add_test_tcl(probe Graphics)
add_test_tcl(probeComb Graphics)
add_test_tcl(reverseNormals Graphics)
add_test_tcl(skinOrder Graphics)
add_test_tcl(smoothMeshOnMesh Graphics)
add_test_tcl(stripF Graphics)
add_test_tcl(teapotHulls Graphics)
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
)
endforeach()
add_test_tcl(CellDataToPointData Graphics)
add_test_tcl(Delaunay2D Graphics)
add_test_tcl(Delaunay2DAlpha Graphics)
add_test_tcl(Delaunay2DTransform Graphics)
add_test_tcl(Delaunay3D Graphics)
add_test_tcl(StreamPolyData Graphics)
add_test_tcl(TestTriangleFilter Graphics)
add_test_tcl(capSphere Graphics)
add_test_tcl(constrainedDelaunay Graphics)
add_test_tcl(contourCells Graphics)
add_test_tcl(contourQuadraticCells Graphics)
add_test_tcl(cutLoop Graphics)
add_test_tcl(deciPlane Graphics)
add_test_tcl(hull Graphics)
add_test_tcl(multipleComponentContour Graphics)
# Tests with test images in Baseline/Hybrid
#
unset(tests)
if(VTK_DATA_ROOT)
set(tests
MassProperties
financialField2
financialField3
)
add_test_tcl(MassProperties Hybrid)
add_test_tcl(financialField2 Hybrid)
add_test_tcl(financialField3 Hybrid)
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/Hybrid/${tfile}.png
)
endforeach()
# Tests with test images in Baseline/Graphics
#
unset(tests)
if(VTK_DATA_ROOT)
set(tests
ExtractEdgesQuadraticCells
ExtractTensors
extractPolyData
extractRectGrid
extractUGrid
extractVectors
)
add_test_tcl(extractRectGrid Graphics)
add_test_tcl(extractUGrid Graphics)
add_test_tcl(extractVectors Graphics)
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
)
endforeach()
add_test_tcl(ExtractEdgesQuadraticCells Graphics)
add_test_tcl(ExtractTensors Graphics)
add_test_tcl(extractPolyData Graphics)
# Tests with test images in Baseline/Graphics
#
unset(tests)
if(VTK_DATA_ROOT)
set(tests
Canny
OBBCylinder
TestCellDerivs
TestClipClosedSurface
TestClipOutline
TestCurvatures
TestDiscreteMarchingCubes
TestGraphLayoutFilter
TestMultiBlockStreamer
TestRandomAttributeGenerator
TestRectilinearGridToTetrahedra
TestSplineFilter
WarpScalarImage
WarpToImage
WarpVectorImage
blankGrid
clipComb
clipImage
clipQuadraticCells
clipVolume
clipVolume2
clipVolume3
contoursToSurface
cursor2D
cursor3D
dicer
edgePoints
mcubes
recursiveDC
spatialRepAll
splitVectors
streamTracer
subPixelPositionMin
testDataSetTriangleFilter
testDataSetTriangleFilter2
testReflect
warplens
)
add_test_tcl(Canny Graphics)
add_test_tcl(TestClipClosedSurface Graphics)
add_test_tcl(TestMultiBlockStreamer Graphics)
add_test_tcl(TestSplineFilter Graphics)
add_test_tcl(WarpVectorImage Graphics)
add_test_tcl(blankGrid Graphics)
add_test_tcl(clipComb Graphics)
add_test_tcl(clipImage Graphics)
add_test_tcl(cursor3D Graphics)
add_test_tcl(dicer Graphics)
add_test_tcl(edgePoints Graphics)
add_test_tcl(mcubes Graphics)
add_test_tcl(recursiveDC Graphics)
add_test_tcl(spatialRepAll Graphics)
add_test_tcl(splitVectors Graphics)
add_test_tcl(streamTracer Graphics)
add_test_tcl(testDataSetTriangleFilter Graphics)
add_test_tcl(testDataSetTriangleFilter2 Graphics)
add_test_tcl(warplens Graphics)
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
)
endforeach()
add_test_tcl(OBBCylinder Graphics)
add_test_tcl(TestCellDerivs Graphics)
add_test_tcl(TestClipOutline Graphics)
add_test_tcl(TestCurvatures Graphics)
add_test_tcl(TestDiscreteMarchingCubes Graphics)
add_test_tcl(TestGraphLayoutFilter Graphics)
add_test_tcl(TestRandomAttributeGenerator Graphics)
add_test_tcl(TestRectilinearGridToTetrahedra Graphics)
add_test_tcl(WarpScalarImage Graphics)
add_test_tcl(WarpToImage Graphics)
add_test_tcl(clipQuadraticCells Graphics)
add_test_tcl(clipVolume Graphics)
add_test_tcl(clipVolume2 Graphics)
add_test_tcl(clipVolume3 Graphics)
add_test_tcl(contoursToSurface Graphics)
add_test_tcl(cursor2D Graphics)
add_test_tcl(subPixelPositionMin Graphics)
add_test_tcl(testReflect Graphics)
# Tests with test images in Baseline/Hybrid
#
unset(tests)
if(VTK_DATA_ROOT)
set(tests
clipHex
clipPyramid
clipTet
clipWedge
)
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/Hybrid/${tfile}.png
)
endforeach()
add_test_tcl(clipHex Hybrid)
add_test_tcl(clipPyramid Hybrid)
add_test_tcl(clipTet Hybrid)
add_test_tcl(clipWedge Hybrid)
# Tests with test images in Baseline/Graphics
#
unset(tests)
if(VTK_DATA_ROOT)
set(tests
dataSetSurfaceFilter
geomFilter
officeStreamPoints
rectGrid
)
add_test_tcl(dataSetSurfaceFilter Graphics)
add_test_tcl(geomFilter Graphics)
add_test_tcl(officeStreamPoints Graphics)
add_test_tcl(rectGrid Graphics)
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
)
endforeach()
# Tests with test images in Baseline/Hybrid
#
unset(tests)
if(VTK_DATA_ROOT)
set(tests
3DMorph
TestFacetReader
TestGreedyTerrainDecimation
TestGridWarp3D
TestGridWarpCubic
TestGridWarpLinear
TestGridWarpNearest
TestImageStencilWithPolydata
TestPCA
TestProcrustes
TestProcrustesRigidCentroid
TestProjectedTerrainPath
WarpPolyData
appendImplicitModel
appendImplicitModelNoBounds
banana
depthSort
earth
imageToPolyData
largeImageOffset
largeImageParallel
)
add_test_tcl(TestFacetReader Hybrid)
add_test_tcl(TestGreedyTerrainDecimation Hybrid)
add_test_tcl(TestGridWarp3D Hybrid)
add_test_tcl(TestGridWarpCubic Hybrid)
add_test_tcl(TestGridWarpLinear Hybrid)
add_test_tcl(TestGridWarpNearest Hybrid)
add_test_tcl(TestImageStencilWithPolydata Hybrid)
add_test_tcl(TestProjectedTerrainPath Hybrid)
add_test_tcl(earth Hybrid)
add_test_tcl(imageToPolyData Hybrid)
add_test_tcl(largeImageOffset Hybrid)
add_test_tcl(largeImageParallel Hybrid)
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/Hybrid/${tfile}.png
)
endforeach()
add_test_tcl(3DMorph Hybrid)
add_test_tcl(TestPCA Hybrid)
add_test_tcl(TestProcrustes Hybrid)
add_test_tcl(TestProcrustesRigidCentroid Hybrid)
add_test_tcl(WarpPolyData Hybrid)
add_test_tcl(appendImplicitModel Hybrid)
add_test_tcl(appendImplicitModelNoBounds Hybrid)
add_test_tcl(banana Hybrid)
add_test_tcl(depthSort Hybrid)
# Tests with test images in Baseline/Hybrid
#
unset(tests)
if(VTK_DATA_ROOT)
set(tests
camera
)
add_test_tcl(TestImageMarchingCubes Graphics)
add_test_tcl(TestRibbonAndTube Graphics)
add_test_tcl(contour2DAll Graphics)
add_test_tcl(contour3DAll Graphics)
add_test_tcl(eleState Graphics)
add_test_tcl(sync3dAll Graphics)
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/Hybrid/${tfile}.png
)
endforeach()
# Tests with test images in Baseline/Graphics
#
unset(tests)
if(VTK_DATA_ROOT)
set(tests
contour3DAll
eleState
extrudeCopyCD
Hyper
HyperScalarBar
KlineBottle
schwarz
smoothCyl
smoothCyl2
subdividePointData
subDivideTetra
sync3dAll
TenEllip
TestBandedContourFilter
TestBoxFunction
TestFillHolesFilter
TestImageMarchingCubes
TestRibbonAndTube
TestRuledSurface
TestRuledSurface2
TestSpherePuzzle
TestSpherePuzzleArrows
contour2DAll
)
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
)
endforeach()
add_test_tcl(camera Hybrid)
add_test_tcl(extrudeCopyCD Graphics)
add_test_tcl(Hyper Graphics)
add_test_tcl(HyperScalarBar Graphics)
add_test_tcl(KlineBottle Graphics)
add_test_tcl(schwarz Graphics)
add_test_tcl(smoothCyl Graphics)
add_test_tcl(smoothCyl2 Graphics)
add_test_tcl(subdividePointData Graphics)
add_test_tcl(subDivideTetra Graphics)
add_test_tcl(TenEllip Graphics)
add_test_tcl(TestBandedContourFilter Graphics)
add_test_tcl(TestBoxFunction Graphics)
add_test_tcl(TestFillHolesFilter Graphics)
add_test_tcl(TestRuledSurface Graphics)
add_test_tcl(TestRuledSurface2 Graphics)
add_test_tcl(TestSpherePuzzle Graphics)
add_test_tcl(TestSpherePuzzleArrows Graphics)