diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-08-10 16:13:05 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-08-10 16:13:05 (GMT) |
commit | e41647d781d7d7c7883270ee63f6d1b7506ee722 (patch) | |
tree | 1cb3f19d9a65aeb38e5b62ae0a2e3470bcd8ccec /tools/h5dump | |
parent | 62b85578d8443e41dfddb124452dd315bdcb6591 (diff) | |
download | hdf5-e41647d781d7d7c7883270ee63f6d1b7506ee722.zip hdf5-e41647d781d7d7c7883270ee63f6d1b7506ee722.tar.gz hdf5-e41647d781d7d7c7883270ee63f6d1b7506ee722.tar.bz2 |
[svn-r19214] Test for compare of output text to expected needed to account for windows line endings.
Moved ADD_TEST commands to macro.
Tested: local linux, windows
Diffstat (limited to 'tools/h5dump')
-rw-r--r-- | tools/h5dump/CMakeLists.txt | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt index 6426986..0038730 100644 --- a/tools/h5dump/CMakeLists.txt +++ b/tools/h5dump/CMakeLists.txt @@ -296,6 +296,22 @@ IF (BUILD_TESTING) ) ENDMACRO (ADD_H5_TEST file) + MACRO (ADD_H5_EXPORT_TEST resultfile targetfile resultcode) + ADD_TEST ( + NAME H5DUMP-output-${resultfile} + COMMAND $<TARGET_FILE:h5dump> -d /Dataset1 -s 0 -R -y -o ${PROJECT_BINARY_DIR}/${resultfile}.txt ${PROJECT_BINARY_DIR}/${targetfile} + ) + IF (WIN32 AND NOT MINGW) + FILE (READ ${PROJECT_BINARY_DIR}/${resultfile}.exp TEST_STREAM) + FILE (WRITE ${PROJECT_BINARY_DIR}/${resultfile}.exp "${TEST_STREAM}") + ENDIF (WIN32 AND NOT MINGW) + ADD_TEST ( + NAME H5DUMP-output-cmp-${resultfile} + COMMAND ${CMAKE_COMMAND} + -E compare_files ${PROJECT_BINARY_DIR}/${resultfile}.txt ${PROJECT_BINARY_DIR}/${resultfile}.exp + ) + ENDMACRO (ADD_H5_EXPORT_TEST file) + # Determine which filters are available SET (USE_FILTER_SZIP H5_HAVE_FILTER_SZIP) SET (USE_FILTER_DEFLATE H5_HAVE_FILTER_DEFLATE) @@ -590,15 +606,7 @@ IF (BUILD_TESTING) ADD_H5_TEST (tdataregR 0 -R tdatareg.h5) ADD_H5_TEST (tattrreg 0 tattrreg.h5) ADD_H5_TEST (tattrregR 0 -R tattrreg.h5) - - ADD_TEST ( - NAME H5DUMP-output-tdatreg - COMMAND $<TARGET_FILE:h5dump> -d /Dataset1 -s 0 -R -y -o ${PROJECT_BINARY_DIR}/tbinregR.txt ${PROJECT_BINARY_DIR}/tdatareg.h5) - - ADD_TEST ( - NAME H5DUMP-output-cmp-tdatreg - COMMAND ${CMAKE_COMMAND} - -E compare_files ${PROJECT_BINARY_DIR}/tbinregR.txt ${PROJECT_BINARY_DIR}/tbinregR.exp) + ADD_H5_EXPORT_TEST (tbinregR tdatareg.h5 0 -d /Dataset1 -s 0 -R -y -o) # tests for group creation order # "1" tracked, "2" name, root tracked |