Run Python / ERT based integration tests.
Added a new optional dependency the ERT Python distribution to opm-simulators, and a cmake function 'opm_add_python_test' which can be used to simplify integration tests of the type: 1. Run flow on a model. 2. Compare the results with a well known reference solution.
This commit is contained in:
parent
18ed6a2703
commit
7064cde08b
7
cmake/Modules/OpmPythonTest.cmake
Normal file
7
cmake/Modules/OpmPythonTest.cmake
Normal file
@ -0,0 +1,7 @@
|
||||
function (opm_add_python_test TEST_NAME TEST_SCRIPT)
|
||||
add_test(NAME ${TEST_NAME}
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||
COMMAND ${TEST_SCRIPT} ${ARGN})
|
||||
|
||||
set_property(TEST ${TEST_NAME} PROPERTY ENVIRONMENT "PYTHONPATH=${ERT_PYTHON_PATH}:${PYTHONPATH}")
|
||||
endfunction(opm_add_python_test)
|
@ -19,7 +19,8 @@ set (opm-simulators_DEPS
|
||||
# DUNE prerequisites
|
||||
"dune-common REQUIRED;
|
||||
dune-istl REQUIRED"
|
||||
# OPM dependency
|
||||
"ERTPython"
|
||||
# OPM dependency
|
||||
"opm-common REQUIRED;
|
||||
opm-parser REQUIRED;
|
||||
opm-core REQUIRED;
|
||||
|
Loading…
Reference in New Issue
Block a user