Label tests which exercise a given Device Adapter

This allows developers an easy way to run all OpenMP tests
This commit is contained in:
Robert Maynard 2019-09-13 15:14:56 -04:00
parent cf6c85735a
commit 5c56ff945f
9 changed files with 21 additions and 9 deletions

@ -29,6 +29,8 @@ include(VTKmWrappers)
#
# [DEFINES] : extra defines that need to be set for all unit test sources
#
# [LABEL] : CTest Label to associate to this set of tests
#
# [TEST_ARGS] : arguments that should be passed on the command line to the
# test executable
#
@ -45,7 +47,7 @@ function(vtkm_unit_tests)
set(options)
set(global_options ${options} MPI ALL_BACKENDS)
set(oneValueArgs BACKEND NAME)
set(oneValueArgs BACKEND NAME LABEL)
set(multiValueArgs SOURCES LIBRARIES DEFINES TEST_ARGS)
cmake_parse_arguments(VTKm_UT
"${global_options}" "${oneValueArgs}" "${multiValueArgs}"
@ -170,6 +172,7 @@ function(vtkm_unit_tests)
endif()
set_tests_properties("${tname}${upper_backend}" PROPERTIES
LABELS "${upper_backend};${VTKm_UT_LABEL}"
TIMEOUT ${timeout}
RUN_SERIAL ${run_serial}
FAIL_REGULAR_EXPRESSION "runtime error"

@ -29,4 +29,4 @@ set(unit_tests
UnitTestCudaPointLocatorUniformGrid.cu
UnitTestCudaVirtualObjectHandle.cu
)
vtkm_unit_tests(SOURCES ${unit_tests} LIBRARIES vtkm_worklet)
vtkm_unit_tests(SOURCES ${unit_tests} LABEL "CUDA" LIBRARIES vtkm_worklet)

@ -26,7 +26,10 @@ set(unit_tests
UnitTestOpenMPPointLocatorUniformGrid.cxx
UnitTestOpenMPVirtualObjectHandle.cxx
)
vtkm_unit_tests(OpenMP SOURCES ${unit_tests} DEFINES VTKM_NO_ERROR_ON_MIXED_CUDA_CXX_TAG LIBRARIES vtkm_worklet)
vtkm_unit_tests(SOURCES ${unit_tests}
LABEL "OPENMP"
DEFINES VTKM_NO_ERROR_ON_MIXED_CUDA_CXX_TAG
LIBRARIES vtkm_worklet)
if (VTKm_ENABLE_TESTING)
#We need to have all OpenMP tests run serially as they

@ -27,4 +27,7 @@ set(unit_tests
UnitTestSerialPointLocatorUniformGrid.cxx
UnitTestSerialVirtualObjectHandle.cxx
)
vtkm_unit_tests(SOURCES ${unit_tests} DEFINES VTKM_NO_ERROR_ON_MIXED_CUDA_CXX_TAG LIBRARIES vtkm_worklet)
vtkm_unit_tests(SOURCES ${unit_tests}
LABEL "SERIAL"
DEFINES VTKM_NO_ERROR_ON_MIXED_CUDA_CXX_TAG
LIBRARIES vtkm_worklet)

@ -27,4 +27,7 @@ set(unit_tests
UnitTestTBBVirtualObjectHandle.cxx
)
vtkm_unit_tests(SOURCES ${unit_tests} DEFINES VTKM_NO_ERROR_ON_MIXED_CUDA_CXX_TAG LIBRARIES vtkm_worklet)
vtkm_unit_tests(SOURCES ${unit_tests}
LABEL "TBB"
DEFINES VTKM_NO_ERROR_ON_MIXED_CUDA_CXX_TAG
LIBRARIES vtkm_worklet)

@ -12,4 +12,4 @@ set(unit_tests
UnitTestTextureMemorySupport.cu
UnitTestTaskStrided.cu
)
vtkm_unit_tests(SOURCES ${unit_tests})
vtkm_unit_tests(SOURCES ${unit_tests} LABEL "CUDA")

@ -12,4 +12,4 @@ set(unit_tests
UnitTestTaskTilingOpenMP.cxx
)
vtkm_unit_tests(SOURCES ${unit_tests})
vtkm_unit_tests(SOURCES ${unit_tests} LABEL "OPENMP")

@ -11,4 +11,4 @@
set(unit_tests
UnitTestTaskTilingSerial.cxx
)
vtkm_unit_tests(SOURCES ${unit_tests})
vtkm_unit_tests(SOURCES ${unit_tests} LABEL "SERIAL")

@ -11,4 +11,4 @@
set(unit_tests
UnitTestTaskTilingTBB.cxx
)
vtkm_unit_tests(SOURCES ${unit_tests})
vtkm_unit_tests(SOURCES ${unit_tests} LABEL "TBB")