Commit 5b9cbfd0 authored by Brad King's avatar Brad King
Browse files

Fix mpi test executable path for Makefile generators

Commit 892cc8e5 (when mpi based tests are run on windows, the mpiexe
path-to-exe does not include the debug/release part of the path and
hence these tests do not run - this fix should resolve it, 2010-03-19)
hard-coded the configuration name into the path to executables
referenced in MPI test command lines.  Do this only for generators that
have multiple configuration types (VS IDE, Xcode).  For Makefile
generators the executable path does not include the configuration type.

This fixes tests that pass the executable location to mpirun when CTest
is invoked with an explicit configuration, as in "ctest -C Debug".
parent d876f81e
......@@ -182,6 +182,11 @@ ENDIF("${CMAKE_CFG_INTDIR}" STREQUAL ".")
#-----------------------------------------------------------------------------
# Where the cxx tests are, for use in ADD_TEST
SET(CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH})
IF(CMAKE_CONFIGURATION_TYPES)
SET(CXX_TEST_CONFIG \${CTEST_CONFIGURATION_TYPE})
ELSE()
SET(CXX_TEST_CONFIG .)
ENDIF()
#-----------------------------------------------------------------------------
# Configure install locations. This allows parent projects to modify
......
......@@ -97,7 +97,7 @@ IF (VTK_USE_RENDERING AND VTK_USE_DISPLAY)
ADD_TEST(TestPBGLAlgorithms
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} ${VTK_MPI_MAX_NUMPROCS}
${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TestPBGLAlgorithms
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TestPBGLAlgorithms
${VTK_MPI_POSTFLAGS})
ENDIF (VTK_USE_PARALLEL_BGL)
ENDIF (VTK_USE_BOOST)
......@@ -138,28 +138,28 @@ IF (VTK_USE_RENDERING AND VTK_USE_DISPLAY)
ADD_TEST(TestParallelRandomStatisticsMPI
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} ${VTK_MPI_MAX_NUMPROCS}
${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TestParallelRandomStatisticsMPI
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TestParallelRandomStatisticsMPI
${VTK_MPI_POSTFLAGS}
)
ADD_TEST(TestRandomPContingencyStatisticsMPI
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} ${VTK_MPI_MAX_NUMPROCS}
${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TestRandomPContingencyStatisticsMPI
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TestRandomPContingencyStatisticsMPI
${VTK_MPI_POSTFLAGS}
)
ADD_TEST(TestRandomPOrderStatisticsMPI
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} ${VTK_MPI_MAX_NUMPROCS}
${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TestRandomPOrderStatisticsMPI
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TestRandomPOrderStatisticsMPI
${VTK_MPI_POSTFLAGS}
)
ADD_TEST(TestParallelKMeansStatisticsMPI
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} ${VTK_MPI_MAX_NUMPROCS}
${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TestParallelKMeansStatisticsMPI
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TestParallelKMeansStatisticsMPI
${VTK_MPI_POSTFLAGS}
)
ENDIF (VTK_MPIRUN_EXE)
......
......@@ -125,12 +125,12 @@ IF(VTK_USE_DISPLAY AND VTK_USE_RENDERING)
ADD_TEST(MPIController
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} ${VTK_MPI_MAX_NUMPROCS}
${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TestMPIController
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TestMPIController
${VTK_MPI_POSTFLAGS}
)
ADD_TEST(TestProcess
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TestProcess
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TestProcess
${VTK_MPI_POSTFLAGS})
......@@ -146,7 +146,7 @@ IF(VTK_USE_DISPLAY AND VTK_USE_RENDERING)
# I vote we just get rid of it altogether.
ADD_TEST(GenericCommunicator-image
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/GenericCommunicator
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/GenericCommunicator
${VTK_MPI_POSTFLAGS})
IF (VTK_USE_PARALLEL_BGL)
......@@ -269,56 +269,56 @@ IF(VTK_USE_DISPLAY AND VTK_USE_RENDERING)
IF(VTK_MPI_MAX_NUMPROCS GREATER 1)
ADD_TEST(ParallelIso-image
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/ParallelIsoTest
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/ParallelIsoTest
-D ${VTK_DATA_ROOT}
-T ${VTK_BINARY_DIR}/Testing/Temporary
-V Baseline/Parallel/ParallelIso.cxx.png
${VTK_MPI_POSTFLAGS})
ADD_TEST(TestPStream-image
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TestPStream
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TestPStream
-D ${VTK_DATA_ROOT}
-T ${VTK_BINARY_DIR}/Testing/Temporary
-V Baseline/Parallel/TestPStream.cxx.png
${VTK_MPI_POSTFLAGS})
ADD_TEST(DistributedData-image
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/DistributedData
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/DistributedData
-D ${VTK_DATA_ROOT}
-T ${VTK_BINARY_DIR}/Testing/Temporary
-V Baseline/Parallel/DistributedData.cxx.png
${VTK_MPI_POSTFLAGS})
ADD_TEST(DistributedDataRenderPass-image
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/DistributedDataRenderPass
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/DistributedDataRenderPass
-D ${VTK_DATA_ROOT}
-T ${VTK_BINARY_DIR}/Testing/Temporary
-V Baseline/Parallel/DistributedDataRenderPass.cxx.png
${VTK_MPI_POSTFLAGS})
ADD_TEST(TransmitImageData-image
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TransmitImageData
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TransmitImageData
-D ${VTK_DATA_ROOT}
-T ${VTK_BINARY_DIR}/Testing/Temporary
-V Baseline/Parallel/TransmitImageData.cxx.png
${VTK_MPI_POSTFLAGS})
ADD_TEST(TransmitImageDataRenderPass-image
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TransmitImageDataRenderPass
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TransmitImageDataRenderPass
-D ${VTK_DATA_ROOT}
-T ${VTK_BINARY_DIR}/Testing/Temporary
-V Baseline/Parallel/TransmitImageDataRenderPass.cxx.png
${VTK_MPI_POSTFLAGS})
ADD_TEST(TestPShadowMapPass-image
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TestPShadowMapPass
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TestPShadowMapPass
-D ${VTK_DATA_ROOT}
-T ${VTK_BINARY_DIR}/Testing/Temporary
-V Baseline/Parallel/TestPShadowMapPass.cxx.png
${VTK_MPI_POSTFLAGS})
ADD_TEST(TestDistributedDataShadowMapPass-image
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TestDistributedDataShadowMapPass
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TestDistributedDataShadowMapPass
-D ${VTK_DATA_ROOT}
-T ${VTK_BINARY_DIR}/Testing/Temporary
-V Baseline/Parallel/TestDistributedDataShadowMapPass.cxx.png
......@@ -326,7 +326,7 @@ IF(VTK_USE_DISPLAY AND VTK_USE_RENDERING)
ADD_TEST(TestPCompositeZPass-image
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TestPCompositeZPass
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TestPCompositeZPass
-D ${VTK_DATA_ROOT}
-T ${VTK_BINARY_DIR}/Testing/Temporary
-V Baseline/Parallel/TestPCompositeZPass.cxx.png
......@@ -334,7 +334,7 @@ IF(VTK_USE_DISPLAY AND VTK_USE_RENDERING)
ADD_TEST(TestDistributedDataCompositeZPass-image
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TestDistributedDataCompositeZPass
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TestDistributedDataCompositeZPass
-D ${VTK_DATA_ROOT}
-T ${VTK_BINARY_DIR}/Testing/Temporary
-V Baseline/Parallel/TestDistributedDataCompositeZPass.cxx.png
......@@ -342,14 +342,14 @@ IF(VTK_USE_DISPLAY AND VTK_USE_RENDERING)
ADD_TEST(TransmitRectilinearGrid-image
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TransmitRectilinearGrid
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TransmitRectilinearGrid
-D ${VTK_DATA_ROOT}
-T ${VTK_BINARY_DIR}/Testing/Temporary
-V Baseline/Parallel/TransmitRectilinearGrid.cxx.png
${VTK_MPI_POSTFLAGS})
ADD_TEST(TransmitStructuredGrid-image
${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} ${VTK_MPI_NUMPROC_FLAG} 2 ${VTK_MPI_PREFLAGS}
${CXX_TEST_PATH}/\${CTEST_CONFIGURATION_TYPE}/TransmitStructuredGrid
${CXX_TEST_PATH}/${CXX_TEST_CONFIG}/TransmitStructuredGrid
-D ${VTK_DATA_ROOT}
-T ${VTK_BINARY_DIR}/Testing/Tempor2ary
-V Baseline/Parallel/TransmitStructuredGrid.cxx.png
......
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