2017-02-23 20:41:27 +05:00
|
|
|
if(USE_PYTHON)
|
2023-08-29 14:24:01 +05:00
|
|
|
add_test(NAME pytest COMMAND ${Python3_EXECUTABLE} -m pytest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
add_custom_target(pytest ${Python3_EXECUTABLE} -m pytest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
2019-09-11 15:09:38 +05:00
|
|
|
set_tests_properties ( pytest PROPERTIES TIMEOUT 1800 )
|
2020-07-29 20:52:21 +05:00
|
|
|
if(USE_MPI AND USE_MPI4PY)
|
2023-08-29 14:24:01 +05:00
|
|
|
add_test(NAME pytest-mpi COMMAND ${MPIEXEC_EXECUTABLE} --allow-run-as-root -np 4 ${Python3_EXECUTABLE} -m pytest --with-mpi test_mpi4py.py WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
2020-07-29 20:52:21 +05:00
|
|
|
endif(USE_MPI AND USE_MPI4PY)
|
2017-02-23 20:41:27 +05:00
|
|
|
endif(USE_PYTHON)
|