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:
Joakim Hove 2016-06-25 17:07:50 +02:00
parent 18ed6a2703
commit 7064cde08b
2 changed files with 9 additions and 1 deletions

View 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)

View File

@ -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;