summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-02-24 18:45:22 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-02-24 18:45:22 (GMT)
commitf7212df0300f0d776b328fda05ef99947db59c0a (patch)
treef2e20d744f0c277101ab9c03dcc38670cb0f038d /tools
parent1773b327fb7611429a572020e4649b05358c911e (diff)
downloadhdf5-f7212df0300f0d776b328fda05ef99947db59c0a.zip
hdf5-f7212df0300f0d776b328fda05ef99947db59c0a.tar.gz
hdf5-f7212df0300f0d776b328fda05ef99947db59c0a.tar.bz2
HDFFV-11036 add file compare test process
Diffstat (limited to 'tools')
-rw-r--r--tools/test/h5repack/CMakeTests.cmake60
1 files changed, 52 insertions, 8 deletions
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index e654bce..4823d07 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -638,12 +638,16 @@
macro (ADD_H5_TEST_META testname testfile)
# Remove any output file left over from previous test run
add_test (
- NAME H5REPACK_META-${testname}_N-clear-objects
+ NAME H5REPACK_META-${testname}-clear-objects
COMMAND ${CMAKE_COMMAND} -E remove
testfiles/out-${testname}_N.${testname}.h5
+ testfiles/out-${testname}_N.${testname}.out
+ testfiles/out-${testname}_N.${testname}.out.err
testfiles/out-${testname}_M.${testname}.h5
+ testfiles/out-${testname}_M.${testname}.out
+ testfiles/out-${testname}_M.${testname}.out.err
)
- set_tests_properties (H5REPACK_META-${testname}_N-clear-objects PROPERTIES
+ set_tests_properties (H5REPACK_META-${testname}-clear-objects PROPERTIES
FIXTURES_REQUIRED clear_h5repack
)
add_test (
@@ -651,21 +655,61 @@
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5
)
set_tests_properties (H5REPACK_META-${testname}_N PROPERTIES
- DEPENDS H5REPACK_META-${testname}_N-clear-objects
+ DEPENDS H5REPACK_META-${testname}-clear-objects
+ )
+ add_test (
+ NAME H5REPACK_META-${testname}_N_DFF
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_file_ext}>"
+ -D "TEST_ARGS:STRING=-v;${testfile};out-${testname}_N.${testname}.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=out-${testname}_N.${testname}.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_REFERENCE=out-${testname}_N.${testname}.txt"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5REPACK_META-${testname}_N_DFF PROPERTIES
+ DEPENDS H5REPACK_META-${testname}_N
)
add_test (
NAME H5REPACK_META-${testname}_M
COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repack${tgt_file_ext}> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5
)
set_tests_properties (H5REPACK_META-${testname}_M PROPERTIES
- DEPENDS H5REPACK_META-${testname}_N
+ DEPENDS H5REPACK_META-${testname}_N_DFF
)
-
- add_test (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${CMAKE_IGNORE_EOL} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5 ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_M.${testname}.h5)
- set_tests_properties (H5REPACK_META-${testname} PROPERTIES
- WILL_FAIL "true"
+ add_test (
+ NAME H5REPACK_META-${testname}_M_DFF
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff${tgt_file_ext}>"
+ -D "TEST_ARGS:STRING=-v;${testfile};out-${testname}_M.${testname}.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=out-${testname}_M.${testname}.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_REFERENCE=out-${testname}_M.${testname}.txt"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5REPACK_META-${testname}_M_DFF PROPERTIES
DEPENDS H5REPACK_META-${testname}_M
)
+ add_test (NAME H5REPACK_META-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_ONEFILE=out-${testname}_N.${testname}.out"
+ -D "TEST_TWOFILE=out-${testname}_M.${testname}.h5"
+ -D "TEST_FUNCTION=LTEQ"
+ -P "${HDF_RESOURCES_DIR}/fileCompareTest.cmake"
+ )
+ if (CMAKE_VERSION VERSION_LESS "3.14.0")
+ set_tests_properties (H5REPACK_META-${testname} PROPERTIES
+ DISABLED "true"
+ )
+ endif ()
+ set_tests_properties (H5REPACK_META-${testname} PROPERTIES
+ DEPENDS H5REPACK_META-${testname}_M_DFF
+ )
endmacro ()
macro (ADD_H5_UD_TEST testname resultcode resultfile)