mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Replace if/then with string parameter
This commit is contained in:
parent
95c641559d
commit
c5ce6cb96b
@ -289,6 +289,12 @@ vtkm_unit_tests but not in its test dependencies. Add test dependencies to \
|
|||||||
list(GET per_device_timeout ${index} timeout)
|
list(GET per_device_timeout ${index} timeout)
|
||||||
list(GET per_device_serial ${index} run_serial)
|
list(GET per_device_serial ${index} run_serial)
|
||||||
|
|
||||||
|
# If set, remove the VTK-m specified timeouts for CTest
|
||||||
|
set(EXTRA_ARGS)
|
||||||
|
if (NOT VTKm_OVERRIDE_CTEST_TIMEOUT)
|
||||||
|
list(APPEND EXTRA_ARGS TIMEOUT ${timeout})
|
||||||
|
endif()
|
||||||
|
|
||||||
foreach (test ${VTKm_UT_SOURCES} ${VTKm_UT_DEVICE_SOURCES})
|
foreach (test ${VTKm_UT_SOURCES} ${VTKm_UT_DEVICE_SOURCES})
|
||||||
get_filename_component(tname ${test} NAME_WE)
|
get_filename_component(tname ${test} NAME_WE)
|
||||||
if(VTKm_UT_MPI)
|
if(VTKm_UT_MPI)
|
||||||
@ -298,54 +304,34 @@ vtkm_unit_tests but not in its test dependencies. Add test dependencies to \
|
|||||||
$<TARGET_FILE:${test_prog}_mpi> ${tname} ${device_command_line_argument}
|
$<TARGET_FILE:${test_prog}_mpi> ${tname} ${device_command_line_argument}
|
||||||
${vtkm_default_test_log_level} ${VTKm_UT_TEST_ARGS} ${MPIEXEC_POSTFLAGS}
|
${vtkm_default_test_log_level} ${VTKm_UT_TEST_ARGS} ${MPIEXEC_POSTFLAGS}
|
||||||
)
|
)
|
||||||
if (VTKm_OVERRIDE_CTEST_TIMEOUT)
|
set_tests_properties("${tname}${upper_backend}_mpi" PROPERTIES
|
||||||
set_tests_properties("${tname}${upper_backend}_mpi" PROPERTIES
|
LABELS "${upper_backend};${VTKm_UT_LABEL}"
|
||||||
LABELS "${upper_backend};${VTKm_UT_LABEL}"
|
${EXTRA_ARGS}
|
||||||
RUN_SERIAL ${run_serial}
|
RUN_SERIAL ${run_serial}
|
||||||
FAIL_REGULAR_EXPRESSION "runtime error")
|
FAIL_REGULAR_EXPRESSION "runtime error")
|
||||||
else()
|
|
||||||
set_tests_properties("${tname}${upper_backend}_mpi" PROPERTIES
|
|
||||||
LABELS "${upper_backend};${VTKm_UT_LABEL}"
|
|
||||||
TIMEOUT ${timeout}
|
|
||||||
RUN_SERIAL ${run_serial}
|
|
||||||
FAIL_REGULAR_EXPRESSION "runtime error")
|
|
||||||
endif() # VTKm_OVERRIDE_CTEST_TIMEOUT
|
|
||||||
endif() # VTKm_ENABLE_MPI
|
endif() # VTKm_ENABLE_MPI
|
||||||
if ((NOT VTKm_ENABLE_MPI) OR VTKm_ENABLE_DIY_NOMPI)
|
if ((NOT VTKm_ENABLE_MPI) OR VTKm_ENABLE_DIY_NOMPI)
|
||||||
add_test(NAME ${tname}${upper_backend}_nompi
|
add_test(NAME ${tname}${upper_backend}_nompi
|
||||||
COMMAND ${test_prog}_nompi ${tname} ${device_command_line_argument}
|
COMMAND ${test_prog}_nompi ${tname} ${device_command_line_argument}
|
||||||
${vtkm_default_test_log_level} ${VTKm_UT_TEST_ARGS}
|
${vtkm_default_test_log_level} ${VTKm_UT_TEST_ARGS}
|
||||||
)
|
)
|
||||||
if (VTKm_OVERRIDE_CTEST_TIMEOUT)
|
set_tests_properties("${tname}${upper_backend}_nompi" PROPERTIES
|
||||||
set_tests_properties("${tname}${upper_backend}_nompi" PROPERTIES
|
LABELS "${upper_backend};${VTKm_UT_LABEL}"
|
||||||
LABELS "${upper_backend};${VTKm_UT_LABEL}"
|
${EXTRA_ARGS}
|
||||||
RUN_SERIAL ${run_serial}
|
RUN_SERIAL ${run_serial}
|
||||||
FAIL_REGULAR_EXPRESSION "runtime error")
|
FAIL_REGULAR_EXPRESSION "runtime error")
|
||||||
else()
|
|
||||||
set_tests_properties("${tname}${upper_backend}_nompi" PROPERTIES
|
|
||||||
LABELS "${upper_backend};${VTKm_UT_LABEL}"
|
|
||||||
TIMEOUT ${timeout}
|
|
||||||
RUN_SERIAL ${run_serial}
|
|
||||||
FAIL_REGULAR_EXPRESSION "runtime error")
|
|
||||||
endif() #VTKm_OVERRIDE_CTEST_TIMEOUT
|
|
||||||
endif() # VTKm_ENABLE_DIY_NOMPI
|
endif() # VTKm_ENABLE_DIY_NOMPI
|
||||||
else() # VTKm_UT_MPI
|
else() # VTKm_UT_MPI
|
||||||
add_test(NAME ${tname}${upper_backend}
|
add_test(NAME ${tname}${upper_backend}
|
||||||
COMMAND ${test_prog} ${tname} ${device_command_line_argument}
|
COMMAND ${test_prog} ${tname} ${device_command_line_argument}
|
||||||
${vtkm_default_test_log_level} ${VTKm_UT_TEST_ARGS}
|
${vtkm_default_test_log_level} ${VTKm_UT_TEST_ARGS}
|
||||||
)
|
)
|
||||||
if (VTKm_OVERRIDE_CTEST_TIMEOUT)
|
set_tests_properties("${tname}${upper_backend}" PROPERTIES
|
||||||
set_tests_properties("${tname}${upper_backend}" PROPERTIES
|
LABELS "${upper_backend};${VTKm_UT_LABEL}"
|
||||||
LABELS "${upper_backend};${VTKm_UT_LABEL}"
|
${EXTRA_ARGS}
|
||||||
RUN_SERIAL ${run_serial}
|
RUN_SERIAL ${run_serial}
|
||||||
FAIL_REGULAR_EXPRESSION "runtime error")
|
FAIL_REGULAR_EXPRESSION "runtime error")
|
||||||
else()
|
|
||||||
set_tests_properties("${tname}${upper_backend}" PROPERTIES
|
|
||||||
LABELS "${upper_backend};${VTKm_UT_LABEL}"
|
|
||||||
TIMEOUT ${timeout}
|
|
||||||
RUN_SERIAL ${run_serial}
|
|
||||||
FAIL_REGULAR_EXPRESSION "runtime error")
|
|
||||||
endif() #VTKm_OVERRIDE_CTEST_TIMEOUT
|
|
||||||
endif() # VTKm_UT_MPI
|
endif() # VTKm_UT_MPI
|
||||||
endforeach()
|
endforeach()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
Loading…
Reference in New Issue
Block a user