Supply default logging level of INFO for tests

This commit is contained in:
nadavi 2019-08-14 16:52:41 -06:00
parent f9a1afee69
commit d2d98dc5e0
2 changed files with 20 additions and 1 deletions

@ -97,6 +97,19 @@ function(vtkm_unit_tests)
set(test_prog "UnitTests_${kit}")
endif()
# For Testing Purposes, we will set the default logging level to INFO
if(VTKm_UT_TEST_ARGS)
if(test_name AND "x${test_name}" MATCHES "^x([^,]*),(.*)$")
list(FIND VTKm_UT_TEST_ARGS "-v" index)
if(index EQUAL -1)
list(APPEND VTKm_UT_TEST_ARGS "-v" "0")
else()
message(STATUS "Test manually supplied the logging level, not overriding")
endif()
else()
list(APPEND VTKm_UT_TEST_ARGS "-v" "0")
endif()
if(VTKm_UT_MPI)
# for MPI tests, suffix test name and add MPI_Init/MPI_Finalize calls.
set(test_prog "${test_prog}_mpi")

@ -83,7 +83,6 @@ vtkm_option(VTKm_ENABLE_TBB "Enable TBB support" OFF)
vtkm_option(VTKm_ENABLE_OPENMP "Enable OpenMP support" OFF)
vtkm_option(VTKm_ENABLE_RENDERING "Enable rendering library" ON)
vtkm_option(VTKm_ENABLE_BENCHMARKS "Enable VTKm Benchmarking" OFF)
vtkm_option(VTKm_ENABLE_LOGGING "Enable VTKm Logging" ON)
vtkm_option(VTKm_ENABLE_MPI "Enable MPI support" OFF)
vtkm_option(VTKm_ENABLE_DOCUMENTATION "Build Doxygen documentation" OFF)
vtkm_option(VTKm_ENABLE_EXAMPLES "Build examples" OFF)
@ -98,6 +97,12 @@ endif()
vtkm_option(VTKm_USE_DOUBLE_PRECISION "Use double precision for floating point calculations" OFF)
vtkm_option(VTKm_USE_64BIT_IDS "Use 64-bit indices." ON)
# VTK-m will turn on logging by default, but will set the default
# logging level to WARN. This option should not be visible by default
# in the GUI, as ERROR and WARN level logging should not interfere
# with the performance of vtk-m
vtkm_option(VTKm_ENABLE_LOGGING "Enable VTKm Logging" ON)
# When VTK-m is embedded into larger projects they may desire to turn off
# VTK-m internal assert checks when in debug mode to improve debug runtime
# performance.
@ -124,6 +129,7 @@ set(VTKm_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
vtkm_option(VTKm_ENABLE_DEVELOPER_FLAGS "Enable compiler flags that are useful while developing VTK-m" ON)
mark_as_advanced(
VTKm_ENABLE_LOGGING
VTKm_NO_ASSERT
VTKm_INSTALL_ONLY_LIBRARIES
VTKm_USE_DEFAULT_SYMBOL_VISIBILITY