added: extra parameter to handle multiple cases

currently, only a single case has been executed for a
given combination of an opm-data directory and a given simulator.

this will change shortly, add an optional parameter to the test
addition macro to handle this.
This commit is contained in:
Arne Morten Kvarving 2017-05-04 19:00:42 +02:00
parent 9892edb24b
commit da0fdff5f7

View File

@ -21,16 +21,21 @@ set(BASE_RESULT_PATH ${PROJECT_BINARY_DIR}/tests/results)
# Details:
# - This test class compares output from a simulation to reference files.
macro (add_test_compareECLFiles casename filename simulator abs_tol rel_tol prefix dirprefix)
if(${ARGC} GREATER 7)
set(DIR ${ARGN})
else()
set(DIR ${casename})
endif()
set(RESULT_PATH ${BASE_RESULT_PATH}${dirprefix}/${simulator}+${casename})
opm_add_test(${prefix}_${simulator}+${filename} NO_COMPILE
EXE_NAME ${simulator}
DRIVER_ARGS ${OPM_DATA_ROOT}/${casename} ${RESULT_PATH}
DRIVER_ARGS ${OPM_DATA_ROOT}/${DIR} ${RESULT_PATH}
${CMAKE_BINARY_DIR}/bin
${filename}
${abs_tol} ${rel_tol}
${COMPARE_SUMMARY_COMMAND}
${COMPARE_ECL_COMMAND}
TEST_ARGS ${OPM_DATA_ROOT}/${casename}/${filename}.DATA )
TEST_ARGS ${OPM_DATA_ROOT}/${DIR}/${filename}.DATA )
endmacro (add_test_compareECLFiles)
###########################################################################