summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/CMakeTests.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2013-08-21 20:59:49 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2013-08-21 20:59:49 (GMT)
commit8c14af82c61f50146a6c5646c2320a08d09dc32d (patch)
tree7916e0f37752894768994143d6723a124db34561 /tools/h5repack/CMakeTests.cmake
parent6bc36a0c46a9864ae580ca43f00d3f4ec3e28147 (diff)
downloadhdf5-8c14af82c61f50146a6c5646c2320a08d09dc32d.zip
hdf5-8c14af82c61f50146a6c5646c2320a08d09dc32d.tar.gz
hdf5-8c14af82c61f50146a6c5646c2320a08d09dc32d.tar.bz2
[svn-r24050] HDFFV-8498: --minimum option was disabled by HDFFV-8214. Reverted code change and changed default to 0 from 1024. Changed limit test to use h5dump to compare repacked file instead of h5diff.
Tested local linux with CMake
Diffstat (limited to 'tools/h5repack/CMakeTests.cmake')
-rw-r--r--tools/h5repack/CMakeTests.cmake40
1 files changed, 38 insertions, 2 deletions
diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake
index 79d75a7..0734220 100644
--- a/tools/h5repack/CMakeTests.cmake
+++ b/tools/h5repack/CMakeTests.cmake
@@ -82,6 +82,7 @@
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_ext.bin
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/ublock.bin
${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack.info
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5.ddl
# tools/testfiles
${HDF5_TOOLS_SRC_DIR}/testfiles/h5repack_filters.h5.ddl
)
@@ -163,7 +164,9 @@
ELSE (${testtype} STREQUAL "SKIP")
# If using memchecker add tests without using scripts
IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5REPACK_CMP-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN} testfiles/${resultfile} testfiles/out-${testname}.${resultfile})
+ ADD_TEST (
+ NAME H5REPACK_CMP-${testname}
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile})
ELSE (HDF5_ENABLE_USING_MEMCHECKER)
ADD_TEST (
NAME H5REPACK_CMP-${testname}
@@ -184,6 +187,39 @@
ENDIF (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_CMP_TEST)
+ MACRO (ADD_H5_DMP_TEST testname testtype resultcode resultfile)
+ IF (${testtype} STREQUAL "SKIP")
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5REPACK_DMP-${testname}-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}"
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ELSE (${testtype} STREQUAL "SKIP")
+ # If using memchecker add tests without using scripts
+ ADD_TEST (
+ NAME H5REPACK_DMP-${testname}
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile})
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5REPACK_DMP-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5REPACK_DMP-h5dump-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=-pH;out-${testname}.${resultfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}-${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5REPACK_DMP-h5dump-${testname} PROPERTIES DEPENDS "H5REPACK_DMP-${testname}")
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDIF (${testtype} STREQUAL "SKIP")
+ ENDMACRO (ADD_H5_DMP_TEST)
+
MACRO (ADD_H5_VERIFY_TEST testname testtype resultcode testfile testdset testfilter)
IF (${testtype} STREQUAL "SKIP")
IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
@@ -768,7 +804,7 @@
IF (NOT USE_FILTER_DEFLATE)
SET (TESTTYPE "SKIP")
ENDIF (NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (deflate_limit ${TESTTYPE} ${arg})
+ ADD_H5_DMP_TEST (deflate_limit ${TESTTYPE} 0 ${arg})
#file
SET (arg ${FILE4} -e ${INFO_FILE})