mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 02:30:18 -06:00
added: allow DIR parameter in add_test_compare_parallel_simulation
This commit is contained in:
parent
0a6b5f0ea9
commit
d5eea3252b
@ -83,17 +83,21 @@ endfunction()
|
|||||||
# - This test class compares the output from a parallel simulation
|
# - This test class compares the output from a parallel simulation
|
||||||
# to the output from the serial instance of the same model.
|
# to the output from the serial instance of the same model.
|
||||||
function(add_test_compare_parallel_simulation)
|
function(add_test_compare_parallel_simulation)
|
||||||
set(oneValueArgs CASENAME FILENAME SIMULATOR ABS_TOL REL_TOL)
|
set(oneValueArgs CASENAME FILENAME SIMULATOR ABS_TOL REL_TOL DIR)
|
||||||
set(multiValueArgs TEST_ARGS)
|
set(multiValueArgs TEST_ARGS)
|
||||||
cmake_parse_arguments(PARAM "$" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
cmake_parse_arguments(PARAM "$" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
|
||||||
|
|
||||||
|
if(NOT PARAM_DIR)
|
||||||
|
set(PARAM_DIR ${PARAM_CASENAME})
|
||||||
|
endif()
|
||||||
|
|
||||||
set(RESULT_PATH ${BASE_RESULT_PATH}/parallel/${PARAM_SIMULATOR}+${PARAM_CASENAME})
|
set(RESULT_PATH ${BASE_RESULT_PATH}/parallel/${PARAM_SIMULATOR}+${PARAM_CASENAME})
|
||||||
set(TEST_ARGS ${OPM_TESTS_ROOT}/${PARAM_CASENAME}/${PARAM_FILENAME} ${PARAM_TEST_ARGS})
|
set(TEST_ARGS ${OPM_TESTS_ROOT}/${PARAM_DIR}/${PARAM_FILENAME} ${PARAM_TEST_ARGS})
|
||||||
|
|
||||||
# Add test that runs flow_mpi and outputs the results to file
|
# Add test that runs flow_mpi and outputs the results to file
|
||||||
opm_add_test(compareParallelSim_${PARAM_SIMULATOR}+${PARAM_FILENAME} NO_COMPILE
|
opm_add_test(compareParallelSim_${PARAM_SIMULATOR}+${PARAM_FILENAME} NO_COMPILE
|
||||||
EXE_NAME ${PARAM_SIMULATOR}
|
EXE_NAME ${PARAM_SIMULATOR}
|
||||||
DRIVER_ARGS ${OPM_TESTS_ROOT}/${PARAM_CASENAME} ${RESULT_PATH}
|
DRIVER_ARGS ${OPM_TESTS_ROOT}/${PARAM_DIR} ${RESULT_PATH}
|
||||||
${PROJECT_BINARY_DIR}/bin
|
${PROJECT_BINARY_DIR}/bin
|
||||||
${PARAM_FILENAME}
|
${PARAM_FILENAME}
|
||||||
${PARAM_ABS_TOL} ${PARAM_REL_TOL}
|
${PARAM_ABS_TOL} ${PARAM_REL_TOL}
|
||||||
|
Loading…
Reference in New Issue
Block a user