Skip to content

Commit

Permalink
always install smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
Angelyr committed Nov 27, 2024
1 parent 34882e6 commit aac53ad
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
12 changes: 12 additions & 0 deletions particle_structs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,18 @@ message(STATUS "PS_IS_TESTING: ${PS_IS_TESTING}")
add_subdirectory(src)
include_directories(src)

#define 'smoke tests' to test the install
add_custom_target(test_install DEPENDS check) # maintain test_install target
if(NOT BUILD_TESTING)
add_custom_target(check
COMMAND ${CMAKE_CTEST_COMMAND} -R smoke_test_particle
COMMENT "Test installed PUMIPic utilities")
endif()

add_executable(smoke_test_particle test/smoke_test_particle.cpp)
target_link_libraries(smoke_test_particle particleStructs)
mpi_test(smoke_test_particle 4 ./smoke_test_particle)

if (PS_IS_TESTING)
add_subdirectory(test)
endif()
Expand Down
2 changes: 0 additions & 2 deletions particle_structs/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ function(make_test exename srcname)
target_link_libraries(${exename} particleStructs)
endfunction(make_test)

make_test(smoke_test_particle smoke_test_particle.cpp)

make_test(typeTest typeTest.cpp)

make_test(sortTest sortTest.cpp)
Expand Down
2 changes: 0 additions & 2 deletions particle_structs/test/testing.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
mpi_test(smoke_test_particle 4 ./smoke_test_particle)

mpi_test(type_test 1 ./typeTest)

mpi_test(sort_test 1 ./sortTest 5000)
Expand Down

0 comments on commit aac53ad

Please sign in to comment.