mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add cmake option to disable the python tests
due to bugs in the openmpi on bionic, this test fails to execute properly in pbuilder environments. instead of rebuilding openmpi without dynamic loading (which is the suggested fix) and potentially break users systems, this is a non-intrusive workaround to be used for packaging. also add explicit option for python support to make it visible in cmake frontends.
This commit is contained in:
@@ -25,8 +25,10 @@ file( COPY ${PROJECT_SOURCE_DIR}/python/test
|
||||
file( COPY ${PROJECT_SOURCE_DIR}/python/test_data
|
||||
DESTINATION ${PROJECT_BINARY_DIR}/python)
|
||||
|
||||
add_test(NAME python_tests
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/python
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E env PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH}
|
||||
${PYTHON_EXECUTABLE} -m unittest )
|
||||
if(OPM_ENABLE_PYTHON_TESTS)
|
||||
add_test(NAME python_tests
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/python
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E env PYTHONPATH=${PROJECT_BINARY_DIR}/python:$ENV{PYTHONPATH}
|
||||
${PYTHON_EXECUTABLE} -m unittest )
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user