summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5dump/CMakeLists.txt')
-rw-r--r--tools/h5dump/CMakeLists.txt420
1 files changed, 404 insertions, 16 deletions
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index 075a3b3..e8e88ad 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -11,8 +11,7 @@ INCLUDE_DIRECTORIES (${HDF5_PROJECT_DIR}/test)
# Add the h5dump executables
# --------------------------------------------------------------------
ADD_EXECUTABLE (h5dump ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dump.c)
-H5_NAMING (h5dump)
-TARGET_WIN_PROPERTIES (h5dump)
+H5_NAMING (h5dump ${LIB_TYPE})
TARGET_LINK_LIBRARIES (h5dump ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
SET (H5_DEP_EXECUTABLES h5dump)
@@ -29,8 +28,7 @@ IF (BUILD_TESTING)
# --------------------------------------------------------------------
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (h5dumpgentest ${HDF5_TOOLS_H5DUMP_SOURCE_DIR}/h5dumpgentest.c)
- H5_NAMING (h5dumpgentest)
- TARGET_WIN_PROPERTIES (h5dumpgentest)
+ H5_NAMING (h5dumpgentest ${LIB_TYPE})
TARGET_LINK_LIBRARIES (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
#ADD_TEST (NAME h5dumpgentest COMMAND $<TARGET_FILE:h5dumpgentest>)
@@ -40,6 +38,7 @@ IF (BUILD_TESTING)
# Copy all the HDF5 files from the test directory into the source directory
# --------------------------------------------------------------------
SET (HDF5_REFERENCE_FILES
+ packedbits.ddl
tall-1.ddl
tall-2.ddl
tall-2A.ddl
@@ -84,6 +83,7 @@ IF (BUILD_TESTING)
texternal.ddl
textlinksrc.ddl
textlinkfar.ddl
+ textlink.ddl
tfamily.ddl
tfill.ddl
tfletcher32.ddl
@@ -219,6 +219,7 @@ IF (BUILD_TESTING)
tbin3.ddl
tbin4.ddl
out3.h5import
+ packedbits.h5
taindices.h5
tall.h5
tarray1.h5
@@ -243,6 +244,7 @@ IF (BUILD_TESTING)
textlinkfar.h5
textlinksrc.h5
textlinktar.h5
+ textlink.h5
tfamily00000.h5
tfamily00001.h5
tfamily00002.h5
@@ -473,6 +475,240 @@ IF (BUILD_TESTING)
##############################################################################
##############################################################################
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5DUMP-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ packedbits.out
+ packedbits.out.err
+ tall-1.out
+ tall-1.out.err
+ tall-2.out
+ tall-2.out.err
+ tall-2A.out
+ tall-2A.out.err
+ tall-2B.out
+ tall-2B.out.err
+ tall-3.out
+ tall-3.out.err
+ tall-4s.out
+ tall-4s.out.err
+ tall-5s.out
+ tall-5s.out.err
+ tallfilters.out
+ tallfilters.out.err
+ tarray1.out
+ tarray1.out.err
+ tarray2.out
+ tarray2.out.err
+ tarray3.out
+ tarray3.out.err
+ tarray4.out
+ tarray4.out.err
+ tarray5.out
+ tarray5.out.err
+ tarray6.out
+ tarray6.out.err
+ tarray7.out
+ tarray7.out.err
+ tarray8.out
+ tarray8.out.err
+ tattr-1.out
+ tattr-1.out.err
+ tattr-2.out
+ tattr-2.out.err
+ tattr-3.out
+ tattr-3.out.err
+ tattrreg.out
+ tattrreg.out.err
+ tattrregR.out
+ tattrregR.out.err
+ tbinregR.out
+ tbinregR.out.err
+ tbigdims.out
+ tbigdims.out.err
+ tboot1.out
+ tboot1.out.err
+ tboot2.out
+ tboot2.out.err
+ tchar1.out
+ tchar1.out.err
+ tchunked.out
+ tchunked.out.err
+ tcomp-1.out
+ tcomp-1.out.err
+ tcomp-2.out
+ tcomp-2.out.err
+ tcomp-3.out
+ tcomp-3.out.err
+ tcomp-4.out
+ tcomp-4.out.err
+ tcompact.out
+ tcompact.out.err
+ tcontents.out
+ tcontents.out.err
+ tcontiguos.out
+ tcontiguos.out.err
+ tdatareg.out
+ tdatareg.out.err
+ tdataregR.out
+ tdataregR.out.err
+ tdeflate.out
+ tdeflate.out.err
+ tdset-1.out
+ tdset-1.out.err
+ tdset-2.out
+ tdset-2.out.err
+ tdset-3s.out
+ tdset-3s.out.err
+ tempty.out
+ tempty.out.err
+ texternal.out
+ texternal.out.err
+ textlinksrc.out
+ textlinksrc.out.err
+ textlinkfar.out
+ textlinkfar.out.err
+ textlink.out
+ textlink.out.err
+ tfamily.out
+ tfamily.out.err
+ tfill.out
+ tfill.out.err
+ tfletcher32.out
+ tfletcher32.out.err
+ tfpformat.out
+ tfpformat.out.err
+ tgroup-1.out
+ tgroup-1.out.err
+ tgroup-2.out
+ tgroup-2.out.err
+ tgrp_comments.out
+ tgrp_comments.out.err
+ thlink-1.out
+ thlink-1.out.err
+ thlink-2.out
+ thlink-2.out.err
+ thlink-3.out
+ thlink-3.out.err
+ thlink-4.out
+ thlink-4.out.err
+ thlink-5.out
+ thlink-5.out.err
+ thyperslab.out
+ thyperslab.out.err
+ tindicesno.out
+ tindicesno.out.err
+ tindicessub1.out
+ tindicessub1.out.err
+ tindicessub2.out
+ tindicessub2.out.err
+ tindicessub3.out
+ tindicessub3.out.err
+ tindicessub4.out
+ tindicessub4.out.err
+ tindicesyes.out
+ tindicesyes.out.err
+ tlarge_objname.out
+ tlarge_objname.out.err
+ tldouble.out
+ tldouble.out.err
+ tlonglinks.out
+ tlonglinks.out.err
+ tloop-1.out
+ tloop-1.out.err
+ tmulti.out
+ tmulti.out.err
+ tnamed_dtype_attr.out
+ tnamed_dtype_attr.out.err
+ tnestcomp-1.out
+ tnestcomp-1.out.err
+ tnbit.out
+ tnbit.out.err
+ tnofilename.out
+ tnofilename.out.err
+ tnullspace.out
+ tnullspace.out.err
+ tordergr1.out
+ tordergr1.out.err
+ tordergr2.out
+ tordergr2.out.err
+ tordergr3.out
+ tordergr3.out.err
+ tordergr4.out
+ tordergr4.out.err
+ tordergr5.out
+ tordergr5.out.err
+ torderattr1.out
+ torderattr1.out.err
+ torderattr2.out
+ torderattr2.out.err
+ torderattr3.out
+ torderattr3.out.err
+ torderattr4.out
+ torderattr4.out.err
+ tperror.out
+ tperror.out.err
+ treference.out
+ treference.out.err
+ tsaf.out
+ tsaf.out.err
+ tscaleoffset.out
+ tscaleoffset.out.err
+ tshuffle.out
+ tshuffle.out.err
+ tslink-1.out
+ tslink-1.out.err
+ tslink-2.out
+ tslink-2.out.err
+ tsplit_file.out
+ tsplit_file.out.err
+ tstr-1.out
+ tstr-1.out.err
+ tstr-2.out
+ tstr-2.out.err
+ tstring.out
+ tstring.out.err
+ tstring2.out
+ tstring2.out.err
+ tstringe.out
+ tstringe.out.err
+ tszip.out
+ tszip.out.err
+ tudlink-1.out
+ tudlink-1.out.err
+ tudlink-2.out
+ tudlink-2.out.err
+ tuserfilter.out
+ tuserfilter.out.err
+ tvldtypes1.out
+ tvldtypes1.out.err
+ tvldtypes2.out
+ tvldtypes2.out.err
+ tvldtypes3.out
+ tvldtypes3.out.err
+ tvldtypes4.out
+ tvldtypes4.out.err
+ tvldtypes5.out
+ tvldtypes5.out.err
+ tvlstr.out
+ tvlstr.out.err
+ tvms.out
+ tvms.out.err
+ )
+
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5DUMP-tgroup COMMAND h5dump tgroup.h5)
+ ADD_TEST (NAME H5DUMP-tdset COMMAND h5dump tdset.h5)
+ ADD_TEST (NAME H5DUMP-tattr COMMAND h5dump tattr.h5)
+ ADD_TEST (NAME H5DUMP-tslink COMMAND h5dump tslink.h5)
+ ADD_TEST (NAME H5DUMP-thlink COMMAND h5dump thlink.h5)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ # test for signed/unsigned datasets
+ ADD_H5_TEST (packedbits 0 packedbits.h5)
# test for displaying groups
ADD_H5_TEST (tgroup-1 0 tgroup.h5)
# test for displaying the selected groups
@@ -583,11 +819,7 @@ IF (BUILD_TESTING)
# test failure handling
# Missing file name
- IF (${USE_PACKED_BITS})
- ADD_H5_TEST (tnofilename-with-packed-bits 1)
- ELSE (${USE_PACKED_BITS})
- ADD_H5_TEST (tnofilename 1)
- ENDIF (${USE_PACKED_BITS})
+ ADD_H5_TEST (tnofilename 1)
# rev. 2004
@@ -774,15 +1006,171 @@ IF (BUILD_TESTING)
ADD_H5_TEST (textlinksrc 0 textlinksrc.h5)
ADD_H5_TEST (textlinkfar 0 textlinkfar.h5)
- # test for dataset packed bits
- SET (TESTTYPE "TEST")
- IF (NOT ${USE_PACKED_BITS})
- SET (TESTTYPE "SKIP")
- ENDIF (NOT ${USE_PACKED_BITS})
- ADD_SKIP_H5_TEST (tpackedbits 0 ${TESTTYPE} -d /dset1 -M 0,2 tdset.h5)
- ADD_SKIP_H5_TEST (tpackedbits2 0 ${TESTTYPE} -d /dset1 -M 0,2,2,1 tdset.h5)
+ # test for dangling external links
+ ADD_H5_TEST (textlink 0 textlink.h5)
+
+ ####### test for dataset packed bits ######
+ IF (HDF5_USE_H5DUMP_PACKED_BITS)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5DUMP_PACKED_BITS-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ tpackedbits.out
+ tpackedbits.out.err
+ tpackedbits2.out
+ tpackedbits2.out.err
+ )
+ ADD_H5_TEST (tpackedbits 0 -d /dset1 -M 0,2 tdset.h5)
+ ADD_H5_TEST (tpackedbits2 0 -d /dset1 -M 0,2,2,1 tdset.h5)
+ ENDIF (HDF5_USE_H5DUMP_PACKED_BITS)
+
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5DUMP-XML-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ tall.h5.out
+ tall.h5.out.err
+ tall-2A.h5.out
+ tall-2A.h5.out.err
+ tarray1.h5.out
+ tarray1.h5.out.err
+ tarray2.h5.out
+ tarray2.h5.out.err
+ tarray3.h5.out
+ tarray3.h5.out.err
+ tarray6.h5.out
+ tarray6.h5.out.err
+ tarray7.h5.out
+ tarray7.h5.out.err
+ tattr.h5.out
+ tattr.h5.out.err
+ tbitfields.h5.out
+ tbitfields.h5.out.err
+ tcompound.h5.out
+ tcompound.h5.out.err
+ tcompound2.h5.out
+ tcompound2.h5.out.err
+ tcompound_complex.h5.out
+ tcompound_complex.h5.out.err
+ tdatareg.h5.out
+ tdatareg.h5.out.err
+ tdset.h5.out
+ tdset.h5.out.err
+ tdset2.h5.out
+ tdset2.h5.out.err
+ tempty-dtd-2.h5.out
+ tempty-dtd-2.h5.out.err
+ tempty-dtd-uri.h5.out
+ tempty-dtd-uri.h5.out.err
+ tempty-dtd.h5.out
+ tempty-dtd.h5.out.err
+ tempty-nons-2.h5.out
+ tempty-nons-2.h5.out.err
+ tempty-nons-uri.h5.out
+ tempty-nons-uri.h5.out.err
+ tempty-nons.h5.out
+ tempty-nons.h5.out.err
+ tempty-ns-2.h5.out
+ tempty-ns-2.h5.out.err
+ tempty-ns.h5.out
+ tempty-ns.h5.out.err
+ tempty.h5.out
+ tempty.h5.out.err
+ tenum.h5.out
+ tenum.h5.out.err
+ textlink.h5.out
+ textlink.h5.out.err
+ tfpformat.h5.out
+ tfpformat.h5.out.err
+ tgroup.h5.out
+ tgroup.h5.out.err
+ thlink.h5.out
+ thlink.h5.out.err
+ tloop.h5.out
+ tloop.h5.out.err
+ tloop2.h5.out
+ tloop2.h5.out.err
+ tmany.h5.out
+ tmany.h5.out.err
+ tname-amp.h5.out
+ tname-amp.h5.out.err
+ tname-apos.h5.out
+ tname-apos.h5.out.err
+ tname-gt.h5.out
+ tname-gt.h5.out.err
+ tname-lt.h5.out
+ tname-lt.h5.out.err
+ tname-quot.h5.out
+ tname-quot.h5.out.err
+ tname-sp.h5.out
+ tname-sp.h5.out.err
+ tnamed_dtype_attr.h5.out
+ tnamed_dtype_attr.h5.out.err
+ tnestedcomp.h5.out
+ tnestedcomp.h5.out.err
+ tnodata.h5.out
+ tnodata.h5.out.err
+ tnoname.h5.out
+ tnoname.h5.out.err
+ tobjref.h5.out
+ tobjref.h5.out.err
+ topaque.h5.out
+ topaque.h5.out.err
+ torderattr1.h5.out
+ torderattr1.h5.out.err
+ torderattr2.h5.out
+ torderattr2.h5.out.err
+ torderattr3.h5.out
+ torderattr3.h5.out.err
+ torderattr4.h5.out
+ torderattr4.h5.out.err
+ tref-escapes-at.h5.out
+ tref-escapes-at.h5.out.err
+ tref-escapes.h5.out
+ tref-escapes.h5.out.err
+ tref.h5.out
+ tref.h5.out.err
+ tsaf.h5.out
+ tsaf.h5.out.err
+ tslink.h5.out
+ tslink.h5.out.err
+ tstr.h5.out
+ tstr.h5.out.err
+ tstr2.h5.out
+ tstr2.h5.out.err
+ tstring.h5.out
+ tstring.h5.out.err
+ tstring-at.h5.out
+ tstring-at.h5.out.err
+ tudlink.h5.out
+ tudlink.h5.out.err
+ tvldtypes1.h5.out
+ tvldtypes1.h5.out.err
+ tvldtypes2.h5.out
+ tvldtypes2.h5.out.err
+ tvldtypes3.h5.out
+ tvldtypes3.h5.out.err
+ tvldtypes4.h5.out
+ tvldtypes4.h5.out.err
+ tvldtypes5.h5.out
+ tvldtypes5.h5.out.err
+ tvlstr.h5.out
+ tvlstr.h5.out.err
+ )
########## test XML
+
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5DUMP-XML-tgroup COMMAND h5dump --xml tgroup.h5)
+ ADD_TEST (NAME H5DUMP-XML-tdset COMMAND h5dump --xml tdset.h5)
+ ADD_TEST (NAME H5DUMP-XML-tattr COMMAND h5dump --xml tattr.h5)
+ ADD_TEST (NAME H5DUMP-XML-tslink COMMAND h5dump --xml tslink.h5)
+ ADD_TEST (NAME H5DUMP-XML-thlink COMMAND h5dump --xml thlink.h5)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
ADD_XML_H5_TEST (tall.h5 0 tall.h5)
ADD_XML_H5_TEST (tattr.h5 0 tattr.h5)
ADD_XML_H5_TEST (tbitfields.h5 0 tbitfields.h5)