Skip to content
Snippets Groups Projects
Commit 4d15a6c6 authored by Chris Harris's avatar Chris Harris Committed by Code Review
Browse files

Merge topic 'Cxx-Tests' into master

341ea97e Making sure that the TestingExternal projects can be build with install tree
869c2136 Adding missing vtkObjectFactory.h to different tests.
7c4d5970 Moving testing macros into one single file.
5ec1ad43 Moving vtk_tests() macro and add_test_mpi() macto into seperate cmake files
c2c770ac Adding Rendering/Parallel cxx tests + test dependencies.
549f3cca Adding Filters/Parallel cxx tests + dependencies.
1105a4d3 Adding IO/ParallelLSDyna/ cxx tests and dependencies.
f9e0ef9a Some tests may belong in Python direcory.
09f6fb60 Adding Parallel/Core testing +dependencies
b38a81df Adding IO/ParallelExodus cxx tests + dependencies
c1dde9a1 Moving TestExodusImplicitArrays.cxx into IO/ParallelExodus/Testing/Cxx
86a0da26 Adding Filters/ReebGraph Cxx tests and dependencies.
048c2db1 Adding Filters/Generic cxx tests.
91f446ee Making new module Testing/GenericBridge
7a7a94aa Adding Cxx tests for IO/Parallel and fixing dependencies.
b1fb7f62 Making MPI explicit in the test names which use MPI.
54fbbe5b Adding vtk_tests() declarative macro.
75684e97 Adding Infovis/Parallel/ Tests + test dependencies.
42b14863 Bringing Filters/ParallelStatistics tests to use vtk_test_mpi() macro.
ea3b4317 Bringing Filters/ParallelGeometry tests to use add_test_mpi macro.
b8e00360 Adding Parallel/MPI/Testing/Cxx/CMakeLists.txt
b9293d04 Implement add_test_mpi macro.
parents 237b4312 341ea97e
No related branches found
No related tags found
No related merge requests found
Showing
with 112 additions and 55 deletions
......@@ -37,6 +37,9 @@ endif()
# Load module interface macros.
include("@VTK_CONFIG_MODULE_API_FILE@")
# Load testing interface macros.
include("@VTK_CONFIG_TESTING_MACROS_FILE@")
# Compute set of requested modules.
if(VTK_FIND_COMPONENTS)
# Specific modules requested by find_package(VTK).
......
......@@ -274,6 +274,8 @@ set(VTK_CONFIG_CMAKE_DIR "${VTK_SOURCE_DIR}/CMake")
set(VTK_CONFIG_TARGETS_CONDITION " AND NOT VTK_BINARY_DIR")
set(VTK_CONFIG_TARGETS_FILE "${VTK_BINARY_DIR}/VTKTargets.cmake")
set(VTK_CONFIG_MODULE_API_FILE "${VTK_SOURCE_DIR}/CMake/vtkModuleAPI.cmake")
set(VTK_CONFIG_TESTING_MACROS_FILE "${VTK_SOURCE_DIR}/CMake/vtkTestingMacros.cmake")
# Target used to ensure VTKConfig is load just once
set(VTK_COMMON_TARGET vtkCommonCore)
configure_file(CMake/VTKConfig.cmake.in VTKConfig.cmake @ONLY)
......
# -----------------------------------------------------------------------------
# Macro vtk_tests() takes a list of cxx files which will be driven by the modules
# test driver. This helps reduce a lot of boiler place code in each module
macro(vtk_tests)
create_test_sourcelist(Tests ${vtk-module}CxxTests.cxx
${ARGV}
EXTRA_INCLUDE vtkTestDriver.h)
vtk_module_test_executable(${vtk-module}CxxTests ${Tests})
set(TestsToRun ${Tests})
list(REMOVE_ITEM TestsToRun ${vtk-module}CxxTests.cxx)
# Add all the executables
foreach(test ${TestsToRun})
get_filename_component(TName ${test} NAME_WE)
if(VTK_DATA_ROOT)
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName}
-D ${VTK_DATA_ROOT}
-T ${VTK_TEST_OUTPUT_DIR}
-V Baseline/${vtk-module}/${TName}.png)
else()
add_test(NAME ${vtk-module}Cxx-${TName}
COMMAND ${vtk-module}CxxTests ${TName}
${${TName}_ARGS})
endif()
endforeach()
endmacro(vtk_tests)
# -----------------------------------------------------------------------------
# add_test_mpi macro take one or more files. It uses the files name for the name
# of the test. The test will be run using MPI.
macro (add_test_mpi fileName)
get_filename_component(name ${fileName} NAME_WE)
vtk_module_test_executable(
${name}
${name}.cxx
${ARGN})
add_test(
NAME ${vtk-module}Cxx-MPI-${name}
COMMAND ${VTK_MPIRUN_EXE}
${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} ${VTK_MPI_MAX_NUMPROCS}
${VTK_MPI_PREFLAGS}
$<TARGET_FILE:${name}>
${VTK_MPI_POSTFLAGS})
endmacro()
vtk_tests(
TestGenericClip.cxx
TestGenericContourFilter.cxx
TestGenericCutter.cxx
TestGenericDataSetTessellator.cxx
TestGenericGeometryFilter.cxx
TestGenericGlyph3DFilter.cxx
TestGenericProbeFilter.cxx
TestGenericStreamTracer.cxx
otherCreation.cxx)
......@@ -4,4 +4,9 @@ vtk_module(vtkFiltersGeneric
DEPENDS
vtkFiltersCore
vtkFiltersSources
)
TEST_DEPENDS
vtkRenderingOpenGL
vtkFiltersModeling
vtkRenderingLabel
vtkTestingRendering
vtkTestingGenericBridge)
add_test_mpi(DistributedData.cxx)
add_test_mpi(DistributedDataRenderPass.cxx)
add_test_mpi(TransmitImageData.cxx)
add_test_mpi(TransmitImageDataRenderPass.cxx)
add_test_mpi(TransmitRectilinearGrid.cxx)
add_test_mpi(TransmitStructuredGrid.cxx)
......@@ -23,6 +23,7 @@
// To run fast redistribution: SetUseMinimalMemoryOff() (Default)
// To run memory conserving code instead: SetUseMinimalMemoryOn()
#include "vtkObjectFactory.h"
#include "vtkTestUtilities.h"
#include "vtkRegressionTestImage.h"
#include "vtkCompositeRenderManager.h"
......
......@@ -23,6 +23,7 @@
// To run fast redistribution: SetUseMinimalMemoryOff() (Default)
// To run memory conserving code instead: SetUseMinimalMemoryOn()
#include "vtkObjectFactory.h"
#include "vtkTestUtilities.h"
#include "vtkRegressionTestImage.h"
#include "vtkCompositeRenderManager.h"
......
......@@ -18,6 +18,7 @@
/*
** This test only builds if MPI is in use
*/
#include "vtkObjectFactory.h"
#include <mpi.h>
#include "vtkMPICommunicator.h"
......
......@@ -18,6 +18,7 @@
/*
** This test only builds if MPI is in use
*/
#include "vtkObjectFactory.h"
#include <mpi.h>
#include "vtkMPICommunicator.h"
......
......@@ -18,6 +18,7 @@
/*
** This test only builds if MPI is in use
*/
#include "vtkObjectFactory.h"
#include <mpi.h>
#include "vtkMPICommunicator.h"
......
......@@ -18,6 +18,7 @@
/*
** This test only builds if MPI is in use
*/
#include "vtkObjectFactory.h"
#include <mpi.h>
#include "vtkMPICommunicator.h"
......
......@@ -6,4 +6,11 @@ vtk_module(vtkFiltersParallel
vtkFiltersExtraction
vtkRenderingCore
vtkFiltersModeling
TEST_DEPENDS
vtkParallelMPI
vtkTestingRendering
vtkRenderingOpenGL
vtkRenderingParallel
vtkFiltersParallelMPI
vtkFiltersParallelImaging
)
set(MyTests
TestPStructuredGridConnectivity.cxx
TestPStructuredGridGhostDataGenerator.cxx
TestPUniformGridGhostDataGenerator.cxx
)
foreach(test ${MyTests})
get_filename_component(TName ${test} NAME_WE)
vtk_module_test_executable(${TName} ${test})
add_test(
NAME ${vtk-module}Cxx-${TName}
COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS}
${MPIEXEC_PREFLAGS} $<TARGET_FILE:${TName}> ${VTK_MPI_POSTFLAGS}
)
endforeach()
add_test_mpi(TestPStructuredGridConnectivity.cxx)
add_test_mpi(TestPStructuredGridGhostDataGenerator.cxx)
add_test_mpi(TestPUniformGridGhostDataGenerator.cxx)
find_package(MPI REQUIRED)
include_directories(${MPI_INCLUDE_PATH})
# Build TestRandomPKContingencyStatisticsMPI
vtk_module_test_executable(TestRandomPContingencyStatisticsMPI TestRandomPContingencyStatisticsMPI.cxx)
# Add test
add_test(NAME ${vtk-module}Cxx-TestRandomPContingencyStatisticsMPI
COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS}
$<TARGET_FILE:TestRandomPContingencyStatisticsMPI>
${VTK_MPI_POSTFLAGS})
# Build TestRandomPKMeansStatisticsMPI
vtk_module_test_executable(TestRandomPKMeansStatisticsMPI TestRandomPKMeansStatisticsMPI.cxx)
# Add test
add_test(NAME ${vtk-module}Cxx-TestRandomPKMeansStatisticsMPI
COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS}
$<TARGET_FILE:TestRandomPKMeansStatisticsMPI>
${VTK_MPI_POSTFLAGS})
# Build TestRandomPMomentStatisticsMPI
vtk_module_test_executable(TestRandomPMomentStatisticsMPI TestRandomPMomentStatisticsMPI.cxx)
# Add test
add_test(NAME ${vtk-module}Cxx-TestRandomPMomentStatisticsMPI
COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS}
$<TARGET_FILE:TestRandomPMomentStatisticsMPI>
${VTK_MPI_POSTFLAGS})
# Build TestRandomPOrderStatisticsMPI
vtk_module_test_executable(TestRandomPOrderStatisticsMPI TestRandomPOrderStatisticsMPI.cxx)
# Add test
add_test(NAME ${vtk-module}Cxx-TestRandomPOrderStatisticsMPI
COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 2 ${MPIEXEC_PREFLAGS}
$<TARGET_FILE:TestRandomPOrderStatisticsMPI>
${VTK_MPI_POSTFLAGS})
# Build TestRealDataPDescriptiveStatisticsMPI
vtk_module_test_executable(TestRealDataPDescriptiveStatisticsMPI TestRealDataPDescriptiveStatisticsMPI.cxx)
add_test_mpi(TestRandomPContingencyStatisticsMPI.cxx)
add_test_mpi(TestRandomPKMeansStatisticsMPI.cxx)
add_test_mpi(TestRandomPMomentStatisticsMPI.cxx)
add_test_mpi(TestRandomPOrderStatisticsMPI.cxx)
# # -----------------------------------------------------------------------------
# # The following file was being compiled but never added as a testin older
# # vtk. Why is that so?
# add_test_mpi(TestRealDataPDescriptiveStatisticsMPI)
vtk_tests(
TestReebGraph.cxx)
vtk_module(vtkFiltersReebGraph
DEPENDS
vtkFiltersCore
TEST_DEPENDS
vtkRenderingOpenGL
vtkTestingRendering
)
vtk_tests(TestWindBladeReader.cxx)
# Parallel tests
add_test_mpi(PSLACReaderLinear.cxx)
add_test_mpi(PSLACReaderQuadratic.cxx)
......@@ -7,8 +7,8 @@ vtk_module(vtkIOParallel
vtkIONetCDF
vtkexodusII
TEST_DEPENDS
vtkParallelMPI
vtkRenderingParallel
vtkTestingCore
vtkTestingRendering
vtkInteractionStyle
vtkRenderingOpenGL
)
vtk_tests(TestExodusImplicitArrays.cxx)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment