Skip to content

Commit

Permalink
testing: drop mpiexec for now
Browse files Browse the repository at this point in the history
  • Loading branch information
cwsmith committed Sep 9, 2024
1 parent 6d3c083 commit ed51374
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,23 @@ option(IS_TESTING "Build for CTest" OFF)
message(STATUS "IS_TESTING: ${IS_TESTING}")

#tests
function(test_func_impl TEST_NAME NUM_PROCS)
set(TEST_STR ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${NUM_PROCS} ${VALGRIND} ${ARGN})
function(test_func_impl TEST_NAME)
set(TEST_STR ${VALGRIND} ${ARGN})
# need to run as a cmake script to capture assert and other 'system failures'
# https://cmake.org/cmake/help/latest/prop_test/WILL_FAIL.html#prop_test:WILL_FAIL
add_test(NAME ${TEST_NAME} COMMAND ${CMAKE_COMMAND} -E env ${TEST_STR})
endfunction(test_func_impl)

function(test_func TEST_NAME NUM_PROCS)
test_func_impl(${TEST_NAME} ${NUM_PROCS} ${ARGN})
function(test_func TEST_NAME)
test_func_impl(${TEST_NAME} ${ARGN})
if(TEST ${TEST_NAME})
set_property(TEST ${TEST_NAME} PROPERTY LABELS "base")
endif()
endfunction(test_func)

# Unlike test_func, will_fail_test_func assumes the command for the test will fail
function(will_fail_test_func TEST_NAME NUM_PROCS)
test_func_impl(${TEST_NAME} ${NUM_PROCS} ${ARGN})
function(will_fail_test_func TEST_NAME)
test_func_impl(${TEST_NAME} ${ARGN})
set_property(TEST ${TEST_NAME} PROPERTY WILL_FAIL TRUE)
if(TEST ${TEST_NAME})
set_property(TEST ${TEST_NAME} PROPERTY LABELS "base")
Expand All @@ -82,16 +82,16 @@ target_link_libraries(SerializationTests PRIVATE meshFields)
add_executable(QRTests test/testQR.cpp)
target_link_libraries(QRTests PRIVATE meshFields)

test_func(MainTests 1 ./Main)
test_func(KokkosTests 1 ./KokkosTests)
test_func(CabanaTests 1 ./CabanaTests)
test_func(SerializationTests 1 ./SerializationTests)
test_func(MainTests ./Main)
test_func(KokkosTests ./KokkosTests)
test_func(CabanaTests ./CabanaTests)
test_func(SerializationTests ./SerializationTests)
if(Kokkos_ENABLE_CUDA) #haven't tested with HIP or SYCL
test_func(QRTestsCUDA 1 ./QRTests)
test_func(QRTestsCUDA ./QRTests)
else()
#with the serial backend the QR tests fail,
#see https://github.com/kokkos/kokkos-kernels/issues/2328
will_fail_test_func(QRTestsSerial 1 ./QRTests)
will_fail_test_func(QRTestsSerial ./QRTests)
endif()

#Code Coverage set up -------------------------------------------------------
Expand Down

0 comments on commit ed51374

Please sign in to comment.