opm-simulators/compareECLFiles.cmake

40 lines
1.3 KiB
CMake
Raw Normal View History

# Set absolute tolerance to be used for testing
set(abs_tol 2e-2)
set(rel_tol 1e-5)
2016-08-04 06:54:37 -05:00
# Define some paths
2016-08-04 06:54:37 -05:00
set(BASE_RESULT_PATH ${PROJECT_BINARY_DIR}/tests/results)
###########################################################################
2016-08-04 06:54:37 -05:00
# TEST: compareECLFiles
###########################################################################
2016-08-04 06:54:37 -05:00
# Input:
# - casename: basename (no extension)
#
macro (add_test_compareECLFiles casename filename)
2016-08-04 06:54:37 -05:00
set(RESULT_PATH ${BASE_RESULT_PATH}/${casename})
# Add test that runs flow and outputs the results to file
opm_add_test(compareECLFiles_${filename} NO_COMPILE
2016-08-04 06:54:37 -05:00
EXE_NAME flow
DRIVER_ARGS ${OPM_DATA_ROOT}/${casename} ${RESULT_PATH}
${CMAKE_BINARY_DIR}/bin
${filename}
${abs_tol} ${rel_tol}
2016-08-04 06:54:37 -05:00
${COMPARE_SUMMARY_COMMAND}
${COMPARE_ECL_COMMAND}
TEST_ARGS ${OPM_DATA_ROOT}/${casename}/${filename}.DATA )
endmacro (add_test_compareECLFiles)
if(NOT TARGET test-suite)
add_custom_target(test-suite)
endif()
opm_set_test_driver(${PROJECT_SOURCE_DIR}/tests/run-regressionTest.sh "")
2016-08-04 06:54:37 -05:00
add_test_compareECLFiles(spe1 SPE1CASE2)
add_test_compareECLFiles(spe3 SPE3CASE1)
add_test_compareECLFiles(spe9 SPE9_CP_SHORT)