mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
Add cmake flag to override default ctest timeouts
The current ctest timeout in VTK-m are fine for the CI, but are too long for develoment when a test is hanging on a queued node. This commit allows a developer to turn off the majority of the hard coded timeout values which allows them to set them at the ctest command-line.
This commit is contained in:
parent
bdfe192c19
commit
95c641559d
@ -298,34 +298,54 @@ vtkm_unit_tests but not in its test dependencies. Add test dependencies to \
|
||||
$<TARGET_FILE:${test_prog}_mpi> ${tname} ${device_command_line_argument}
|
||||
${vtkm_default_test_log_level} ${VTKm_UT_TEST_ARGS} ${MPIEXEC_POSTFLAGS}
|
||||
)
|
||||
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")
|
||||
if (VTKm_OVERRIDE_CTEST_TIMEOUT)
|
||||
set_tests_properties("${tname}${upper_backend}_mpi" PROPERTIES
|
||||
LABELS "${upper_backend};${VTKm_UT_LABEL}"
|
||||
RUN_SERIAL ${run_serial}
|
||||
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
|
||||
if ((NOT VTKm_ENABLE_MPI) OR VTKm_ENABLE_DIY_NOMPI)
|
||||
add_test(NAME ${tname}${upper_backend}_nompi
|
||||
COMMAND ${test_prog}_nompi ${tname} ${device_command_line_argument}
|
||||
${vtkm_default_test_log_level} ${VTKm_UT_TEST_ARGS}
|
||||
)
|
||||
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")
|
||||
|
||||
if (VTKm_OVERRIDE_CTEST_TIMEOUT)
|
||||
set_tests_properties("${tname}${upper_backend}_nompi" PROPERTIES
|
||||
LABELS "${upper_backend};${VTKm_UT_LABEL}"
|
||||
RUN_SERIAL ${run_serial}
|
||||
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
|
||||
else() # VTKm_UT_MPI
|
||||
add_test(NAME ${tname}${upper_backend}
|
||||
COMMAND ${test_prog} ${tname} ${device_command_line_argument}
|
||||
${vtkm_default_test_log_level} ${VTKm_UT_TEST_ARGS}
|
||||
)
|
||||
set_tests_properties("${tname}${upper_backend}" PROPERTIES
|
||||
LABELS "${upper_backend};${VTKm_UT_LABEL}"
|
||||
TIMEOUT ${timeout}
|
||||
RUN_SERIAL ${run_serial}
|
||||
FAIL_REGULAR_EXPRESSION "runtime error")
|
||||
if (VTKm_OVERRIDE_CTEST_TIMEOUT)
|
||||
set_tests_properties("${tname}${upper_backend}" PROPERTIES
|
||||
LABELS "${upper_backend};${VTKm_UT_LABEL}"
|
||||
RUN_SERIAL ${run_serial}
|
||||
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
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
@ -181,6 +181,11 @@ vtkm_option(VTKm_NO_INSTALL_README_LICENSE "disable the installation of README a
|
||||
# Allow VTK to turn off these symlinks for its wheel distribution.
|
||||
vtkm_option(VTKm_SKIP_LIBRARY_VERSIONS "Skip versioning VTK-m libraries" OFF)
|
||||
|
||||
# During development, running unit tests with the default values can be too lengthy.
|
||||
# Allow for the developer to skip the majority of the default values and control them
|
||||
# through ctest's command-line. Doesn't affect CI unless enabled.
|
||||
vtkm_option(VTKm_OVERRIDE_CTEST_TIMEOUT "Disable default ctest timeout" OFF)
|
||||
|
||||
mark_as_advanced(
|
||||
VTKm_ENABLE_LOGGING
|
||||
VTKm_NO_ASSERT
|
||||
@ -191,6 +196,7 @@ mark_as_advanced(
|
||||
VTKm_ENABLE_DEVELOPER_FLAGS
|
||||
VTKm_NO_INSTALL_README_LICENSE
|
||||
VTKm_SKIP_LIBRARY_VERSIONS
|
||||
VTKm_OVERRIDE_CTEST_TIMEOUT
|
||||
)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user