summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/CMakeLists.txt
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-08-05 23:19:01 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-08-05 23:19:01 (GMT)
commit0de252524dfec1028bdd9241dbd4cca46535b93a (patch)
treecb9df4f6d8db74ee263e82459e562037c26de611 /tools/h5repack/CMakeLists.txt
parent1fe94ec545b2ae92fefc16eb3d9864e52b12107d (diff)
downloadhdf5-0de252524dfec1028bdd9241dbd4cca46535b93a.zip
hdf5-0de252524dfec1028bdd9241dbd4cca46535b93a.tar.gz
hdf5-0de252524dfec1028bdd9241dbd4cca46535b93a.tar.bz2
[svn-r19179] Description:
Bring changes from Coverity branch back to trunk: r19079 & 19080: [BZ1942] h5dump -u to generate XML, it does not respect the -m option xml version of dump_data function didn't check for use of fp_format variable. Added new test expected file for committed bug 1942 r19103, 19104 & 19105: [BZ1821] h5repack -v did not display correct output for a selected compression. Needed new test for comparing output of -v option. Added new test file for solution to BZ1821 BZ1821 - Bring test changes from the shell script actually used. Tested on: Mac OS X/32 10.6.4 (amazon) debug & production (h5committested on branch)
Diffstat (limited to 'tools/h5repack/CMakeLists.txt')
-rw-r--r--tools/h5repack/CMakeLists.txt37
1 files changed, 35 insertions, 2 deletions
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index adec48a..31e4e90 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -142,6 +142,7 @@ IF (BUILD_TESTING)
tfamily00008.h5
tfamily00009.h5
tfamily00010.h5
+ h5repack_filters.h5.ddl
)
FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
@@ -166,10 +167,12 @@ IF (BUILD_TESTING)
)
ENDFOREACH (h5c_file ${HDF5_COMMON_TEST_FILES})
-
MACRO (ADD_H5_TEST testname testtype testfile)
IF (${testtype} STREQUAL "SKIP")
- MESSAGE (STATUS "SKIP ${testfile} ${ARGN}")
+ ADD_TEST (
+ NAME H5REPACK-${testname}
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out.${testfile}"
+ )
ELSE (${testtype} STREQUAL "SKIP")
ADD_TEST (
NAME H5REPACK-${testname}
@@ -182,6 +185,28 @@ IF (BUILD_TESTING)
ENDIF (${testtype} STREQUAL "SKIP")
ENDMACRO (ADD_H5_TEST testname testfile testtype)
+ MACRO (ADD_H5_CMP_TEST testname testfilter testtype resultcode resultfile)
+ IF (${testtype} STREQUAL "SKIP")
+ ADD_TEST (
+ NAME H5REPACK-${testname}
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${resultfile} ${PROJECT_BINARY_DIR}/testfiles/out.${resultfile}"
+ )
+ ELSE (${testtype} STREQUAL "SKIP")
+ ADD_TEST (
+ NAME H5REPACK-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5repack>"
+ -D "TEST_ARGS:STRING=${ARGN};${PROJECT_BINARY_DIR}/testfiles/${resultfile};${PROJECT_BINARY_DIR}/testfiles/out.${resultfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_FILTER=${testfilter}"
+ -D "TEST_REFERENCE=${PROJECT_BINARY_DIR}/testfiles/${resultfile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ ENDIF (${testtype} STREQUAL "SKIP")
+ ENDMACRO (ADD_H5_CMP_TEST file)
+
#
# The tests
# We use the files generated by h5repacktst
@@ -306,6 +331,14 @@ IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SHUFFLE
SET (TESTTYPE "SKIP")
ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE)
ADD_H5_TEST (all_filters ${TESTTYPE} ${arg})
+
+# verbose gzip with individual object
+SET (arg ${FILE11} -v -f /dset_deflate:GZIP=9)
+SET (TESTTYPE "TEST")
+IF (NOT USE_FILTER_DEFLATE)
+ SET (TESTTYPE "SKIP")
+ENDIF (NOT USE_FILTER_DEFLATE)
+ADD_H5_CMP_TEST (gzip_verbose_filters "O?...ing file[^\n]+\n" ${TESTTYPE} 0 ${arg})
###########################################################
# the following tests assume the input files have filters