Skip to content

Commit

Permalink
Silence another policy, simplify smoke test and move more complicated…
Browse files Browse the repository at this point in the history
… one to an internal test
  • Loading branch information
white238 committed Aug 7, 2019
1 parent 9383457 commit b1ecd7d
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 401 deletions.
24 changes: 20 additions & 4 deletions tests/internal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ option(TEST_GIT_MACROS
# Add a library
#------------------------------------------------------------------------------

blt_add_library( NAME example
blt_add_library( NAME example
SOURCES "src/Example.cpp"
HEADERS "src/Example.hpp"
)
Expand Down Expand Up @@ -140,12 +140,12 @@ if(ENABLE_GTEST)
${CMAKE_BINARY_DIR}/t_git_macros_smoke.cpp )

blt_add_executable(
NAME t_git_macros_smoke
SOURCES "${CMAKE_BINARY_DIR}/t_git_macros_smoke.cpp"
NAME t_git_macros_smoke
SOURCES ${CMAKE_BINARY_DIR}/t_git_macros_smoke.cpp
DEPENDS_ON gtest
)

blt_add_test( NAME t_git_macros_smoke
blt_add_test( NAME t_git_macros_smoke
COMMAND t_git_macros_smoke )

endif() # endif is_git_repo
Expand Down Expand Up @@ -187,6 +187,21 @@ if(ENABLE_GTEST)

endif() # endif ENABLE_GTEST

if (ENABLE_CUDA AND ENABLE_MPI AND
"${BLT_CXX_STD}" MATCHES c\\+\\+1)
blt_add_executable(
NAME test_cuda_mpi
SOURCES src/test_cuda_mpi.cpp
DEPENDS_ON cuda mpi hwloc)

# Tests on a 2^24 elements array.
# It can go much bigger, but will not
# exceed memory capacity in most computers.
blt_add_test(NAME test_cuda_mpi
COMMAND test_cuda_mpi 24
NUM_MPI_TASKS 4)
endif()

message(STATUS "Exercising blt_print_target_properties macro on some targets and non-targets.")
message(STATUS "")
foreach(_target gtest example t_example_smoke not-a-target blt_header_only mpi)
Expand Down Expand Up @@ -252,6 +267,7 @@ if(ASTYLE_FOUND)
src/t_example_compile_definitions.cpp
src/t_example_smoke.cpp
src/t_header_only_smoke.cpp
src/test_cuda_mpi.cpp

src/test_cuda_device_call_from_kernel/Child.cpp
src/test_cuda_device_call_from_kernel/Child.hpp
Expand Down
15 changes: 6 additions & 9 deletions tests/smoke/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ if (ENABLE_MPI)
endif()

################
# CUDA test
# CUDA tests
################
if (ENABLE_CUDA)
blt_add_executable(NAME blt_cuda_smoke
Expand Down Expand Up @@ -132,16 +132,13 @@ if (ENABLE_CUDA)
endif()

if (ENABLE_MPI)
blt_add_executable(NAME blt_cuda_mpi_smoke
SOURCES blt_cuda_mpi_smoke.cpp
blt_add_executable(NAME blt_cuda_mpi_smoke
SOURCES blt_cuda_mpi_smoke.cpp
OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY}
DEPENDS_ON cuda mpi hwloc
DEPENDS_ON cuda mpi
FOLDER blt/tests )
blt_add_test(NAME blt_cuda_mpi_smoke
# Tests on a 2^24 elements array.
# It can go much bigger, but will not
# exceed memory capacity in most computers.
COMMAND blt_mpi_smoke 24
blt_add_test(NAME blt_cuda_mpi_smoke
COMMAND blt_cuda_mpi_smoke
NUM_MPI_TASKS 4)
endif()
endif()
Expand Down
Loading

0 comments on commit b1ecd7d

Please sign in to comment.