summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeFilters.cmake122
-rw-r--r--CMakeInstallation.cmake402
-rw-r--r--CMakeLists.txt524
-rw-r--r--MANIFEST29
-rw-r--r--c++/examples/CMakeLists.txt24
-rw-r--r--c++/examples/CMakeTests.cmake29
-rw-r--r--c++/test/CMakeLists.txt40
-rw-r--r--c++/test/CMakeTests.cmake46
-rw-r--r--examples/CMakeLists.txt57
-rw-r--r--examples/CMakeTests.cmake62
-rw-r--r--fortran/examples/CMakeLists.txt26
-rw-r--r--fortran/examples/CMakeTests.cmake28
-rw-r--r--fortran/test/CMakeLists.txt14
-rw-r--r--fortran/test/CMakeTests.cmake26
-rw-r--r--fortran/testpar/CMakeLists.txt2
-rw-r--r--fortran/testpar/CMakeTests.cmake7
-rw-r--r--hl/c++/examples/CMakeLists.txt2
-rw-r--r--hl/c++/examples/CMakeTests.cmake8
-rw-r--r--hl/c++/test/CMakeLists.txt36
-rw-r--r--hl/c++/test/CMakeTests.cmake8
-rw-r--r--hl/examples/CMakeLists.txt36
-rw-r--r--hl/examples/CMakeTests.cmake28
-rw-r--r--hl/fortran/examples/CMakeLists.txt10
-rw-r--r--hl/fortran/examples/CMakeTests.cmake10
-rw-r--r--hl/fortran/test/CMakeLists.txt22
-rw-r--r--hl/fortran/test/CMakeTests.cmake28
-rw-r--r--hl/test/CMakeLists.txt70
-rw-r--r--hl/test/CMakeTests.cmake70
-rw-r--r--hl/tools/CMakeLists.txt30
-rw-r--r--hl/tools/CMakeTests.cmake40
-rw-r--r--perform/CMakeLists.txt62
-rw-r--r--perform/CMakeTests.cmake61
-rw-r--r--test/CMakeLists.txt711
-rw-r--r--test/CMakeTests.cmake717
-rw-r--r--testpar/CMakeLists.txt59
-rw-r--r--testpar/CMakeTests.cmake63
-rw-r--r--tools/h5copy/CMakeLists.txt381
-rw-r--r--tools/h5copy/CMakeTests.cmake381
-rw-r--r--tools/h5diff/CMakeLists.txt1382
-rw-r--r--tools/h5diff/CMakeTests.cmake1382
-rw-r--r--tools/h5dump/CMakeLists.txt2141
-rw-r--r--tools/h5dump/CMakeTests.cmake1367
-rw-r--r--tools/h5dump/CMakeTestsPBITS.cmake367
-rw-r--r--tools/h5dump/CMakeTestsXML.cmake442
-rw-r--r--tools/h5import/CMakeLists.txt477
-rw-r--r--tools/h5import/CMakeTests.cmake478
-rw-r--r--tools/h5jam/CMakeLists.txt428
-rw-r--r--tools/h5jam/CMakeTests.cmake428
-rw-r--r--tools/h5ls/CMakeLists.txt401
-rw-r--r--tools/h5ls/CMakeTests.cmake402
-rw-r--r--tools/h5repack/CMakeLists.txt937
-rw-r--r--tools/h5repack/CMakeTests.cmake937
-rw-r--r--tools/h5stat/CMakeLists.txt256
-rw-r--r--tools/h5stat/CMakeTests.cmake257
-rw-r--r--tools/misc/CMakeLists.txt272
-rw-r--r--tools/misc/CMakeTests.cmake272
56 files changed, 8579 insertions, 8318 deletions
diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake
new file mode 100644
index 0000000..01594d0
--- /dev/null
+++ b/CMakeFilters.cmake
@@ -0,0 +1,122 @@
+
+#-----------------------------------------------------------------------------
+# Options for HDF5 Filters
+#-----------------------------------------------------------------------------
+MACRO (HDF5_SETUP_FILTERS FILTER)
+ OPTION (HDF5_USE_FILTER_${FILTER} "Use the ${FILTER} Filter" ON)
+ IF (HDF5_USE_FILTER_${FILTER})
+ SET (H5_HAVE_FILTER_${FILTER} 1)
+ SET (FILTERS "${FILTERS} ${FILTER}")
+ ENDIF (HDF5_USE_FILTER_${FILTER})
+ # MESSAGE (STATUS "Filter ${FILTER} is ${HDF5_USE_FILTER_${FILTER}}")
+ENDMACRO (HDF5_SETUP_FILTERS)
+
+HDF5_SETUP_FILTERS (SHUFFLE)
+HDF5_SETUP_FILTERS (FLETCHER32)
+HDF5_SETUP_FILTERS (NBIT)
+HDF5_SETUP_FILTERS (SCALEOFFSET)
+
+INCLUDE (ExternalProject)
+OPTION (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO")
+IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ OPTION (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
+ OPTION (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
+ IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+ SET (ZLIB_URL ${ZLIB_SVN_URL})
+ SET (SZIP_URL ${SZIP_SVN_URL})
+ ELSEIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ IF (NOT TGZ_PATH)
+ SET (TGZ_PATH ${HDF5_SOURCE_DIR})
+ ENDIF (NOT TGZ_PATH)
+ SET (ZLIB_URL ${TGZ_PATH}/${ZLIB_TGZ_NAME})
+ SET (SZIP_URL ${TGZ_PATH}/${SZIP_TGZ_NAME})
+ ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+ SET (ZLIB_USE_EXTERNAL 0)
+ SET (SZIP_USE_EXTERNAL 0)
+ ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
+ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+
+#-----------------------------------------------------------------------------
+# Option for ZLib support
+#-----------------------------------------------------------------------------
+OPTION (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF)
+IF (HDF5_ENABLE_Z_LIB_SUPPORT)
+ IF (NOT H5_ZLIB_HEADER)
+ IF (NOT ZLIB_USE_EXTERNAL)
+ FIND_PACKAGE (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT})
+ IF (NOT ZLIB_FOUND)
+ FIND_PACKAGE (ZLIB) # Legacy find
+ ENDIF (NOT ZLIB_FOUND)
+ ENDIF (NOT ZLIB_USE_EXTERNAL)
+ IF (ZLIB_FOUND)
+ SET (H5_HAVE_FILTER_DEFLATE 1)
+ SET (H5_HAVE_ZLIB_H 1)
+ SET (H5_HAVE_LIBZ 1)
+ SET (H5_ZLIB_HEADER "zlib.h")
+ SET (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
+ SET (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
+ ELSE (ZLIB_FOUND)
+ IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE})
+ SET (H5_HAVE_FILTER_DEFLATE 1)
+ SET (H5_HAVE_ZLIB_H 1)
+ SET (H5_HAVE_LIBZ 1)
+ MESSAGE (STATUS "Filter ZLIB is built")
+ ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ MESSAGE (FATAL_ERROR " ZLib is Required for ZLib support in HDF5")
+ ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ ENDIF (ZLIB_FOUND)
+ ELSE (NOT H5_ZLIB_HEADER)
+ # This project is being called from within another and ZLib is already configured
+ SET (H5_HAVE_FILTER_DEFLATE 1)
+ SET (H5_HAVE_ZLIB_H 1)
+ SET (H5_HAVE_LIBZ 1)
+ ENDIF (NOT H5_ZLIB_HEADER)
+ IF (H5_HAVE_FILTER_DEFLATE)
+ SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
+ ENDIF (H5_HAVE_FILTER_DEFLATE)
+ SET (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES})
+ INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
+ MESSAGE (STATUS "Filter ZLIB is ON")
+ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT)
+
+#-----------------------------------------------------------------------------
+# Option for SzLib support
+#-----------------------------------------------------------------------------
+OPTION (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
+IF (HDF5_ENABLE_SZIP_SUPPORT)
+ OPTION (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
+ IF (NOT SZIP_USE_EXTERNAL)
+ FIND_PACKAGE (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT})
+ IF (NOT SZIP_FOUND)
+ FIND_PACKAGE (SZIP) # Legacy find
+ ENDIF (NOT SZIP_FOUND)
+ ENDIF (NOT SZIP_USE_EXTERNAL)
+ IF (SZIP_FOUND)
+ SET (H5_HAVE_FILTER_SZIP 1)
+ SET (H5_HAVE_SZLIB_H 1)
+ SET (H5_HAVE_LIBSZ 1)
+ SET (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
+ SET (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
+ ELSE (SZIP_FOUND)
+ IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE} ${HDF5_ENABLE_SZIP_ENCODING})
+ SET (H5_HAVE_FILTER_SZIP 1)
+ SET (H5_HAVE_SZLIB_H 1)
+ SET (H5_HAVE_LIBSZ 1)
+ MESSAGE (STATUS "Filter SZIP is built")
+ ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ MESSAGE (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
+ ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ ENDIF (SZIP_FOUND)
+ SET (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
+ INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIR})
+ MESSAGE (STATUS "Filter SZIP is ON")
+ IF (H5_HAVE_FILTER_SZIP)
+ SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
+ ENDIF (H5_HAVE_FILTER_SZIP)
+ IF (HDF5_ENABLE_SZIP_ENCODING)
+ SET (H5_HAVE_SZIP_ENCODER 1)
+ SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE")
+ ENDIF (HDF5_ENABLE_SZIP_ENCODING)
+ENDIF (HDF5_ENABLE_SZIP_SUPPORT)
diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake
new file mode 100644
index 0000000..8a7cf16
--- /dev/null
+++ b/CMakeInstallation.cmake
@@ -0,0 +1,402 @@
+
+#-----------------------------------------------------------------------------
+# Add file(s) to CMake Install
+#-----------------------------------------------------------------------------
+IF (NOT HDF5_INSTALL_NO_DEVELOPMENT)
+ INSTALL (
+ FILES ${PROJECT_BINARY_DIR}/H5pubconf.h
+ DESTINATION ${HDF5_INSTALL_INCLUDE_DIR}
+ COMPONENT headers
+ )
+ENDIF (NOT HDF5_INSTALL_NO_DEVELOPMENT)
+
+#-----------------------------------------------------------------------------
+# Add Target(s) to CMake Install for import into other projects
+#-----------------------------------------------------------------------------
+IF (NOT HDF5_EXTERNALLY_CONFIGURED)
+ INSTALL (
+ EXPORT ${HDF5_EXPORTED_TARGETS}
+ DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
+ FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
+ COMPONENT configinstall
+ )
+ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
+
+#-----------------------------------------------------------------------------
+# Export all exported targets to the build tree for use by parent project
+#-----------------------------------------------------------------------------
+IF (NOT HDF5_EXTERNALLY_CONFIGURED)
+ EXPORT (
+ TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES}
+ FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
+ )
+ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
+
+#-----------------------------------------------------------------------------
+# Configure the hdf5-config.cmake file for the build directory
+#-----------------------------------------------------------------------------
+SET (HDF5_INCLUDES_BUILD_TIME
+ ${HDF5_SRC_DIR} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR}
+ ${HDF5_TOOLS_SRC_DIR} ${HDF5_BINARY_DIR}
+)
+SET (HDF5_VERSION_STRING @HDF5_PACKAGE_VERSION@)
+SET (HDF5_VERSION_MAJOR @HDF5_PACKAGE_VERSION_MAJOR@)
+SET (HDF5_VERSION_MINOR @HDF5_PACKAGE_VERSION_MINOR@)
+
+CONFIGURE_FILE (
+ ${HDF5_RESOURCES_DIR}/hdf5-config.cmake.build.in
+ ${HDF5_BINARY_DIR}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake @ONLY
+)
+
+#-----------------------------------------------------------------------------
+# Configure the FindHDF5.cmake file for the install directory
+#-----------------------------------------------------------------------------
+IF (NOT HDF5_EXTERNALLY_CONFIGURED)
+ CONFIGURE_FILE (
+ ${HDF5_RESOURCES_DIR}/FindHDF5.cmake.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake @ONLY
+ )
+ INSTALL (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake
+ DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
+ COMPONENT configinstall
+ )
+ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
+
+#-----------------------------------------------------------------------------
+# Configure the hdf5-config.cmake file for the install directory
+#-----------------------------------------------------------------------------
+IF (NOT HDF5_EXTERNALLY_CONFIGURED)
+ CONFIGURE_FILE (
+ ${HDF5_RESOURCES_DIR}/hdf5-config.cmake.install.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake @ONLY
+ )
+ INSTALL (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake
+ DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
+ COMPONENT configinstall
+ )
+ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
+
+#-----------------------------------------------------------------------------
+# Configure the hdf5-config-version .cmake file for the install directory
+#-----------------------------------------------------------------------------
+IF (NOT HDF5_EXTERNALLY_CONFIGURED)
+ CONFIGURE_FILE (
+ ${HDF5_RESOURCES_DIR}/hdf5-config-version.cmake.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY
+ )
+ INSTALL (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
+ DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
+ COMPONENT configinstall
+ )
+ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
+
+#-----------------------------------------------------------------------------
+# Configure the libhdf5.settings file for the lib info
+#-----------------------------------------------------------------------------
+IF (H5_WORDS_BIGENDIAN)
+ SET (BYTESEX big-endian)
+ELSE (H5_WORDS_BIGENDIAN)
+ SET (BYTESEX little-endian)
+ENDIF (H5_WORDS_BIGENDIAN)
+CONFIGURE_FILE (
+ ${HDF5_RESOURCES_DIR}/libhdf5.settings.cmake.in
+ ${HDF5_BINARY_DIR}/libhdf5.settings @ONLY
+)
+INSTALL (
+ FILES ${HDF5_BINARY_DIR}/libhdf5.settings
+ DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
+ COMPONENT libraries
+)
+
+#-----------------------------------------------------------------------------
+# Configure the HDF518_Examples.cmake file and the examples
+#-----------------------------------------------------------------------------
+OPTION (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF)
+IF (HDF5_PACK_EXAMPLES)
+ CONFIGURE_FILE (
+ ${HDF5_RESOURCES_DIR}/HDF518_Examples.cmake.in
+ ${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY
+ )
+ INSTALL (
+ FILES ${HDF5_BINARY_DIR}/HDF518_Examples.cmake
+ DESTINATION ${HDF5_INSTALL_DATA_DIR}
+ COMPONENT hdfdocuments
+ )
+ IF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}")
+ INSTALL (
+ FILES
+ ${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}
+ ${HDF5_SOURCE_DIR}/release_docs/USING_CMake_Examples.txt
+ DESTINATION ${HDF5_INSTALL_DATA_DIR}
+ COMPONENT hdfdocuments
+ )
+ ENDIF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}")
+ENDIF (HDF5_PACK_EXAMPLES)
+
+#-----------------------------------------------------------------------------
+# Add Document File(s) to CMake Install
+#-----------------------------------------------------------------------------
+IF (NOT HDF5_EXTERNALLY_CONFIGURED)
+ INSTALL (
+ FILES
+ ${HDF5_SOURCE_DIR}/ACKNOWLEDGMENTS
+ ${HDF5_SOURCE_DIR}/COPYING
+ DESTINATION ${HDF5_INSTALL_DATA_DIR}
+ COMPONENT hdfdocuments
+ )
+ IF (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
+ SET (release_files
+ ${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_CMake.txt
+ ${HDF5_SOURCE_DIR}/release_docs/COPYING
+ ${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt
+ )
+ IF (WIN32 AND NOT CYGWIN)
+ SET (release_files
+ ${release_files}
+ ${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_VS.txt
+ )
+ ENDIF (WIN32 AND NOT CYGWIN)
+ IF (HDF5_PACK_INSTALL_DOCS)
+ SET (release_files
+ ${release_files}
+ ${HDF5_SOURCE_DIR}/release_docs/INSTALL_CMake.txt
+ ${HDF5_SOURCE_DIR}/release_docs/HISTORY-1_8.txt
+ ${HDF5_SOURCE_DIR}/release_docs/INSTALL
+ )
+ IF (WIN32)
+ IF (NOT CYGWIN)
+ SET (release_files
+ ${release_files}
+ ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Windows.txt
+ )
+ ELSE (NOT CYGWIN)
+ SET (release_files
+ ${release_files}
+ ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Cygwin.txt
+ )
+ ENDIF (NOT CYGWIN)
+ ENDIF (WIN32)
+ IF (HDF5_ENABLE_PARALLEL)
+ SET (release_files
+ ${release_files}
+ ${HDF5_SOURCE_DIR}/release_docs/INSTALL_parallel
+ )
+ ENDIF (HDF5_ENABLE_PARALLEL)
+ ENDIF (HDF5_PACK_INSTALL_DOCS)
+ INSTALL (
+ FILES ${release_files}
+ DESTINATION ${HDF5_INSTALL_DATA_DIR}
+ COMPONENT hdfdocuments
+ )
+ ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
+ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
+
+#-----------------------------------------------------------------------------
+# Set the cpack variables
+#-----------------------------------------------------------------------------
+IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
+ SET (CPACK_PACKAGE_VENDOR "HDF_Group")
+ SET (CPACK_PACKAGE_NAME "${HDF5_PACKAGE_NAME}")
+ SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${HDF5_PACKAGE_NAME}")
+ SET (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}")
+ SET (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}")
+ SET (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}")
+ SET (CPACK_PACKAGE_VERSION_PATCH "")
+ IF (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
+ SET (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
+ SET (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/COPYING")
+ SET (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
+ ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
+ SET (CPACK_PACKAGE_RELOCATABLE TRUE)
+
+ SET (CPACK_GENERATOR "TGZ")
+ IF (WIN32)
+ LIST (APPEND CPACK_GENERATOR "NSIS")
+ SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${LIB_TYPE}")
+ SET (CPACK_MONOLITHIC_INSTALL ON)
+ SET (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}")
+ SET (CPACK_NSIS_MODIFY_PATH ON)
+ SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${CPACK_PACKAGE_VERSION}")
+ ELSEIF (APPLE)
+ LIST (APPEND CPACK_GENERATOR "DragNDrop")
+ SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
+ SET (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}")
+ SET (CPACK_PACKAGING_INSTALL_PREFIX "/")
+ SET (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
+ SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif")
+ SET (CPACK_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/".
+
+ LIST (APPEND CPACK_GENERATOR "Bundle")
+ #-----------------------------------------------------------------------------
+ # Configure the Info.plist file for the install bundle
+ #-----------------------------------------------------------------------------
+ CONFIGURE_FILE (
+ ${HDF5_RESOURCES_DIR}/CPack.Info.plist.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY
+ )
+ SET (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
+ SET (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in /
+ SET (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/")
+ SET (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif")
+ SET (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist")
+# SET (CPACK_BUNDLE_STARTUP_COMMAND "${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-startup.sh")
+ ELSE (WIN32)
+ SET (CPACK_PACKAGING_INSTALL_PREFIX "/usr")
+ SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
+
+ SET (CPACK_DEBIAN_PACKAGE_SECTION "Libraries")
+ SET (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}")
+
+ SET (CPACK_RPM_COMPONENT_INSTALL ON)
+ SET (CPACK_RPM_PACKAGE_RELOCATABLE ON)
+ SET (CPACK_RPM_PACKAGE_LICENSE "BSD-style")
+ SET (CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
+ SET (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}")
+ SET (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.")
+ SET (CPACK_RPM_PACKAGE_DESCRIPTION
+ "The HDF5 technology suite includes:
+
+ * A versatile data model that can represent very complex data objects and a wide variety of metadata.
+
+ * A completely portable file format with no limit on the number or size of data objects in the collection.
+
+ * A software library that runs on a range of computational platforms, from laptops to massively parallel systems, and implements a high-level API with C, C++, Fortran 90, and Java interfaces.
+
+ * A rich set of integrated performance features that allow for access time and storage space optimizations.
+
+ * Tools and applications for managing, manipulating, viewing, and analyzing the data in the collection.
+
+The HDF5 data model, file format, API, library, and tools are open and distributed without charge.
+"
+ )
+ ENDIF (WIN32)
+
+ INCLUDE(InstallRequiredSystemLibraries)
+
+ SET (CPACK_INSTALL_CMAKE_PROJECTS "${HDF5_BINARY_DIR};HDF5;ALL;/")
+
+ IF (HDF5_PACKAGE_EXTLIBS)
+ IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ IF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
+ SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/")
+ SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;headers;/")
+ SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;configinstall;/")
+ ENDIF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
+ IF (SZIP_FOUND AND SZIP_USE_EXTERNAL)
+ SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/")
+ SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;headers;/")
+ SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/")
+ ENDIF (SZIP_FOUND AND SZIP_USE_EXTERNAL)
+ ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
+ ENDIF (HDF5_PACKAGE_EXTLIBS)
+
+ INCLUDE (CPack)
+
+ #---------------------------------------------------------------------------
+ # Now list the cpack commands
+ #---------------------------------------------------------------------------
+ CPACK_ADD_COMPONENT (hdfapplications
+ DISPLAY_NAME "HDF5 Applications"
+ DEPENDS libraries
+ GROUP Applications
+ )
+ CPACK_ADD_COMPONENT (libraries
+ DISPLAY_NAME "HDF5 Libraries"
+ GROUP Runtime
+ )
+ CPACK_ADD_COMPONENT (headers
+ DISPLAY_NAME "HDF5 Headers"
+ DEPENDS libraries
+ GROUP Development
+ )
+ CPACK_ADD_COMPONENT (hdfdocuments
+ DISPLAY_NAME "HDF5 Documents"
+ GROUP Documents
+ )
+ CPACK_ADD_COMPONENT (configinstall
+ DISPLAY_NAME "HDF5 CMake files"
+ DEPENDS libraries
+ GROUP Development
+ )
+
+ IF (HDF5_BUILD_FORTRAN)
+ CPACK_ADD_COMPONENT (fortlibraries
+ DISPLAY_NAME "HDF5 Fortran Libraries"
+ DEPENDS libraries
+ GROUP Runtime
+ )
+ CPACK_ADD_COMPONENT (fortheaders
+ DISPLAY_NAME "HDF5 Fortran Headers"
+ DEPENDS fortlibraries
+ GROUP Development
+ )
+ ENDIF (HDF5_BUILD_FORTRAN)
+
+ IF (HDF5_BUILD_CPP_LIB)
+ CPACK_ADD_COMPONENT (cpplibraries
+ DISPLAY_NAME "HDF5 C++ Libraries"
+ DEPENDS libraries
+ GROUP Runtime
+ )
+ CPACK_ADD_COMPONENT (cppheaders
+ DISPLAY_NAME "HDF5 C++ Headers"
+ DEPENDS cpplibraries
+ GROUP Development
+ )
+ ENDIF (HDF5_BUILD_CPP_LIB)
+
+ IF (HDF5_BUILD_TOOLS)
+ CPACK_ADD_COMPONENT (toolsapplications
+ DISPLAY_NAME "HDF5 Tools Applications"
+ DEPENDS toolslibraries
+ GROUP Applications
+ )
+ CPACK_ADD_COMPONENT (toolslibraries
+ DISPLAY_NAME "HDF5 Tools Libraries"
+ DEPENDS libraries
+ GROUP Runtime
+ )
+ CPACK_ADD_COMPONENT (toolsheaders
+ DISPLAY_NAME "HDF5 Tools Headers"
+ DEPENDS toolslibraries
+ GROUP Development
+ )
+ ENDIF (HDF5_BUILD_TOOLS)
+
+ IF (HDF5_BUILD_HL_LIB)
+ CPACK_ADD_COMPONENT (hllibraries
+ DISPLAY_NAME "HDF5 HL Libraries"
+ DEPENDS libraries
+ GROUP Runtime
+ )
+ CPACK_ADD_COMPONENT (hlheaders
+ DISPLAY_NAME "HDF5 HL Headers"
+ DEPENDS hllibraries
+ GROUP Development
+ )
+ CPACK_ADD_COMPONENT (hltoolsapplications
+ DISPLAY_NAME "HDF5 HL Tools Applications"
+ DEPENDS hllibraries
+ GROUP Applications
+ )
+ CPACK_ADD_COMPONENT (hlcpplibraries
+ DISPLAY_NAME "HDF5 HL C++ Libraries"
+ DEPENDS hllibraries
+ GROUP Runtime
+ )
+ CPACK_ADD_COMPONENT (hlcppheaders
+ DISPLAY_NAME "HDF5 HL C++ Headers"
+ DEPENDS hlcpplibraries
+ GROUP Development
+ )
+ CPACK_ADD_COMPONENT (hlfortlibraries
+ DISPLAY_NAME "HDF5 HL Fortran Libraries"
+ DEPENDS fortlibraries
+ GROUP Runtime
+ )
+ ENDIF (HDF5_BUILD_HL_LIB)
+
+ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aa3bbbf..4e3d753 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -677,127 +677,7 @@ ENDIF (HDF5_USE_18_API_DEFAULT)
#-----------------------------------------------------------------------------
INCLUDE (UserMacros.cmake)
-#-----------------------------------------------------------------------------
-# Options for HDF5 Filters
-#-----------------------------------------------------------------------------
-MACRO (HDF5_SETUP_FILTERS FILTER)
- OPTION (HDF5_USE_FILTER_${FILTER} "Use the ${FILTER} Filter" ON)
- IF (HDF5_USE_FILTER_${FILTER})
- SET (H5_HAVE_FILTER_${FILTER} 1)
- SET (FILTERS "${FILTERS} ${FILTER}")
- ENDIF (HDF5_USE_FILTER_${FILTER})
- # MESSAGE (STATUS "Filter ${FILTER} is ${HDF5_USE_FILTER_${FILTER}}")
-ENDMACRO (HDF5_SETUP_FILTERS)
-
-HDF5_SETUP_FILTERS (SHUFFLE)
-HDF5_SETUP_FILTERS (FLETCHER32)
-HDF5_SETUP_FILTERS (NBIT)
-HDF5_SETUP_FILTERS (SCALEOFFSET)
-
-INCLUDE (ExternalProject)
-OPTION (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO")
-IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- OPTION (ZLIB_USE_EXTERNAL "Use External Library Building for ZLIB" 1)
- OPTION (SZIP_USE_EXTERNAL "Use External Library Building for SZIP" 1)
- IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
- SET (ZLIB_URL ${ZLIB_SVN_URL})
- SET (SZIP_URL ${SZIP_SVN_URL})
- ELSEIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- IF (NOT TGZ_PATH)
- SET (TGZ_PATH ${HDF5_SOURCE_DIR})
- ENDIF (NOT TGZ_PATH)
- SET (ZLIB_URL ${TGZ_PATH}/${ZLIB_TGZ_NAME})
- SET (SZIP_URL ${TGZ_PATH}/${SZIP_TGZ_NAME})
- ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
- SET (ZLIB_USE_EXTERNAL 0)
- SET (SZIP_USE_EXTERNAL 0)
- ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN")
-ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
-
-#-----------------------------------------------------------------------------
-# Option for ZLib support
-#-----------------------------------------------------------------------------
-OPTION (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF)
-IF (HDF5_ENABLE_Z_LIB_SUPPORT)
- IF (NOT H5_ZLIB_HEADER)
- IF (NOT ZLIB_USE_EXTERNAL)
- FIND_PACKAGE (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT})
- IF (NOT ZLIB_FOUND)
- FIND_PACKAGE (ZLIB) # Legacy find
- ENDIF (NOT ZLIB_FOUND)
- ENDIF (NOT ZLIB_USE_EXTERNAL)
- IF (ZLIB_FOUND)
- SET (H5_HAVE_FILTER_DEFLATE 1)
- SET (H5_HAVE_ZLIB_H 1)
- SET (H5_HAVE_LIBZ 1)
- SET (H5_ZLIB_HEADER "zlib.h")
- SET (ZLIB_INCLUDE_DIR_GEN ${ZLIB_INCLUDE_DIR})
- SET (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
- ELSE (ZLIB_FOUND)
- IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE})
- SET (H5_HAVE_FILTER_DEFLATE 1)
- SET (H5_HAVE_ZLIB_H 1)
- SET (H5_HAVE_LIBZ 1)
- MESSAGE (STATUS "Filter ZLIB is built")
- ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- MESSAGE (FATAL_ERROR " ZLib is Required for ZLib support in HDF5")
- ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- ENDIF (ZLIB_FOUND)
- ELSE (NOT H5_ZLIB_HEADER)
- # This project is being called from within another and ZLib is already configured
- SET (H5_HAVE_FILTER_DEFLATE 1)
- SET (H5_HAVE_ZLIB_H 1)
- SET (H5_HAVE_LIBZ 1)
- ENDIF (NOT H5_ZLIB_HEADER)
- IF (H5_HAVE_FILTER_DEFLATE)
- SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
- ENDIF (H5_HAVE_FILTER_DEFLATE)
- SET (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES})
- INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
- MESSAGE (STATUS "Filter ZLIB is ON")
-ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT)
-
-#-----------------------------------------------------------------------------
-# Option for SzLib support
-#-----------------------------------------------------------------------------
-OPTION (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
-IF (HDF5_ENABLE_SZIP_SUPPORT)
- OPTION (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
- IF (NOT SZIP_USE_EXTERNAL)
- FIND_PACKAGE (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT})
- IF (NOT SZIP_FOUND)
- FIND_PACKAGE (SZIP) # Legacy find
- ENDIF (NOT SZIP_FOUND)
- ENDIF (NOT SZIP_USE_EXTERNAL)
- IF (SZIP_FOUND)
- SET (H5_HAVE_FILTER_SZIP 1)
- SET (H5_HAVE_SZLIB_H 1)
- SET (H5_HAVE_LIBSZ 1)
- SET (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
- SET (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
- ELSE (SZIP_FOUND)
- IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE} ${HDF5_ENABLE_SZIP_ENCODING})
- SET (H5_HAVE_FILTER_SZIP 1)
- SET (H5_HAVE_SZLIB_H 1)
- SET (H5_HAVE_LIBSZ 1)
- MESSAGE (STATUS "Filter SZIP is built")
- ELSE (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- MESSAGE (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
- ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- ENDIF (SZIP_FOUND)
- SET (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
- INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIR})
- MESSAGE (STATUS "Filter SZIP is ON")
- IF (H5_HAVE_FILTER_SZIP)
- SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DECODE")
- ENDIF (H5_HAVE_FILTER_SZIP)
- IF (HDF5_ENABLE_SZIP_ENCODING)
- SET (H5_HAVE_SZIP_ENCODER 1)
- SET (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} ENCODE")
- ENDIF (HDF5_ENABLE_SZIP_ENCODING)
-ENDIF (HDF5_ENABLE_SZIP_SUPPORT)
+INCLUDE (CMakeFilters.cmake)
#-----------------------------------------------------------------------------
# Option for external libraries on windows
@@ -995,404 +875,4 @@ ENDIF (EXISTS "${HDF5_SOURCE_DIR}/hl" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/hl")
#-----------------------------------------------------------------------------
CONFIGURE_FILE (${HDF5_RESOURCES_DIR}/H5pubconf.h.in ${HDF5_BINARY_DIR}/H5pubconf.h @ONLY)
-#-----------------------------------------------------------------------------
-# Add file(s) to CMake Install
-#-----------------------------------------------------------------------------
-IF (NOT HDF5_INSTALL_NO_DEVELOPMENT)
- INSTALL (
- FILES ${PROJECT_BINARY_DIR}/H5pubconf.h
- DESTINATION ${HDF5_INSTALL_INCLUDE_DIR}
- COMPONENT headers
- )
-ENDIF (NOT HDF5_INSTALL_NO_DEVELOPMENT)
-
-#-----------------------------------------------------------------------------
-# Add Target(s) to CMake Install for import into other projects
-#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- INSTALL (
- EXPORT ${HDF5_EXPORTED_TARGETS}
- DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
- FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
- COMPONENT configinstall
- )
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
-
-#-----------------------------------------------------------------------------
-# Export all exported targets to the build tree for use by parent project
-#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- EXPORT (
- TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES}
- FILE ${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-targets.cmake
- )
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
-
-#-----------------------------------------------------------------------------
-# Configure the hdf5-config.cmake file for the build directory
-#-----------------------------------------------------------------------------
-SET (HDF5_INCLUDES_BUILD_TIME
- ${HDF5_SRC_DIR} ${HDF5_CPP_SRC_DIR} ${HDF5_HL_SRC_DIR}
- ${HDF5_TOOLS_SRC_DIR} ${HDF5_BINARY_DIR}
-)
-SET (HDF5_VERSION_STRING @HDF5_PACKAGE_VERSION@)
-SET (HDF5_VERSION_MAJOR @HDF5_PACKAGE_VERSION_MAJOR@)
-SET (HDF5_VERSION_MINOR @HDF5_PACKAGE_VERSION_MINOR@)
-
-CONFIGURE_FILE (
- ${HDF5_RESOURCES_DIR}/hdf5-config.cmake.build.in
- ${HDF5_BINARY_DIR}/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake @ONLY
-)
-
-#-----------------------------------------------------------------------------
-# Configure the FindHDF5.cmake file for the install directory
-#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- CONFIGURE_FILE (
- ${HDF5_RESOURCES_DIR}/FindHDF5.cmake.in
- ${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake @ONLY
- )
- INSTALL (
- FILES ${HDF5_BINARY_DIR}/CMakeFiles/FindHDF5${HDF_PACKAGE_EXT}.cmake
- DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
- COMPONENT configinstall
- )
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
-
-#-----------------------------------------------------------------------------
-# Configure the hdf5-config.cmake file for the install directory
-#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- CONFIGURE_FILE (
- ${HDF5_RESOURCES_DIR}/hdf5-config.cmake.install.in
- ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake @ONLY
- )
- INSTALL (
- FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config.cmake
- DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
- COMPONENT configinstall
- )
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
-
-#-----------------------------------------------------------------------------
-# Configure the hdf5-config-version .cmake file for the install directory
-#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- CONFIGURE_FILE (
- ${HDF5_RESOURCES_DIR}/hdf5-config-version.cmake.in
- ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake @ONLY
- )
- INSTALL (
- FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-config-version.cmake
- DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
- COMPONENT configinstall
- )
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
-
-#-----------------------------------------------------------------------------
-# Configure the libhdf5.settings file for the lib info
-#-----------------------------------------------------------------------------
-IF (H5_WORDS_BIGENDIAN)
- SET (BYTESEX big-endian)
-ELSE (H5_WORDS_BIGENDIAN)
- SET (BYTESEX little-endian)
-ENDIF (H5_WORDS_BIGENDIAN)
-CONFIGURE_FILE (
- ${HDF5_RESOURCES_DIR}/libhdf5.settings.cmake.in
- ${HDF5_BINARY_DIR}/libhdf5.settings @ONLY
-)
-INSTALL (
- FILES ${HDF5_BINARY_DIR}/libhdf5.settings
- DESTINATION ${HDF5_INSTALL_CMAKE_DIR}/${HDF5_PACKAGE}
- COMPONENT libraries
-)
-
-#-----------------------------------------------------------------------------
-# Configure the HDF518_Examples.cmake file and the examples
-#-----------------------------------------------------------------------------
-OPTION (HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF)
-IF (HDF5_PACK_EXAMPLES)
- CONFIGURE_FILE (
- ${HDF5_RESOURCES_DIR}/HDF518_Examples.cmake.in
- ${HDF5_BINARY_DIR}/HDF518_Examples.cmake @ONLY
- )
- INSTALL (
- FILES ${HDF5_BINARY_DIR}/HDF518_Examples.cmake
- DESTINATION ${HDF5_INSTALL_DATA_DIR}
- COMPONENT hdfdocuments
- )
- IF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}")
- INSTALL (
- FILES
- ${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}
- ${HDF5_SOURCE_DIR}/release_docs/USING_CMake_Examples.txt
- DESTINATION ${HDF5_INSTALL_DATA_DIR}
- COMPONENT hdfdocuments
- )
- ENDIF (EXISTS "${HDF5_EXAMPLES_COMPRESSED_DIR}/${HDF5_EXAMPLES_COMPRESSED}")
-ENDIF (HDF5_PACK_EXAMPLES)
-
-#-----------------------------------------------------------------------------
-# Add Document File(s) to CMake Install
-#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED)
- INSTALL (
- FILES
- ${HDF5_SOURCE_DIR}/ACKNOWLEDGMENTS
- ${HDF5_SOURCE_DIR}/COPYING
- DESTINATION ${HDF5_INSTALL_DATA_DIR}
- COMPONENT hdfdocuments
- )
- IF (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
- SET (release_files
- ${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_CMake.txt
- ${HDF5_SOURCE_DIR}/release_docs/COPYING
- ${HDF5_SOURCE_DIR}/release_docs/RELEASE.txt
- )
- IF (WIN32 AND NOT CYGWIN)
- SET (release_files
- ${release_files}
- ${HDF5_SOURCE_DIR}/release_docs/USING_HDF5_VS.txt
- )
- ENDIF (WIN32 AND NOT CYGWIN)
- IF (HDF5_PACK_INSTALL_DOCS)
- SET (release_files
- ${release_files}
- ${HDF5_SOURCE_DIR}/release_docs/INSTALL_CMake.txt
- ${HDF5_SOURCE_DIR}/release_docs/HISTORY-1_8.txt
- ${HDF5_SOURCE_DIR}/release_docs/INSTALL
- )
- IF (WIN32)
- IF (NOT CYGWIN)
- SET (release_files
- ${release_files}
- ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Windows.txt
- )
- ELSE (NOT CYGWIN)
- SET (release_files
- ${release_files}
- ${HDF5_SOURCE_DIR}/release_docs/INSTALL_Cygwin.txt
- )
- ENDIF (NOT CYGWIN)
- ENDIF (WIN32)
- IF (HDF5_ENABLE_PARALLEL)
- SET (release_files
- ${release_files}
- ${HDF5_SOURCE_DIR}/release_docs/INSTALL_parallel
- )
- ENDIF (HDF5_ENABLE_PARALLEL)
- ENDIF (HDF5_PACK_INSTALL_DOCS)
- INSTALL (
- FILES ${release_files}
- DESTINATION ${HDF5_INSTALL_DATA_DIR}
- COMPONENT hdfdocuments
- )
- ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/release_docs")
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED)
-
-#-----------------------------------------------------------------------------
-# Set the cpack variables
-#-----------------------------------------------------------------------------
-IF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
- SET (CPACK_PACKAGE_VENDOR "HDF_Group")
- SET (CPACK_PACKAGE_NAME "${HDF5_PACKAGE_NAME}")
- SET (CPACK_PACKAGE_INSTALL_DIRECTORY "${HDF5_PACKAGE_NAME}")
- SET (CPACK_PACKAGE_VERSION "${HDF5_PACKAGE_VERSION}")
- SET (CPACK_PACKAGE_VERSION_MAJOR "${HDF5_PACKAGE_VERSION_MAJOR}")
- SET (CPACK_PACKAGE_VERSION_MINOR "${HDF5_PACKAGE_VERSION_MINOR}")
- SET (CPACK_PACKAGE_VERSION_PATCH "")
- IF (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
- SET (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
- SET (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/COPYING")
- SET (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
- ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
- SET (CPACK_PACKAGE_RELOCATABLE TRUE)
-
- SET (CPACK_GENERATOR "TGZ")
- IF (WIN32)
- LIST (APPEND CPACK_GENERATOR "NSIS")
- SET (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${LIB_TYPE}")
- SET (CPACK_MONOLITHIC_INSTALL ON)
- SET (CPACK_NSIS_CONTACT "${HDF5_PACKAGE_BUGREPORT}")
- SET (CPACK_NSIS_MODIFY_PATH ON)
- SET (CPACK_NSIS_PACKAGE_NAME "HDF5 ${CPACK_PACKAGE_VERSION}")
- ELSEIF (APPLE)
- LIST (APPEND CPACK_GENERATOR "DragNDrop")
- SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
- SET (CPACK_PACKAGE_DEFAULT_LOCATION "/opt/${CPACK_PACKAGE_NAME}")
- SET (CPACK_PACKAGING_INSTALL_PREFIX "/")
- SET (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}")
- SET (CPACK_PACKAGE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif")
- SET (CPACK_SET_DESTDIR TRUE) # Required when packaging, and set CMAKE_INSTALL_PREFIX to "/".
-
- LIST (APPEND CPACK_GENERATOR "Bundle")
- #-----------------------------------------------------------------------------
- # Configure the Info.plist file for the install bundle
- #-----------------------------------------------------------------------------
- CONFIGURE_FILE (
- ${HDF5_RESOURCES_DIR}/CPack.Info.plist.in
- ${HDF5_BINARY_DIR}/CMakeFiles/Info.plist @ONLY
- )
- SET (CPACK_BUNDLE_NAME "${HDF5_PACKAGE_STRING}")
- SET (CPACK_BUNDLE_LOCATION "/") # make sure CMAKE_INSTALL_PREFIX ends in /
- SET (CMAKE_INSTALL_PREFIX "/${CPACK_BUNDLE_NAME}.framework/Versions/${CPACK_PACKAGE_VERSION}/${CPACK_PACKAGE_NAME}/")
- SET (CPACK_BUNDLE_ICON "${HDF5_RESOURCES_DIR}/hdf.gif")
- SET (CPACK_BUNDLE_PLIST "${HDF5_BINARY_DIR}/CMakeFiles/Info.plist")
-# SET (CPACK_BUNDLE_STARTUP_COMMAND "${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_PACKAGE}${HDF_PACKAGE_EXT}-startup.sh")
- ELSE (WIN32)
- SET (CPACK_PACKAGING_INSTALL_PREFIX "/usr")
- SET (CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
-
- SET (CPACK_DEBIAN_PACKAGE_SECTION "Libraries")
- SET (CPACK_DEBIAN_PACKAGE_MAINTAINER "${HDF5_PACKAGE_BUGREPORT}")
-
- SET (CPACK_RPM_COMPONENT_INSTALL ON)
- SET (CPACK_RPM_PACKAGE_RELOCATABLE ON)
- SET (CPACK_RPM_PACKAGE_LICENSE "BSD-style")
- SET (CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
- SET (CPACK_RPM_PACKAGE_URL "${HDF5_PACKAGE_URL}")
- SET (CPACK_RPM_PACKAGE_SUMMARY "HDF5 is a unique technology suite that makes possible the management of extremely large and complex data collections.")
- SET (CPACK_RPM_PACKAGE_DESCRIPTION
- "The HDF5 technology suite includes:
-
- * A versatile data model that can represent very complex data objects and a wide variety of metadata.
-
- * A completely portable file format with no limit on the number or size of data objects in the collection.
-
- * A software library that runs on a range of computational platforms, from laptops to massively parallel systems, and implements a high-level API with C, C++, Fortran 90, and Java interfaces.
-
- * A rich set of integrated performance features that allow for access time and storage space optimizations.
-
- * Tools and applications for managing, manipulating, viewing, and analyzing the data in the collection.
-
-The HDF5 data model, file format, API, library, and tools are open and distributed without charge.
-"
- )
- ENDIF (WIN32)
-
- INCLUDE(InstallRequiredSystemLibraries)
-
- SET (CPACK_INSTALL_CMAKE_PROJECTS "${HDF5_BINARY_DIR};HDF5;ALL;/")
-
- IF (HDF5_PACKAGE_EXTLIBS)
- IF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- IF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
- SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;libraries;/")
- SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;headers;/")
- SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${ZLIB_INCLUDE_DIR_GEN};ZLIB;configinstall;/")
- ENDIF (ZLIB_FOUND AND ZLIB_USE_EXTERNAL)
- IF (SZIP_FOUND AND SZIP_USE_EXTERNAL)
- SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/")
- SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;headers;/")
- SET (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/")
- ENDIF (SZIP_FOUND AND SZIP_USE_EXTERNAL)
- ENDIF (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
- ENDIF (HDF5_PACKAGE_EXTLIBS)
-
- INCLUDE (CPack)
-
- #---------------------------------------------------------------------------
- # Now list the cpack commands
- #---------------------------------------------------------------------------
- CPACK_ADD_COMPONENT (hdfapplications
- DISPLAY_NAME "HDF5 Applications"
- DEPENDS libraries
- GROUP Applications
- )
- CPACK_ADD_COMPONENT (libraries
- DISPLAY_NAME "HDF5 Libraries"
- GROUP Runtime
- )
- CPACK_ADD_COMPONENT (headers
- DISPLAY_NAME "HDF5 Headers"
- DEPENDS libraries
- GROUP Development
- )
- CPACK_ADD_COMPONENT (hdfdocuments
- DISPLAY_NAME "HDF5 Documents"
- GROUP Documents
- )
- CPACK_ADD_COMPONENT (configinstall
- DISPLAY_NAME "HDF5 CMake files"
- DEPENDS libraries
- GROUP Development
- )
-
- IF (HDF5_BUILD_FORTRAN)
- CPACK_ADD_COMPONENT (fortlibraries
- DISPLAY_NAME "HDF5 Fortran Libraries"
- DEPENDS libraries
- GROUP Runtime
- )
- CPACK_ADD_COMPONENT (fortheaders
- DISPLAY_NAME "HDF5 Fortran Headers"
- DEPENDS fortlibraries
- GROUP Development
- )
- ENDIF (HDF5_BUILD_FORTRAN)
-
- IF (HDF5_BUILD_CPP_LIB)
- CPACK_ADD_COMPONENT (cpplibraries
- DISPLAY_NAME "HDF5 C++ Libraries"
- DEPENDS libraries
- GROUP Runtime
- )
- CPACK_ADD_COMPONENT (cppheaders
- DISPLAY_NAME "HDF5 C++ Headers"
- DEPENDS cpplibraries
- GROUP Development
- )
- ENDIF (HDF5_BUILD_CPP_LIB)
-
- IF (HDF5_BUILD_TOOLS)
- CPACK_ADD_COMPONENT (toolsapplications
- DISPLAY_NAME "HDF5 Tools Applications"
- DEPENDS toolslibraries
- GROUP Applications
- )
- CPACK_ADD_COMPONENT (toolslibraries
- DISPLAY_NAME "HDF5 Tools Libraries"
- DEPENDS libraries
- GROUP Runtime
- )
- CPACK_ADD_COMPONENT (toolsheaders
- DISPLAY_NAME "HDF5 Tools Headers"
- DEPENDS toolslibraries
- GROUP Development
- )
- ENDIF (HDF5_BUILD_TOOLS)
-
- IF (HDF5_BUILD_HL_LIB)
- CPACK_ADD_COMPONENT (hllibraries
- DISPLAY_NAME "HDF5 HL Libraries"
- DEPENDS libraries
- GROUP Runtime
- )
- CPACK_ADD_COMPONENT (hlheaders
- DISPLAY_NAME "HDF5 HL Headers"
- DEPENDS hllibraries
- GROUP Development
- )
- CPACK_ADD_COMPONENT (hltoolsapplications
- DISPLAY_NAME "HDF5 HL Tools Applications"
- DEPENDS hllibraries
- GROUP Applications
- )
- CPACK_ADD_COMPONENT (hlcpplibraries
- DISPLAY_NAME "HDF5 HL C++ Libraries"
- DEPENDS hllibraries
- GROUP Runtime
- )
- CPACK_ADD_COMPONENT (hlcppheaders
- DISPLAY_NAME "HDF5 HL C++ Headers"
- DEPENDS hlcpplibraries
- GROUP Development
- )
- CPACK_ADD_COMPONENT (hlfortlibraries
- DISPLAY_NAME "HDF5 HL Fortran Libraries"
- DEPENDS fortlibraries
- GROUP Runtime
- )
- ENDIF (HDF5_BUILD_HL_LIB)
-
-ENDIF (NOT HDF5_EXTERNALLY_CONFIGURED AND NOT HDF5_NO_PACKAGES)
+INCLUDE (CMakeInstallation.cmake)
diff --git a/MANIFEST b/MANIFEST
index ce1cc5b..9911380 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2428,45 +2428,74 @@
./release_docs/USING_CMake_Examples.txt
./CMakeLists.txt
+./CMakeFilters.cmake
+./CMakeInstallation.cmake
./CTestConfig.cmake
./UserMacros.cmake
./c++/CMakeLists.txt
./c++/examples/CMakeLists.txt
+./c++/examples/CMakeTests.cmake
./c++/src/CMakeLists.txt
./c++/test/CMakeLists.txt
+./c++/test/CMakeTests.cmake
./examples/CMakeLists.txt
+./examples/CMakeTests.cmake
./examples/run-all-ex.sh
./examples/run-c-ex.sh.in
./fortran/CMakeLists.txt
./fortran/examples/CMakeLists.txt
+./fortran/examples/CMakeTests.cmake
./fortran/src/CMakeLists.txt
./fortran/test/CMakeLists.txt
+./fortran/test/CMakeTests.cmake
./fortran/testpar/CMakeLists.txt
+./fortran/testpar/CMakeTests.cmake
./hl/CMakeLists.txt
./hl/c++/CMakeLists.txt
./hl/c++/examples/CMakeLists.txt
+./hl/c++/examples/CMakeTests.cmake
./hl/c++/src/CMakeLists.txt
./hl/c++/test/CMakeLists.txt
+./hl/c++/test/CMakeTests.cmake
./hl/examples/CMakeLists.txt
+./hl/examples/CMakeTests.cmake
./hl/fortran/CMakeLists.txt
./hl/fortran/examples/CMakeLists.txt
+./hl/fortran/examples/CMakeTests.cmake
./hl/fortran/src/CMakeLists.txt
./hl/fortran/test/CMakeLists.txt
+./hl/fortran/test/CMakeTests.cmake
./hl/src/CMakeLists.txt
./hl/test/CMakeLists.txt
+./hl/test/CMakeTests.cmake
./hl/tools/CMakeLists.txt
+./hl/tools/CMakeTests.cmake
./perform/CMakeLists.txt
+./perform/CMakeTests.cmake
./src/CMakeLists.txt
./test/CMakeLists.txt
+./test/CMakeTests.cmake
./testpar/CMakeLists.txt
+./testpar/CMakeTests.cmake
./tools/CMakeLists.txt
./tools/h5copy/CMakeLists.txt
+./tools/h5copy/CMakeTests.cmake
./tools/h5diff/CMakeLists.txt
+./tools/h5diff/CMakeTests.cmake
./tools/h5dump/CMakeLists.txt
+./tools/h5dump/CMakeTests.cmake
+./tools/h5dump/CMakeTestsPBITS.cmake
+./tools/h5dump/CMakeTestsXML.cmake
./tools/h5import/CMakeLists.txt
+./tools/h5import/CMakeTests.cmake
./tools/h5jam/CMakeLists.txt
+./tools/h5jam/CMakeTests.cmake
./tools/h5ls/CMakeLists.txt
+./tools/h5ls/CMakeTests.cmake
./tools/h5repack/CMakeLists.txt
+./tools/h5repack/CMakeTests.cmake
./tools/h5stat/CMakeLists.txt
+./tools/h5stat/CMakeTests.cmake
./tools/lib/CMakeLists.txt
./tools/misc/CMakeLists.txt
+./tools/misc/CMakeTests.cmake
diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt
index dd8e45d..c25b98c 100644
--- a/c++/examples/CMakeLists.txt
+++ b/c++/examples/CMakeLists.txt
@@ -29,27 +29,5 @@ FOREACH (example ${examples})
ENDFOREACH (example ${examples})
IF (BUILD_TESTING)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME cpp_ex-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- Group.h5
- SDS.h5
- SDScompound.h5
- SDSextendible.h5
- Select.h5
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (cpp_ex-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "cpp_ex-clear-objects")
-
- FOREACH (example ${examples})
- ADD_TEST (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "cpp_ex_${example}")
- ENDFOREACH (example ${examples})
+ INCLUDE (CMakeTests.cmake)
ENDIF (BUILD_TESTING)
diff --git a/c++/examples/CMakeTests.cmake b/c++/examples/CMakeTests.cmake
new file mode 100644
index 0000000..47f8ffa
--- /dev/null
+++ b/c++/examples/CMakeTests.cmake
@@ -0,0 +1,29 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME cpp_ex-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ Group.h5
+ SDS.h5
+ SDScompound.h5
+ SDSextendible.h5
+ Select.h5
+ )
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (cpp_ex-clear-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "cpp_ex-clear-objects")
+
+ FOREACH (example ${examples})
+ ADD_TEST (NAME cpp_ex_${example} COMMAND $<TARGET_FILE:cpp_ex_${example}>)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (cpp_ex_${example} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "cpp_ex_${example}")
+ ENDFOREACH (example ${examples})
diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt
index b31185e..e498fc5 100644
--- a/c++/test/CMakeLists.txt
+++ b/c++/test/CMakeLists.txt
@@ -52,42 +52,4 @@ ADD_CUSTOM_COMMAND (
ARGS -E copy_if_different ${HDF5_CPP_TEST_SOURCE_DIR}/th5s.h5 ${PROJECT_BINARY_DIR}/th5s.h5
)
-ADD_TEST (NAME cpp_testhdf5 COMMAND $<TARGET_FILE:cpp_testhdf5>)
-
-IF (HDF5_TEST_VFD)
-
- SET (VFD_LIST
- sec2
- stdio
- core
- split
- multi
- family
- )
-
- IF (DIRECT_VFD)
- SET (VFD_LIST ${VFD_LIST} direct)
- ENDIF (DIRECT_VFD)
-
- MACRO (ADD_VFD_TEST vfdname resultcode)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME VFD-${vfdname}-cpp_testhdf5
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=cpp_testhdf5"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
- )
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_VFD_TEST)
-
- # Run test with different Virtual File Driver
- FOREACH (vfd ${VFD_LIST})
- ADD_VFD_TEST (${vfd} 0)
- ENDFOREACH (vfd ${VFD_LIST})
-
-ENDIF (HDF5_TEST_VFD)
+INCLUDE (CMakeTests.cmake)
diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake
new file mode 100644
index 0000000..f2a10e2
--- /dev/null
+++ b/c++/test/CMakeTests.cmake
@@ -0,0 +1,46 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ADD_TEST (NAME cpp_testhdf5 COMMAND $<TARGET_FILE:cpp_testhdf5>)
+
+IF (HDF5_TEST_VFD)
+
+ SET (VFD_LIST
+ sec2
+ stdio
+ core
+ split
+ multi
+ family
+ )
+
+ IF (DIRECT_VFD)
+ SET (VFD_LIST ${VFD_LIST} direct)
+ ENDIF (DIRECT_VFD)
+
+ MACRO (ADD_VFD_TEST vfdname resultcode)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME VFD-${vfdname}-cpp_testhdf5
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=cpp_testhdf5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_VFD_TEST)
+
+ # Run test with different Virtual File Driver
+ FOREACH (vfd ${VFD_LIST})
+ ADD_VFD_TEST (${vfd} 0)
+ ENDFOREACH (vfd ${VFD_LIST})
+
+ENDIF (HDF5_TEST_VFD)
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 01daf69..e7a1326 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -53,60 +53,5 @@ IF (H5_HAVE_PARALLEL)
ENDIF (H5_HAVE_PARALLEL)
IF (BUILD_TESTING)
- FILE (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w)
-
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME EXAMPLES-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- Attributes.h5
- btrees_file.h5
- cmprss.h5
- default_file.h5
- dset.h5
- extend.h5
- extlink_prefix_source.h5
- extlink_source.h5
- extlink_target.h5
- group.h5
- groups.h5
- hard_link.h5
- mount1.h5
- mount2.h5
- one_index_file.h5
- only_dspaces_and_attrs_file.h5
- only_huge_mesgs_file.h5
- REF_REG.h5
- refere.h5
- SDS.h5
- SDScompound.h5
- SDSextendible.h5
- Select.h5
- separate_indexes_file.h5
- small_lists_file.h5
- soft_link.h5
- subset.h5
- unix2win.h5
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (EXAMPLES-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "EXAMPLES-clear-objects")
-
- FOREACH (example ${examples})
- ADD_TEST (NAME EXAMPLES-${example} COMMAND $<TARGET_FILE:${example}>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (EXAMPLES-${example} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "EXAMPLES-${example}")
- ENDFOREACH (example ${examples})
-
- IF (H5_HAVE_PARALLEL)
- ADD_TEST (NAME EXAMPLES-ph5example COMMAND $<TARGET_FILE:ph5example>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "EXAMPLES-ph5example")
- ENDIF (H5_HAVE_PARALLEL)
+ INCLUDE (CMakeTests.cmake)
ENDIF (BUILD_TESTING)
diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake
new file mode 100644
index 0000000..1f896df
--- /dev/null
+++ b/examples/CMakeTests.cmake
@@ -0,0 +1,62 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+ FILE (MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/red ${PROJECT_BINARY_DIR}/blue ${PROJECT_BINARY_DIR}/u2w)
+
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME EXAMPLES-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ Attributes.h5
+ btrees_file.h5
+ cmprss.h5
+ default_file.h5
+ dset.h5
+ extend.h5
+ extlink_prefix_source.h5
+ extlink_source.h5
+ extlink_target.h5
+ group.h5
+ groups.h5
+ hard_link.h5
+ mount1.h5
+ mount2.h5
+ one_index_file.h5
+ only_dspaces_and_attrs_file.h5
+ only_huge_mesgs_file.h5
+ REF_REG.h5
+ refere.h5
+ SDS.h5
+ SDScompound.h5
+ SDSextendible.h5
+ Select.h5
+ separate_indexes_file.h5
+ small_lists_file.h5
+ soft_link.h5
+ subset.h5
+ unix2win.h5
+ )
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (EXAMPLES-clear-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "EXAMPLES-clear-objects")
+
+ FOREACH (example ${examples})
+ ADD_TEST (NAME EXAMPLES-${example} COMMAND $<TARGET_FILE:${example}>)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (EXAMPLES-${example} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "EXAMPLES-${example}")
+ ENDFOREACH (example ${examples})
+
+ IF (H5_HAVE_PARALLEL)
+ ADD_TEST (NAME EXAMPLES-ph5example COMMAND $<TARGET_FILE:ph5example>)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "EXAMPLES-ph5example")
+ ENDIF (H5_HAVE_PARALLEL)
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index e514a6e..f57df63 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -54,15 +54,6 @@ FOREACH (example ${examples})
)
SET_TARGET_PROPERTIES (f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (f90_ex_${example} PROPERTIES FOLDER examples/fortran)
-
- IF (BUILD_TESTING)
- ADD_TEST (NAME f90_ex_${example} COMMAND $<TARGET_FILE:f90_ex_${example}>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (f90_ex_${example} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "f90_ex_${example}")
- ENDIF (BUILD_TESTING)
-
ENDFOREACH (example ${examples})
IF (HDF5_ENABLE_F2003)
@@ -81,14 +72,6 @@ IF (HDF5_ENABLE_F2003)
)
SET_TARGET_PROPERTIES (f03_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (f03_ex_${example} PROPERTIES FOLDER examples/fortran03)
-
- IF (BUILD_TESTING)
- ADD_TEST (NAME f03_ex_${example} COMMAND $<TARGET_FILE:f03_ex_${example}>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (f03_ex_${example} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "f03_ex_${example}")
- ENDIF (BUILD_TESTING)
ENDFOREACH (example ${F2003_examples})
ENDIF (HDF5_ENABLE_F2003)
@@ -109,9 +92,8 @@ IF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
)
SET_TARGET_PROPERTIES (f90_ex_ph5example PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (f90_ex_ph5example PROPERTIES FOLDER examples/fortran)
-
- IF (BUILD_TESTING)
- ADD_TEST (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>)
- ENDIF (BUILD_TESTING)
-
ENDIF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+
+IF (BUILD_TESTING)
+ INCLUDE (CMakeTests.cmake)
+ENDIF (BUILD_TESTING)
diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake
new file mode 100644
index 0000000..d5b201c
--- /dev/null
+++ b/fortran/examples/CMakeTests.cmake
@@ -0,0 +1,28 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+FOREACH (example ${examples})
+ ADD_TEST (NAME f90_ex_${example} COMMAND $<TARGET_FILE:f90_ex_${example}>)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (f90_ex_${example} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "f90_ex_${example}")
+ENDFOREACH (example ${examples})
+
+IF (HDF5_ENABLE_F2003)
+ FOREACH (example ${F2003_examples})
+ ADD_TEST (NAME f03_ex_${example} COMMAND $<TARGET_FILE:f03_ex_${example}>)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (f03_ex_${example} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "f03_ex_${example}")
+ ENDFOREACH (example ${F2003_examples})
+ENDIF (HDF5_ENABLE_F2003)
+
+IF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
+ ADD_TEST (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>)
+ENDIF (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 72f239e..643ec94 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -73,9 +73,6 @@ ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (testhdf5_fortran PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (testhdf5_fortran PROPERTIES FOLDER test/fortran)
-ADD_TEST (NAME testhdf5_fortran COMMAND $<TARGET_FILE:testhdf5_fortran>)
-SET_TESTS_PROPERTIES(testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
-
#-- Adding test for testhdf5_fortran_1_8
ADD_EXECUTABLE (testhdf5_fortran_1_8
fortranlib_test_1_8.f90
@@ -97,9 +94,6 @@ ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (testhdf5_fortran_1_8 PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (testhdf5_fortran_1_8 PROPERTIES FOLDER test/fortran)
-ADD_TEST (NAME testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
-SET_TESTS_PROPERTIES(testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
-
#-- Adding test for fortranlib_test_F03
IF (HDF5_ENABLE_F2003)
ADD_EXECUTABLE (fortranlib_test_F03
@@ -124,9 +118,6 @@ IF (HDF5_ENABLE_F2003)
ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (fortranlib_test_F03 PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (fortranlib_test_F03 PROPERTIES FOLDER test/fortran)
-
- ADD_TEST (NAME fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>)
- SET_TESTS_PROPERTIES(fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
ENDIF (HDF5_ENABLE_F2003)
#-- Adding test for fflush1
@@ -144,8 +135,6 @@ ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (fflush1 PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (fflush1 PROPERTIES FOLDER test/fortran)
-ADD_TEST (NAME fflush1 COMMAND $<TARGET_FILE:fflush1>)
-
#-- Adding test for fflush2
ADD_EXECUTABLE (fflush2 fflush2.f90)
TARGET_NAMING (fflush2 ${LIB_TYPE})
@@ -161,5 +150,4 @@ ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (fflush2 PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (fflush2 PROPERTIES FOLDER test/fortran)
-ADD_TEST (NAME fflush2 COMMAND $<TARGET_FILE:fflush2>)
-SET_TESTS_PROPERTIES(fflush2 PROPERTIES DEPENDS fflush1)
+INCLUDE (CMakeTests.cmake)
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
new file mode 100644
index 0000000..d381b62
--- /dev/null
+++ b/fortran/test/CMakeTests.cmake
@@ -0,0 +1,26 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ADD_TEST (NAME testhdf5_fortran COMMAND $<TARGET_FILE:testhdf5_fortran>)
+SET_TESTS_PROPERTIES(testhdf5_fortran PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+
+#-- Adding test for testhdf5_fortran_1_8
+ADD_TEST (NAME testhdf5_fortran_1_8 COMMAND $<TARGET_FILE:testhdf5_fortran_1_8>)
+SET_TESTS_PROPERTIES(testhdf5_fortran_1_8 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+
+#-- Adding test for fortranlib_test_F03
+IF (HDF5_ENABLE_F2003)
+ ADD_TEST (NAME fortranlib_test_F03 COMMAND $<TARGET_FILE:fortranlib_test_F03>)
+ SET_TESTS_PROPERTIES(fortranlib_test_F03 PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
+ENDIF (HDF5_ENABLE_F2003)
+
+#-- Adding test for fflush1
+ADD_TEST (NAME fflush1 COMMAND $<TARGET_FILE:fflush1>)
+
+#-- Adding test for fflush2
+ADD_TEST (NAME fflush2 COMMAND $<TARGET_FILE:fflush2>)
+SET_TESTS_PROPERTIES(fflush2 PROPERTIES DEPENDS fflush1)
diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt
index 76b6023..d1aba51 100644
--- a/fortran/testpar/CMakeLists.txt
+++ b/fortran/testpar/CMakeLists.txt
@@ -30,4 +30,4 @@ ENDIF (WIN32 AND MSVC)
SET_TARGET_PROPERTIES (parallel_test PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (parallel_test PROPERTIES FOLDER test/fortran)
-ADD_TEST (NAME parallel_test COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:parallel_test>)
+INCLUDE (CMakeTests.cmake)
diff --git a/fortran/testpar/CMakeTests.cmake b/fortran/testpar/CMakeTests.cmake
new file mode 100644
index 0000000..2cd7ed0
--- /dev/null
+++ b/fortran/testpar/CMakeTests.cmake
@@ -0,0 +1,7 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+ADD_TEST (NAME parallel_test COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:parallel_test>)
diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt
index aa4221f..f762839 100644
--- a/hl/c++/examples/CMakeLists.txt
+++ b/hl/c++/examples/CMakeLists.txt
@@ -22,5 +22,5 @@ TARGET_LINK_LIBRARIES (
SET_TARGET_PROPERTIES (ptExampleFL PROPERTIES FOLDER examples/hl/cpp)
IF (BUILD_TESTING)
- ADD_TEST (NAME cpp_hl_ex_ptExampleFL COMMAND $<TARGET_FILE:ptExampleFL>)
+ INCLUDE (CMakeTests.cmake)
ENDIF (BUILD_TESTING)
diff --git a/hl/c++/examples/CMakeTests.cmake b/hl/c++/examples/CMakeTests.cmake
new file mode 100644
index 0000000..95cc8b4
--- /dev/null
+++ b/hl/c++/examples/CMakeTests.cmake
@@ -0,0 +1,8 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ADD_TEST (NAME cpp_hl_ex_ptExampleFL COMMAND $<TARGET_FILE:ptExampleFL>)
diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt
index 6633426..46229ba 100644
--- a/hl/c++/test/CMakeLists.txt
+++ b/hl/c++/test/CMakeLists.txt
@@ -11,23 +11,21 @@ INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/c++/src)
# Add in the unit tests for the packet table c++ wrapper
# --------------------------------------------------------------------
-IF (BUILD_TESTING)
- INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
- INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/test)
- INCLUDE_DIRECTORIES (${HDF5_CPP_SRC_DIR}/src)
+INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
+INCLUDE_DIRECTORIES (${HDF5_HL_SRC_DIR}/test)
+INCLUDE_DIRECTORIES (${HDF5_CPP_SRC_DIR}/src)
- ADD_EXECUTABLE (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
- TARGET_C_PROPERTIES (hl_ptableTest " " " ")
- TARGET_NAMING (hl_ptableTest ${LIB_TYPE})
- TARGET_LINK_LIBRARIES (
- hl_ptableTest
- ${HDF5_LIB_TARGET}
- ${HDF5_TEST_LIB_TARGET}
- ${HDF5_CPP_LIB_TARGET}
- ${HDF5_HL_LIB_TARGET}
- ${HDF5_HL_CPP_LIB_TARGET}
- )
- SET_TARGET_PROPERTIES (hl_ptableTest PROPERTIES FOLDER test/hl/cpp)
-
- ADD_TEST (NAME hl_ptableTest COMMAND $<TARGET_FILE:hl_ptableTest>)
-ENDIF (BUILD_TESTING)
+ADD_EXECUTABLE (hl_ptableTest ${HDF5_HL_CPP_TEST_SOURCE_DIR}/ptableTest.cpp)
+TARGET_C_PROPERTIES (hl_ptableTest " " " ")
+TARGET_NAMING (hl_ptableTest ${LIB_TYPE})
+TARGET_LINK_LIBRARIES (
+ hl_ptableTest
+ ${HDF5_LIB_TARGET}
+ ${HDF5_TEST_LIB_TARGET}
+ ${HDF5_CPP_LIB_TARGET}
+ ${HDF5_HL_LIB_TARGET}
+ ${HDF5_HL_CPP_LIB_TARGET}
+)
+SET_TARGET_PROPERTIES (hl_ptableTest PROPERTIES FOLDER test/hl/cpp)
+
+INCLUDE (CMakeTests.cmake)
diff --git a/hl/c++/test/CMakeTests.cmake b/hl/c++/test/CMakeTests.cmake
new file mode 100644
index 0000000..cb9454b
--- /dev/null
+++ b/hl/c++/test/CMakeTests.cmake
@@ -0,0 +1,8 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ ADD_TEST (NAME hl_ptableTest COMMAND $<TARGET_FILE:hl_ptableTest>)
diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt
index b702754..36c799d 100644
--- a/hl/examples/CMakeLists.txt
+++ b/hl/examples/CMakeLists.txt
@@ -1,20 +1,6 @@
cmake_minimum_required (VERSION 2.8.10)
PROJECT (HDF5_HL_EXAMPLES )
-SET (HDF5_TEST_FILES
-)
-
-FOREACH (h5_file ${HDF5_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/${h5_file} ${dest}
- )
-ENDFOREACH (h5_file ${HDF5_TEST_FILES})
-
#-----------------------------------------------------------------------------
# Define Sources
#-----------------------------------------------------------------------------
@@ -46,30 +32,10 @@ FOREACH (example ${examples})
TARGET_C_PROPERTIES (hl_ex_${example} " " " ")
TARGET_LINK_LIBRARIES (hl_ex_${example} ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
SET_TARGET_PROPERTIES (hl_ex_${example} PROPERTIES FOLDER examples/hl)
-
- IF (BUILD_TESTING)
- ADD_TEST (NAME hl_ex_${example} COMMAND $<TARGET_FILE:hl_ex_${example}>)
- ENDIF (BUILD_TESTING)
ENDFOREACH (example ${examples})
IF (BUILD_TESTING)
- SET_TESTS_PROPERTIES (hl_ex_ex_lite2 PROPERTIES DEPENDS hl_ex_ex_lite1)
-ENDIF (BUILD_TESTING)
-IF (BUILD_TESTING)
- SET (HDF5_TEST_FILES
- image24pixel.txt
- image8.txt
- )
+ INCLUDE (CMakeTests.cmake)
- FOREACH (h5_file ${HDF5_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
- TARGET hl_ex_ex_ds1
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/${h5_file} ${dest}
- )
- ENDFOREACH (h5_file ${HDF5_TEST_FILES})
ENDIF (BUILD_TESTING)
diff --git a/hl/examples/CMakeTests.cmake b/hl/examples/CMakeTests.cmake
new file mode 100644
index 0000000..e1ccba0
--- /dev/null
+++ b/hl/examples/CMakeTests.cmake
@@ -0,0 +1,28 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+SET (HDF5_TEST_FILES
+ image24pixel.txt
+ image8.txt
+)
+
+FOREACH (h5_file ${HDF5_TEST_FILES})
+ SET (dest "${PROJECT_BINARY_DIR}/${h5_file}")
+ #MESSAGE (STATUS " Copying ${h5_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET hl_ex_ex_ds1
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/${h5_file} ${dest}
+ )
+ENDFOREACH (h5_file ${HDF5_TEST_FILES})
+
+FOREACH (example ${examples})
+ ADD_TEST (NAME hl_ex_${example} COMMAND $<TARGET_FILE:hl_ex_${example}>)
+ENDFOREACH (example ${examples})
+
+SET_TESTS_PROPERTIES (hl_ex_ex_lite2 PROPERTIES DEPENDS hl_ex_ex_lite1)
diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt
index df7fd24..0f663c7 100644
--- a/hl/fortran/examples/CMakeLists.txt
+++ b/hl/fortran/examples/CMakeLists.txt
@@ -27,8 +27,10 @@ FOREACH (example ${examples})
SET_TARGET_PROPERTIES (hl_f90_ex_${example} PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (hl_f90_ex_${example} PROPERTIES FOLDER examples/hl/fortran)
- IF (BUILD_TESTING)
- ADD_TEST (NAME hl_f90_ex_${example} COMMAND $<TARGET_FILE:hl_f90_ex_${example}>)
- ENDIF (BUILD_TESTING)
-
ENDFOREACH (example ${examples})
+
+IF (BUILD_TESTING)
+
+ INCLUDE (CMakeTests.cmake)
+
+ENDIF (BUILD_TESTING)
diff --git a/hl/fortran/examples/CMakeTests.cmake b/hl/fortran/examples/CMakeTests.cmake
new file mode 100644
index 0000000..7e6c348
--- /dev/null
+++ b/hl/fortran/examples/CMakeTests.cmake
@@ -0,0 +1,10 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+FOREACH (example ${examples})
+ ADD_TEST (NAME hl_f90_ex_${example} COMMAND $<TARGET_FILE:hl_f90_ex_${example}>)
+ENDFOREACH (example ${examples})
diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt
index 7e7aa1d..2084162 100644
--- a/hl/fortran/test/CMakeLists.txt
+++ b/hl/fortran/test/CMakeLists.txt
@@ -6,20 +6,6 @@ PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran)
#-----------------------------------------------------------------------------
INCLUDE_DIRECTORIES (${CMAKE_Fortran_MODULE_DIRECTORY} ${HDF5_F90_BINARY_DIR} ${HDF5_F90_SRC_DIR}/src)
-# Remove any output file left over from previous test run
-ADD_TEST (
- NAME hl_fortran_test-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- dsetf1.h5
- dsetf2.h5
- dsetf3.h5
- dsetf4.h5
- dsetf5.h5
- f1image.h5
- f1tab.h5
-)
-
#-- Adding test for hl_f90_tstds
ADD_EXECUTABLE (hl_f90_tstds tstds.f90)
TARGET_NAMING (hl_f90_tstds ${LIB_TYPE})
@@ -28,8 +14,6 @@ TARGET_LINK_LIBRARIES (hl_f90_tstds ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_TAR
SET_TARGET_PROPERTIES (hl_f90_tstds PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (hl_f90_tstds PROPERTIES FOLDER test/hl/fortran)
-ADD_TEST (NAME hl_f90_tstds COMMAND $<TARGET_FILE:hl_f90_tstds>)
-
#-- Adding test for hl_f90_tstlite
ADD_EXECUTABLE (hl_f90_tstlite tstlite.f90)
TARGET_NAMING (hl_f90_tstlite ${LIB_TYPE})
@@ -38,8 +22,6 @@ TARGET_LINK_LIBRARIES (hl_f90_tstlite ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_T
SET_TARGET_PROPERTIES (hl_f90_tstlite PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (hl_f90_tstlite PROPERTIES FOLDER test/hl/fortran)
-ADD_TEST (NAME hl_f90_tstlite COMMAND $<TARGET_FILE:hl_f90_tstlite>)
-
#-- Adding test for hl_f90_tstimage
ADD_EXECUTABLE (hl_f90_tstimage tstimage.f90)
TARGET_NAMING (hl_f90_tstimage ${LIB_TYPE})
@@ -48,8 +30,6 @@ TARGET_LINK_LIBRARIES (hl_f90_tstimage ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB
SET_TARGET_PROPERTIES (hl_f90_tstimage PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (hl_f90_tstimage PROPERTIES FOLDER test/hl/fortran)
-ADD_TEST (NAME hl_f90_tstimage COMMAND $<TARGET_FILE:hl_f90_tstimage>)
-
#-- Adding test for hl_f90_tsttable
ADD_EXECUTABLE (hl_f90_tsttable tsttable.f90)
TARGET_NAMING (hl_f90_tsttable ${LIB_TYPE})
@@ -58,4 +38,4 @@ TARGET_LINK_LIBRARIES (hl_f90_tsttable ${HDF5_HL_F90_LIB_TARGET} ${HDF5_F90_LIB_
SET_TARGET_PROPERTIES (hl_f90_tsttable PROPERTIES LINKER_LANGUAGE Fortran)
SET_TARGET_PROPERTIES (hl_f90_tsttable PROPERTIES FOLDER test/hl/fortran)
-ADD_TEST (NAME hl_f90_tsttable COMMAND $<TARGET_FILE:hl_f90_tsttable>)
+INCLUDE (CMakeTests.cmake)
diff --git a/hl/fortran/test/CMakeTests.cmake b/hl/fortran/test/CMakeTests.cmake
new file mode 100644
index 0000000..96209aa
--- /dev/null
+++ b/hl/fortran/test/CMakeTests.cmake
@@ -0,0 +1,28 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+# Remove any output file left over from previous test run
+ADD_TEST (
+ NAME hl_fortran_test-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ dsetf1.h5
+ dsetf2.h5
+ dsetf3.h5
+ dsetf4.h5
+ dsetf5.h5
+ f1image.h5
+ f1tab.h5
+)
+
+ADD_TEST (NAME hl_f90_tstds COMMAND $<TARGET_FILE:hl_f90_tstds>)
+
+ADD_TEST (NAME hl_f90_tstlite COMMAND $<TARGET_FILE:hl_f90_tstlite>)
+
+ADD_TEST (NAME hl_f90_tstimage COMMAND $<TARGET_FILE:hl_f90_tstimage>)
+
+ADD_TEST (NAME hl_f90_tsttable COMMAND $<TARGET_FILE:hl_f90_tsttable>)
diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt
index 9cb61e0..f969dbf 100644
--- a/hl/test/CMakeLists.txt
+++ b/hl/test/CMakeLists.txt
@@ -20,7 +20,7 @@ INCLUDE_DIRECTORIES (${HDF5_TEST_SRC_DIR})
# --------------------------------------------------------------------
# Macro used to add a unit test
# --------------------------------------------------------------------
-MACRO (HL_ADD_TEST hl_name files)
+MACRO (HL_ADD_EXE hl_name)
ADD_EXECUTABLE (hl_${hl_name} ${hl_name}.c)
TARGET_NAMING (hl_${hl_name} ${LIB_TYPE})
TARGET_C_PROPERTIES (hl_${hl_name} " " " ")
@@ -30,66 +30,14 @@ MACRO (HL_ADD_TEST hl_name files)
${HDF5_TEST_LIB_TARGET}
)
SET_TARGET_PROPERTIES (hl_${hl_name} PROPERTIES FOLDER test/hl)
+ENDMACRO (HL_ADD_EXE)
- ADD_TEST (NAME hl_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (hl_${hl_name} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
-
- # --------------------------------------------------------------------
- #-- Copy the necessary files.
- # --------------------------------------------------------------------
- FOREACH (h5_file ${files})
- SET (dest "${HDF5_HL_TEST_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying HL Test File ${h5_file} to ${dest}")
- ADD_CUSTOM_COMMAND (
- TARGET hl_${hl_name}
- PRE_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_HL_TEST_SOURCE_DIR}/${h5_file} ${dest}
- )
-
- ENDFOREACH (h5_file ${HL_REFERENCE_TEST_FILES})
-ENDMACRO (HL_ADD_TEST)
-
-# Remove any output file left over from previous test run
-ADD_TEST (
- NAME hl_test-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- combine_tables1.h5
- combine_tables2.h5
- test_detach.h5
- test_ds1.h5
- test_ds2.h5
- test_ds3.h5
- test_ds4.h5
- test_ds5.h5
- test_ds6.h5
- test_ds7.h5
- test_ds8.h5
- test_ds9.h5
- test_dectris.h5
- test_image1.h5
- test_image2.h5
- test_image3.h5
- test_lite1.h5
- test_lite2.h5
- test_packet_compress.h5
- test_packet_table.h5
- test_table.h5
-)
-IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (hl_test-clear-objects PROPERTIES DEPENDS ${last_test})
-ENDIF (NOT "${last_test}" STREQUAL "")
-SET (last_test "hl_test-clear-objects")
-
-HL_ADD_TEST (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5")
-HL_ADD_TEST (test_dset_opt "")
-HL_ADD_TEST (test_image "image8.txt;sepia.pal;earth.pal;image24pixel.txt;image24plane.txt;usa.wri")
-HL_ADD_TEST (test_lite "dtype_file.txt")
-HL_ADD_TEST (test_packet "")
-HL_ADD_TEST (test_table "test_table_be.h5;test_table_cray.h5;test_table_le.h5")
+HL_ADD_EXE (test_ds)
+HL_ADD_EXE (test_dset_opt)
+HL_ADD_EXE (test_image)
+HL_ADD_EXE (test_lite)
+HL_ADD_EXE (test_packet)
+HL_ADD_EXE (test_table)
# --------------------------------------------------------------------
# This executable is used to generate test files for the test_ds test.
@@ -106,3 +54,5 @@ IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
)
SET_TARGET_PROPERTIES (hl_gen_test_ds PROPERTIES FOLDER test/hl/gen)
ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+
+INCLUDE (CMakeTests.cmake)
diff --git a/hl/test/CMakeTests.cmake b/hl/test/CMakeTests.cmake
new file mode 100644
index 0000000..aa9c1c3
--- /dev/null
+++ b/hl/test/CMakeTests.cmake
@@ -0,0 +1,70 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+# --------------------------------------------------------------------
+# Macro used to add a unit test
+# --------------------------------------------------------------------
+MACRO (HL_ADD_TEST hl_name files)
+ ADD_TEST (NAME hl_${hl_name} COMMAND $<TARGET_FILE:hl_${hl_name}>)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (hl_${hl_name} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+
+ # --------------------------------------------------------------------
+ #-- Copy the necessary files.
+ # --------------------------------------------------------------------
+ FOREACH (h5_file ${files})
+ SET (dest "${HDF5_HL_TEST_BINARY_DIR}/${h5_file}")
+ #MESSAGE (STATUS " Copying HL Test File ${h5_file} to ${dest}")
+ ADD_CUSTOM_COMMAND (
+ TARGET hl_${hl_name}
+ PRE_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_HL_TEST_SOURCE_DIR}/${h5_file} ${dest}
+ )
+
+ ENDFOREACH (h5_file ${HL_REFERENCE_TEST_FILES})
+ENDMACRO (HL_ADD_TEST)
+
+# Remove any output file left over from previous test run
+ADD_TEST (
+ NAME hl_test-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ combine_tables1.h5
+ combine_tables2.h5
+ test_detach.h5
+ test_ds1.h5
+ test_ds2.h5
+ test_ds3.h5
+ test_ds4.h5
+ test_ds5.h5
+ test_ds6.h5
+ test_ds7.h5
+ test_ds8.h5
+ test_ds9.h5
+ test_dectris.h5
+ test_image1.h5
+ test_image2.h5
+ test_image3.h5
+ test_lite1.h5
+ test_lite2.h5
+ test_packet_compress.h5
+ test_packet_table.h5
+ test_table.h5
+)
+IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (hl_test-clear-objects PROPERTIES DEPENDS ${last_test})
+ENDIF (NOT "${last_test}" STREQUAL "")
+SET (last_test "hl_test-clear-objects")
+
+HL_ADD_TEST (test_ds "dsdata.txt;dslat.txt;dslon.txt;test_ds_be.h5;test_ds_le.h5")
+HL_ADD_TEST (test_dset_opt "")
+HL_ADD_TEST (test_image "image8.txt;sepia.pal;earth.pal;image24pixel.txt;image24plane.txt;usa.wri")
+HL_ADD_TEST (test_lite "dtype_file.txt")
+HL_ADD_TEST (test_packet "")
+HL_ADD_TEST (test_table "test_table_be.h5;test_table_cray.h5;test_table_le.h5")
diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt
index 1deff23..256ff89 100644
--- a/hl/tools/CMakeLists.txt
+++ b/hl/tools/CMakeLists.txt
@@ -34,20 +34,24 @@ TARGET_C_PROPERTIES (h52gif " " " ")
TARGET_LINK_LIBRARIES (h52gif ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
SET_TARGET_PROPERTIES (h52gif PROPERTIES FOLDER tools/hl)
-# --------------------------------------------------------------------
-# This executable can generate the actual test files - Currently not
-# used in the CMake Build system as we rely on the test files that are
-# shipped with HDF5 source archives
-# --------------------------------------------------------------------
-IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- ADD_EXECUTABLE (hl_h52gifgentest ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/h52gifgentst.c)
- TARGET_NAMING (hl_h52gifgentest ${LIB_TYPE})
- TARGET_C_PROPERTIES (hl_h52gifgentest " " " ")
- TARGET_LINK_LIBRARIES (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl)
+IF (BUILD_TESTING)
+ # --------------------------------------------------------------------
+ # This executable can generate the actual test files - Currently not
+ # used in the CMake Build system as we rely on the test files that are
+ # shipped with HDF5 source archives
+ # --------------------------------------------------------------------
+ IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ ADD_EXECUTABLE (hl_h52gifgentest ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/h52gifgentst.c)
+ TARGET_NAMING (hl_h52gifgentest ${LIB_TYPE})
+ TARGET_C_PROPERTIES (hl_h52gifgentest " " " ")
+ TARGET_LINK_LIBRARIES (hl_h52gifgentest ${HDF5_HL_LIB_TARGET} ${HDF5_LIB_TARGET})
+ SET_TARGET_PROPERTIES (hl_h52gifgentest PROPERTIES FOLDER generator/tools/hl)
-# ADD_TEST (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>)
-ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+# ADD_TEST (NAME hl_h52gifgentest COMMAND $<TARGET_FILE:hl_h52gifgentest>)
+ ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+
+ INCLUDE (CMakeTests.cmake)
+ENDIF (BUILD_TESTING)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
diff --git a/hl/tools/CMakeTests.cmake b/hl/tools/CMakeTests.cmake
new file mode 100644
index 0000000..9f987fd
--- /dev/null
+++ b/hl/tools/CMakeTests.cmake
@@ -0,0 +1,40 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+# Make testfiles dir under build dir
+FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+
+#
+# copy test files from source to build dir
+#
+
+ADD_CUSTOM_COMMAND (
+ TARGET gif2h5
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/testfiles/image1.gif ${PROJECT_BINARY_DIR}/testfiles/image1.gif
+)
+
+ADD_CUSTOM_COMMAND (
+ TARGET h52gif
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_HL_TOOLS_SOURCE_DIR}/gif2h5/testfiles/h52giftst.h5 ${PROJECT_BINARY_DIR}/testfiles/h52giftst.h5
+)
+
+# Remove any output file left over from previous test run
+ADD_TEST (
+ NAME HL_TOOLS-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ image1.gif
+ image1.h5
+)
+
+ADD_TEST (NAME HL_TOOLS_h52gif COMMAND $<TARGET_FILE:h52gif> testfiles/h52giftst.h5 image1.gif -i image)
+
+ADD_TEST (NAME HL_TOOLS_gif2h5 COMMAND $<TARGET_FILE:gif2h5> testfiles/image1.gif image1.h5)
diff --git a/perform/CMakeLists.txt b/perform/CMakeLists.txt
index f3aed76..0a6fa10 100644
--- a/perform/CMakeLists.txt
+++ b/perform/CMakeLists.txt
@@ -137,64 +137,4 @@ IF (H5_HAVE_PARALLEL)
ENDIF (HDF5_BUILD_PARALLEL_ALL)
ENDIF (H5_HAVE_PARALLEL)
-
-##############################################################################
-##############################################################################
-### T E S T I N G ###
-##############################################################################
-##############################################################################
-
-ADD_CUSTOM_COMMAND (
- TARGET zip_perf
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tfilters.h5 ${PROJECT_BINARY_DIR}/tfilters.h5
-)
-
-#-----------------------------------------------------------------------------
-# Add Tests
-#-----------------------------------------------------------------------------
-
-# Remove any output file left over from previous test run
-ADD_TEST (
- NAME PERFORM_h5perform-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- chunk.h5
- iopipe.h5
- iopipe.raw
- x-diag-rd.dat
- x-diag-wr.dat
- x-rowmaj-rd.dat
- x-rowmaj-wr.dat
- x-gnuplot
-)
-
-ADD_TEST (NAME PERFORM_h5perf_serial COMMAND $<TARGET_FILE:h5perf_serial>)
-
-IF (HDF5_BUILD_PERFORM_STANDALONE)
- ADD_TEST (NAME PERFORM_h5perf_serial_alone COMMAND $<TARGET_FILE:h5perf_serial_alone>)
-ENDIF (HDF5_BUILD_PERFORM_STANDALONE)
-
-ADD_TEST (NAME PERFORM_chunk COMMAND $<TARGET_FILE:chunk>)
-
-ADD_TEST (NAME PERFORM_iopipe COMMAND $<TARGET_FILE:iopipe>)
-
-ADD_TEST (NAME PERFORM_overhead COMMAND $<TARGET_FILE:overhead>)
-
-ADD_TEST (NAME PERFORM_perf_meta COMMAND $<TARGET_FILE:perf_meta>)
-
-ADD_TEST (NAME PERFORM_zip_perf_help COMMAND $<TARGET_FILE:zip_perf> "-h")
-ADD_TEST (NAME PERFORM_zip_perf COMMAND $<TARGET_FILE:zip_perf> tfilters.h5)
-
-IF (H5_HAVE_PARALLEL)
- ADD_TEST (NAME PERFORM_h5perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf>)
-
- IF (HDF5_BUILD_PERFORM_STANDALONE)
- ADD_TEST (NAME PERFORM_h5perf_alone COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf_alone>)
- ENDIF (HDF5_BUILD_PERFORM_STANDALONE)
-
- IF (HDF5_BUILD_PARALLEL_ALL)
- ADD_TEST (NAME PERFORM_benchpar COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:benchpar>)
- ENDIF (HDF5_BUILD_PARALLEL_ALL)
-ENDIF (H5_HAVE_PARALLEL)
+INCLUDE (CMakeTests.cmake)
diff --git a/perform/CMakeTests.cmake b/perform/CMakeTests.cmake
new file mode 100644
index 0000000..fab6ab2
--- /dev/null
+++ b/perform/CMakeTests.cmake
@@ -0,0 +1,61 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ADD_CUSTOM_COMMAND (
+ TARGET zip_perf
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tfilters.h5 ${PROJECT_BINARY_DIR}/tfilters.h5
+)
+
+#-----------------------------------------------------------------------------
+# Add Tests
+#-----------------------------------------------------------------------------
+
+# Remove any output file left over from previous test run
+ADD_TEST (
+ NAME PERFORM_h5perform-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ chunk.h5
+ iopipe.h5
+ iopipe.raw
+ x-diag-rd.dat
+ x-diag-wr.dat
+ x-rowmaj-rd.dat
+ x-rowmaj-wr.dat
+ x-gnuplot
+)
+
+ADD_TEST (NAME PERFORM_h5perf_serial COMMAND $<TARGET_FILE:h5perf_serial>)
+
+IF (HDF5_BUILD_PERFORM_STANDALONE)
+ ADD_TEST (NAME PERFORM_h5perf_serial_alone COMMAND $<TARGET_FILE:h5perf_serial_alone>)
+ENDIF (HDF5_BUILD_PERFORM_STANDALONE)
+
+ADD_TEST (NAME PERFORM_chunk COMMAND $<TARGET_FILE:chunk>)
+
+ADD_TEST (NAME PERFORM_iopipe COMMAND $<TARGET_FILE:iopipe>)
+
+ADD_TEST (NAME PERFORM_overhead COMMAND $<TARGET_FILE:overhead>)
+
+ADD_TEST (NAME PERFORM_perf_meta COMMAND $<TARGET_FILE:perf_meta>)
+
+ADD_TEST (NAME PERFORM_zip_perf_help COMMAND $<TARGET_FILE:zip_perf> "-h")
+ADD_TEST (NAME PERFORM_zip_perf COMMAND $<TARGET_FILE:zip_perf> tfilters.h5)
+
+IF (H5_HAVE_PARALLEL)
+ ADD_TEST (NAME PERFORM_h5perf COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf>)
+
+ IF (HDF5_BUILD_PERFORM_STANDALONE)
+ ADD_TEST (NAME PERFORM_h5perf_alone COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:h5perf_alone>)
+ ENDIF (HDF5_BUILD_PERFORM_STANDALONE)
+
+ IF (HDF5_BUILD_PARALLEL_ALL)
+ ADD_TEST (NAME PERFORM_benchpar COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:benchpar>)
+ ENDIF (HDF5_BUILD_PARALLEL_ALL)
+ENDIF (H5_HAVE_PARALLEL)
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 741976b..84bc114 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -120,713 +120,4 @@ IF (BUILD_SHARED_LIBS)
ENDFOREACH (test_lib ${TEST2_PLUGIN_LIBS})
ENDIF (BUILD_SHARED_LIBS)
-# --------------------------------------------------------------------
-# Copy all the HDF5 files from the test directory into the source directory
-# --------------------------------------------------------------------
-SET (HDF5_TEST_FILES
- tnullspace.h5
-)
-
-FOREACH (h5_tfile ${HDF5_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${h5_tfile}")
- #MESSAGE (STATUS " Copying ${h5_tfile}")
- ADD_CUSTOM_COMMAND (
- TARGET ${HDF5_TEST_LIB_TARGET}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest}
- )
-ENDFOREACH (h5_tfile ${HDF5_TEST_FILES})
-
-# --------------------------------------------------------------------
-# Copy all the HDF5 files from the test directory into the source directory
-# --------------------------------------------------------------------
-SET (HDF5_REFERENCE_FILES
- err_compat_1
- err_compat_2
- error_test_1
- error_test_2
- links_env.out
-)
-
-FOREACH (ref_file ${HDF5_REFERENCE_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${ref_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
- TARGET ${HDF5_TEST_LIB_TARGET}
- POST_BUILD
- COMMAND ${XLATE_UTILITY}
- ARGS ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest} -l3
- )
-ENDFOREACH (ref_file ${HDF5_REFERENCE_FILES})
-
-# --------------------------------------------------------------------
-# Copy test files from test/testfiles/plist_files dir to test dir
-# --------------------------------------------------------------------
-SET (HDF5_REFERENCE_PLIST_FILES
- acpl_be
- acpl_le
- dapl_be
- dapl_le
- dcpl_be
- dcpl_le
- dxpl_be
- dxpl_le
- fapl_be
- fapl_le
- fcpl_be
- fcpl_le
- gcpl_be
- gcpl_le
- lapl_be
- lapl_le
- lcpl_be
- lcpl_le
- ocpl_be
- ocpl_le
- ocpypl_be
- ocpypl_le
- strcpl_be
- strcpl_le
-)
-
-FOREACH (plistfile ${HDF5_REFERENCE_PLIST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${plistfile}")
- #MESSAGE (STATUS " Copying ${plistfile} to ${dset}")
- ADD_CUSTOM_COMMAND (
- TARGET ${HDF5_TEST_LIB_TARGET}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile} ${dest}
- )
-ENDFOREACH (plistfile ${HDF5_REFERENCE_PLIST_FILES})
-
-# --------------------------------------------------------------------
-#-- Copy all the HDF5 files from the test directory into the source directory
-# --------------------------------------------------------------------
-SET (HDF5_REFERENCE_TEST_FILES
- be_data.h5
- be_extlink1.h5
- be_extlink2.h5
- corrupt_stab_msg.h5
- deflate.h5
- family_v16_00000.h5
- family_v16_00001.h5
- family_v16_00002.h5
- family_v16_00003.h5
- filespace_1_6.h5
- filespace_1_8.h5
- file_image_core_test.h5
- fill_old.h5
- filter_error.h5
- group_old.h5
- le_data.h5
- le_extlink1.h5
- le_extlink2.h5
- mergemsg.h5
- multi_file_v16-r.h5
- multi_file_v16-s.h5
- noencoder.h5
- specmetaread.h5
- tarrold.h5
- tbad_msg_count.h5
- tbogus.h5
- test_filters_be.h5
- test_filters_le.h5
- th5s.h5
- tlayouto.h5
- tmtimen.h5
- tmtimeo.h5
- tsizeslheap.h5
-)
-
-FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${HDF5_TEST_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file} to ${dest}")
- ADD_CUSTOM_COMMAND (
- TARGET ${HDF5_TEST_LIB_TARGET}
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest}
- )
-ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
-
-SET (testhdf5_SRCS
- ${HDF5_TEST_SOURCE_DIR}/testhdf5.c
- ${HDF5_TEST_SOURCE_DIR}/tarray.c
- ${HDF5_TEST_SOURCE_DIR}/tattr.c
- ${HDF5_TEST_SOURCE_DIR}/tchecksum.c
- ${HDF5_TEST_SOURCE_DIR}/tconfig.c
- ${HDF5_TEST_SOURCE_DIR}/tcoords.c
- ${HDF5_TEST_SOURCE_DIR}/tfile.c
- ${HDF5_TEST_SOURCE_DIR}/tgenprop.c
- ${HDF5_TEST_SOURCE_DIR}/th5o.c
- ${HDF5_TEST_SOURCE_DIR}/th5s.c
- ${HDF5_TEST_SOURCE_DIR}/theap.c
- ${HDF5_TEST_SOURCE_DIR}/tid.c
- ${HDF5_TEST_SOURCE_DIR}/titerate.c
- ${HDF5_TEST_SOURCE_DIR}/tmeta.c
- ${HDF5_TEST_SOURCE_DIR}/tmisc.c
- ${HDF5_TEST_SOURCE_DIR}/trefer.c
- ${HDF5_TEST_SOURCE_DIR}/trefstr.c
- ${HDF5_TEST_SOURCE_DIR}/tselect.c
- ${HDF5_TEST_SOURCE_DIR}/tskiplist.c
- ${HDF5_TEST_SOURCE_DIR}/tsohm.c
- ${HDF5_TEST_SOURCE_DIR}/ttime.c
- ${HDF5_TEST_SOURCE_DIR}/ttst.c
- ${HDF5_TEST_SOURCE_DIR}/tunicode.c
- ${HDF5_TEST_SOURCE_DIR}/tvltypes.c
- ${HDF5_TEST_SOURCE_DIR}/tvlstr.c
-)
-
-#-- Adding test for testhdf5
-ADD_EXECUTABLE (testhdf5 ${testhdf5_SRCS})
-TARGET_NAMING (testhdf5 ${LIB_TYPE})
-TARGET_C_PROPERTIES (testhdf5 " " " ")
-TARGET_LINK_LIBRARIES (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
-SET_TARGET_PROPERTIES (testhdf5 PROPERTIES FOLDER test)
-
-# Remove any output file left over from previous test run
-ADD_TEST (
- NAME h5test-clear-testhdf5-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- coord.h5
- sys_file1
- tattr.h5
- tfile1.h5
- tfile2.h5
- tfile3.h5
- tfile4.h5
- tfile5.h5
- tfile6.h5
- th5o_file
- th5s1.h5
- tselect.h5
- tsohm.h5
- tsohm_dst.h5
- tsohm_src.h5
-)
-
-IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME testhdf5-base COMMAND $<TARGET_FILE:testhdf5> -x heap -x file -x select)
- SET_TESTS_PROPERTIES(testhdf5-base PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
- SET_TESTS_PROPERTIES(testhdf5-base PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
- ADD_TEST (NAME testhdf5-heap COMMAND $<TARGET_FILE:testhdf5> -o heap)
- SET_TESTS_PROPERTIES(testhdf5-heap PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
- SET_TESTS_PROPERTIES(testhdf5-heap PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
- ADD_TEST (NAME testhdf5-file COMMAND $<TARGET_FILE:testhdf5> -o file)
- SET_TESTS_PROPERTIES(testhdf5-file PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
- SET_TESTS_PROPERTIES(testhdf5-file PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
- ADD_TEST (NAME testhdf5-select COMMAND $<TARGET_FILE:testhdf5> -o select)
- SET_TESTS_PROPERTIES(testhdf5-select PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
- SET_TESTS_PROPERTIES(testhdf5-select PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
-ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME testhdf5 COMMAND $<TARGET_FILE:testhdf5>)
- SET_TESTS_PROPERTIES(testhdf5 PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
-ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
-##############################################################################
-##############################################################################
-### T H E T E S T S M A C R O S ###
-##############################################################################
-##############################################################################
-
-MACRO (ADD_H5_TEST file)
- ADD_EXECUTABLE (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
- TARGET_NAMING (${file} ${LIB_TYPE})
- TARGET_C_PROPERTIES (${file} " " " ")
- TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test)
-
- ADD_TEST (NAME ${file} COMMAND $<TARGET_FILE:${file}>)
-ENDMACRO (ADD_H5_TEST file)
-
-# Remove any output file left over from previous test run
-ADD_TEST (
- NAME h5test-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- dt_arith1.h5
- dt_arith2.h5
- dtransform.h5
- dtypes4.h5
- dtypes5.h5
- efc0.h5
- efc1.h5
- efc2.h5
- efc3.h5
- efc4.h5
- efc5.h5
- extlinks16A00000.h5
- extlinks16A00001.h5
- extlinks16A00002.h5
- extlinks16B-b.h5
- extlinks16B-g.h5
- extlinks16B-l.h5
- extlinks16B-r.h5
- extlinks16B-s.h5
- extlinks19B00000.h5
- extlinks19B00001.h5
- extlinks19B00002.h5
- extlinks19B00003.h5
- extlinks19B00004.h5
- extlinks19B00005.h5
- extlinks19B00006.h5
- extlinks19B00007.h5
- extlinks19B00008.h5
- extlinks19B00009.h5
- extlinks19B00010.h5
- extlinks19B00011.h5
- extlinks19B00012.h5
- extlinks19B00013.h5
- extlinks19B00014.h5
- extlinks19B00015.h5
- extlinks19B00016.h5
- extlinks19B00017.h5
- extlinks19B00018.h5
- extlinks19B00019.h5
- extlinks19B00020.h5
- extlinks19B00021.h5
- extlinks19B00022.h5
- extlinks19B00023.h5
- extlinks19B00024.h5
- extlinks19B00025.h5
- extlinks19B00026.h5
- extlinks19B00027.h5
- extlinks19B00028.h5
- fheap.h5
- new_multi_file_v16-r.h5
- new_multi_file_v16-s.h5
- objcopy_ext.dat
- testmeta.h5
- tstint1.h5
- tstint2.h5
- unregister_filter_1.h5
- unregister_filter_2.h5
-)
-
-SET (H5_TESTS
- accum
- lheap
- ohdr
- stab
- gheap
- #cache
- #cache_api
- #cache_tagging
- pool
- hyperslab
- istore
- bittests
- dt_arith
- dtypes
- cmpd_dset
- filter_fail
- extend
- external
- efc
- objcopy
- links
- unlink
- big
- mtime
- fillval
- mount
- flush1
- flush2
- app_ref
- enum
- set_extent
- #ttsafe
- getname
- vfd
- ntypes
- dangle
- dtransform
- reserved
- cross_read
- freespace
- mf
- farray
- earray
- btree2
- fheap
- #error_test
- #err_compat
- tcheck_version
- testmeta
- #links_env
- file_image
- enc_dec_plist
- enc_dec_plist_with_endianess
- unregister
-)
-
-FOREACH (test ${H5_TESTS})
- ADD_H5_TEST(${test})
- SET_TESTS_PROPERTIES(${test} PROPERTIES DEPENDS h5test-clear-objects)
-ENDFOREACH (test ${H5_TESTS})
-
-SET_TESTS_PROPERTIES(flush2 PROPERTIES DEPENDS flush1)
-
-##############################################################################
-##############################################################################
-### A D D I T I O N A L T E S T S ###
-##############################################################################
-##############################################################################
-
-#-- Adding test for cache
-ADD_EXECUTABLE (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
-TARGET_NAMING (cache ${LIB_TYPE})
-TARGET_C_PROPERTIES (cache " " " ")
-TARGET_LINK_LIBRARIES (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (cache PROPERTIES FOLDER test)
-ADD_TEST (
- NAME h5test-clear-cache-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- cache_test.h5
-)
-ADD_TEST (NAME cache COMMAND $<TARGET_FILE:cache>)
-SET_TESTS_PROPERTIES(cache PROPERTIES DEPENDS h5test-clear-cache-objects)
-
-#-- Adding test for cache_api
-ADD_EXECUTABLE (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
-TARGET_NAMING (cache_api ${LIB_TYPE})
-TARGET_C_PROPERTIES (cache_api " " " ")
-TARGET_LINK_LIBRARIES (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (cache_api PROPERTIES FOLDER test)
-
-ADD_TEST (
- NAME h5test-clear-cache_api-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- cache_api_test.h5
-)
-ADD_TEST (NAME cache_api COMMAND $<TARGET_FILE:cache_api>)
-SET_TESTS_PROPERTIES(cache_api PROPERTIES DEPENDS h5test-clear-cache_api-objects)
-
-#-- Adding test for cache_tagging
-ADD_EXECUTABLE (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
-TARGET_NAMING (cache_tagging ${LIB_TYPE})
-TARGET_C_PROPERTIES (cache_tagging " " " ")
-TARGET_LINK_LIBRARIES (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (cache_tagging PROPERTIES FOLDER test)
-
-ADD_TEST (
- NAME h5test-clear-cache_tagging-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- tagging_test.h5
- tagging_ext_test.h5
-)
-ADD_TEST (NAME cache_tagging COMMAND $<TARGET_FILE:cache_tagging>)
-SET_TESTS_PROPERTIES(cache_tagging PROPERTIES DEPENDS h5test-clear-cache_tagging-objects)
-
-#-- Adding test for ttsafe
-ADD_EXECUTABLE (ttsafe
- ${HDF5_TEST_SOURCE_DIR}/ttsafe.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c
- ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c
-)
-TARGET_NAMING (ttsafe ${LIB_TYPE})
-TARGET_C_PROPERTIES (ttsafe " " " ")
-TARGET_LINK_LIBRARIES (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (ttsafe PROPERTIES FOLDER test)
-
-ADD_TEST (
- NAME h5test-clear-ttsafe-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ttsafe_error.h5
- ttsafe_dcreate.h5
- ttsafe_cancel.h5
- ttsafe_acreate.h5
-)
-ADD_TEST (NAME ttsafe COMMAND $<TARGET_FILE:ttsafe>)
-SET_TESTS_PROPERTIES(ttsafe PROPERTIES DEPENDS h5test-clear-ttsafe-objects)
-
-#-- Adding test for err_compat
-IF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
- ADD_EXECUTABLE (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c)
- TARGET_NAMING (err_compat ${LIB_TYPE})
- TARGET_C_PROPERTIES (err_compat " " " ")
- TARGET_LINK_LIBRARIES (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
- SET_TARGET_PROPERTIES (err_compat PROPERTIES FOLDER test)
-
- ADD_TEST (
- NAME h5test-clear-err_compat-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- err_compat.txt
- err_compat.txt.err
- )
- ADD_TEST (NAME err_compat COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:err_compat>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_MASK_ERROR=true"
- -D "TEST_OUTPUT=err_compat.txt"
- -D "TEST_REFERENCE=err_compat_1"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES(err_compat PROPERTIES DEPENDS h5test-clear-err_compat-objects)
-ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
-
-#-- Adding test for error_test
-ADD_EXECUTABLE (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c)
-TARGET_NAMING (error_test ${LIB_TYPE})
-TARGET_C_PROPERTIES (error_test " " " ")
-TARGET_LINK_LIBRARIES (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (error_test PROPERTIES FOLDER test)
-
-ADD_TEST (
- NAME h5test-clear-error_test-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- error_test.txt
- error_test.txt.err
-)
-ADD_TEST (NAME error_test COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:error_test>"
- -D "TEST_ARGS:STRING="
- -D "TEST_EXPECT=0"
- -D "TEST_MASK_ERROR=true"
- -D "TEST_OUTPUT=error_test.txt"
- -D "TEST_REFERENCE=error_test_1"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
-)
-SET_TESTS_PROPERTIES(error_test PROPERTIES DEPENDS h5test-clear-error_test-objects)
-SET_TESTS_PROPERTIES (error_test PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PRELOAD=::")
-
-#-- Adding test for links_env
-ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c)
-TARGET_NAMING (links_env ${LIB_TYPE})
-TARGET_C_PROPERTIES (links_env " " " ")
-TARGET_LINK_LIBRARIES (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
-SET_TARGET_PROPERTIES (links_env PROPERTIES FOLDER test)
-
-ADD_TEST (
- NAME h5test-clear-links_env-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- links_env.txt
- links_env.txt.err
- extlinks_env0.h5
- extlinks_env1.h5
- tmp/extlinks_env1.h5
-)
-ADD_TEST (NAME links_env COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:links_env>"
- -D "TEST_ARGS:STRING="
- -D "TEST_ENV_VAR:STRING=HDF5_EXT_PREFIX"
- -D "TEST_ENV_VALUE:STRING=.:tmp"
- -D "TEST_EXPECT=0"
- -D "TEST_OUTPUT=links_env.txt"
- -D "TEST_REFERENCE=links_env.out"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
-)
-SET_TESTS_PROPERTIES(links_env PROPERTIES DEPENDS h5test-clear-links_env-objects)
-
-#-- Adding test for libinfo
-SET (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
-FILE (WRITE ${GREP_RUNNER}
- "FILE (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\")
-IF (\${TEST_RESULT} STREQUAL \"0\")
- MESSAGE (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\")
-ELSE (\${TEST_RESULT} STREQUAL \"0\")
- MESSAGE (STATUS \"COMMAND Result: \${TEST_RESULT}\")
-ENDIF (\${TEST_RESULT} STREQUAL \"0\")
-"
-)
-
-ADD_TEST (NAME testlibinfo COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIB_TARGET}>" -P "${GREP_RUNNER}")
-
-##############################################################################
-### P L U G I N T E S T S
-##############################################################################
-IF (BUILD_SHARED_LIBS)
-
- IF (WIN32 AND NOT CYGWIN)
- SET(CMAKE_SEP "\;")
- ELSE (WIN32 AND NOT CYGWIN)
- SET(CMAKE_SEP ":")
- ENDIF(WIN32 AND NOT CYGWIN)
-
- ADD_EXECUTABLE (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c)
- TARGET_NAMING (plugin ${LIB_TYPE})
- TARGET_C_PROPERTIES (plugin " " " ")
- TARGET_LINK_LIBRARIES (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET})
- SET_TARGET_PROPERTIES (plugin PROPERTIES FOLDER test)
-
- ADD_TEST (NAME H5PLUGIN-plugin COMMAND $<TARGET_FILE:plugin>)
- SET_TESTS_PROPERTIES (H5PLUGIN-plugin PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2")
-ELSE (BUILD_SHARED_LIBS)
- MESSAGE (STATUS " **** Plugins libraries must be built as shared libraries **** ")
- ADD_TEST (
- NAME H5PLUGIN-SKIPPED
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING"
- )
-ENDIF (BUILD_SHARED_LIBS)
-
-##############################################################################
-##############################################################################
-### V F D T E S T S ###
-##############################################################################
-##############################################################################
-
-IF (HDF5_TEST_VFD)
-
- SET (VFD_LIST
- sec2
- stdio
- core
- split
- multi
- family
- )
-
- SET (H5_VFD_TESTS
- testhdf5
- accum
- lheap
- ohdr
- stab
- gheap
- cache
- cache_api
- cache_tagging
- pool
- hyperslab
- istore
- bittests
- dt_arith
- dtypes
- cmpd_dset
- filter_fail
- extend
- external
- efc
- objcopy
- links
- unlink
- big
- mtime
- fillval
- mount
- flush1
- flush2
- app_ref
- enum
- set_extent
- ttsafe
- getname
- vfd
- ntypes
- dangle
- dtransform
- reserved
- cross_read
- freespace
- mf
- farray
- earray
- btree2
- #fheap
- error_test
- err_compat
- tcheck_version
- testmeta
- links_env
- unregister
-)
-
- IF (DIRECT_VFD)
- SET (VFD_LIST ${VFD_LIST} direct)
- ENDIF (DIRECT_VFD)
-
- MACRO (ADD_VFD_TEST vfdname resultcode)
- FOREACH (test ${H5_VFD_TESTS})
- ADD_TEST (
- NAME VFD-${vfdname}-${test}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${test}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
- )
- ENDFOREACH (test ${H5_VFD_TESTS})
- IF (HDF5_TEST_FHEAP_VFD)
- ADD_TEST (
- NAME VFD-${vfdname}-fheap
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:fheap>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=fheap"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
- )
- ENDIF (HDF5_TEST_FHEAP_VFD)
- ENDMACRO (ADD_VFD_TEST)
-
- # Run test with different Virtual File Driver
- FOREACH (vfd ${VFD_LIST})
- ADD_VFD_TEST (${vfd} 0)
- ENDFOREACH (vfd ${VFD_LIST})
-
-ENDIF (HDF5_TEST_VFD)
-
-##############################################################################
-##############################################################################
-### T H E G E N E R A T O R S ###
-##############################################################################
-##############################################################################
-
-IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- MACRO (ADD_H5_GENERATOR genfile)
- ADD_EXECUTABLE (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c)
- TARGET_NAMING (${genfile} ${LIB_TYPE})
- TARGET_C_PROPERTIES (${genfile} " " " ")
- TARGET_LINK_LIBRARIES (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
- SET_TARGET_PROPERTIES (${genfile} PROPERTIES FOLDER generator/test)
- ENDMACRO (ADD_H5_GENERATOR genfile)
-
- # generator executables
- SET (H5_GENERATORS
- gen_bad_ohdr
- gen_bogus
- gen_cross
- gen_deflate
- gen_filters
- gen_new_array
- gen_new_fill
- gen_new_group
- gen_new_mtime
- gen_new_super
- gen_noencoder
- gen_nullspace
- gen_udlinks
- space_overflow
- gen_filespace
- gen_specmetaread
- gen_sizes_lheap
- gen_file_image
- gen_plist
- )
-
- FOREACH (gen ${H5_GENERATORS})
- ADD_H5_GENERATOR (${gen})
- ENDFOREACH (gen ${H5_GENERATORS})
-
-ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+INCLUDE (CMakeTests.cmake)
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
new file mode 100644
index 0000000..2f48bbe
--- /dev/null
+++ b/test/CMakeTests.cmake
@@ -0,0 +1,717 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+# --------------------------------------------------------------------
+# Copy all the HDF5 files from the test directory into the source directory
+# --------------------------------------------------------------------
+SET (HDF5_TEST_FILES
+ tnullspace.h5
+)
+
+FOREACH (h5_tfile ${HDF5_TEST_FILES})
+ SET (dest "${PROJECT_BINARY_DIR}/${h5_tfile}")
+ #MESSAGE (STATUS " Copying ${h5_tfile}")
+ ADD_CUSTOM_COMMAND (
+ TARGET ${HDF5_TEST_LIB_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_tfile} ${dest}
+ )
+ENDFOREACH (h5_tfile ${HDF5_TEST_FILES})
+
+# --------------------------------------------------------------------
+# Copy all the HDF5 files from the test directory into the source directory
+# --------------------------------------------------------------------
+SET (HDF5_REFERENCE_FILES
+ err_compat_1
+ err_compat_2
+ error_test_1
+ error_test_2
+ links_env.out
+)
+
+FOREACH (ref_file ${HDF5_REFERENCE_FILES})
+ SET (dest "${PROJECT_BINARY_DIR}/${ref_file}")
+ #MESSAGE (STATUS " Copying ${h5_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET ${HDF5_TEST_LIB_TARGET}
+ POST_BUILD
+ COMMAND ${XLATE_UTILITY}
+ ARGS ${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file} ${dest} -l3
+ )
+ENDFOREACH (ref_file ${HDF5_REFERENCE_FILES})
+
+# --------------------------------------------------------------------
+# Copy test files from test/testfiles/plist_files dir to test dir
+# --------------------------------------------------------------------
+SET (HDF5_REFERENCE_PLIST_FILES
+ acpl_be
+ acpl_le
+ dapl_be
+ dapl_le
+ dcpl_be
+ dcpl_le
+ dxpl_be
+ dxpl_le
+ fapl_be
+ fapl_le
+ fcpl_be
+ fcpl_le
+ gcpl_be
+ gcpl_le
+ lapl_be
+ lapl_le
+ lcpl_be
+ lcpl_le
+ ocpl_be
+ ocpl_le
+ ocpypl_be
+ ocpypl_le
+ strcpl_be
+ strcpl_le
+)
+
+FOREACH (plistfile ${HDF5_REFERENCE_PLIST_FILES})
+ SET (dest "${PROJECT_BINARY_DIR}/${plistfile}")
+ #MESSAGE (STATUS " Copying ${plistfile} to ${dset}")
+ ADD_CUSTOM_COMMAND (
+ TARGET ${HDF5_TEST_LIB_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile} ${dest}
+ )
+ENDFOREACH (plistfile ${HDF5_REFERENCE_PLIST_FILES})
+
+# --------------------------------------------------------------------
+#-- Copy all the HDF5 files from the test directory into the source directory
+# --------------------------------------------------------------------
+SET (HDF5_REFERENCE_TEST_FILES
+ be_data.h5
+ be_extlink1.h5
+ be_extlink2.h5
+ corrupt_stab_msg.h5
+ deflate.h5
+ family_v16_00000.h5
+ family_v16_00001.h5
+ family_v16_00002.h5
+ family_v16_00003.h5
+ filespace_1_6.h5
+ filespace_1_8.h5
+ file_image_core_test.h5
+ fill_old.h5
+ filter_error.h5
+ group_old.h5
+ le_data.h5
+ le_extlink1.h5
+ le_extlink2.h5
+ mergemsg.h5
+ multi_file_v16-r.h5
+ multi_file_v16-s.h5
+ noencoder.h5
+ specmetaread.h5
+ tarrold.h5
+ tbad_msg_count.h5
+ tbogus.h5
+ test_filters_be.h5
+ test_filters_le.h5
+ th5s.h5
+ tlayouto.h5
+ tmtimen.h5
+ tmtimeo.h5
+ tsizeslheap.h5
+)
+
+FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ SET (dest "${HDF5_TEST_BINARY_DIR}/${h5_file}")
+ #MESSAGE (STATUS " Copying ${h5_file} to ${dest}")
+ ADD_CUSTOM_COMMAND (
+ TARGET ${HDF5_TEST_LIB_TARGET}
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TEST_SOURCE_DIR}/${h5_file} ${dest}
+ )
+ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+
+SET (testhdf5_SRCS
+ ${HDF5_TEST_SOURCE_DIR}/testhdf5.c
+ ${HDF5_TEST_SOURCE_DIR}/tarray.c
+ ${HDF5_TEST_SOURCE_DIR}/tattr.c
+ ${HDF5_TEST_SOURCE_DIR}/tchecksum.c
+ ${HDF5_TEST_SOURCE_DIR}/tconfig.c
+ ${HDF5_TEST_SOURCE_DIR}/tcoords.c
+ ${HDF5_TEST_SOURCE_DIR}/tfile.c
+ ${HDF5_TEST_SOURCE_DIR}/tgenprop.c
+ ${HDF5_TEST_SOURCE_DIR}/th5o.c
+ ${HDF5_TEST_SOURCE_DIR}/th5s.c
+ ${HDF5_TEST_SOURCE_DIR}/theap.c
+ ${HDF5_TEST_SOURCE_DIR}/tid.c
+ ${HDF5_TEST_SOURCE_DIR}/titerate.c
+ ${HDF5_TEST_SOURCE_DIR}/tmeta.c
+ ${HDF5_TEST_SOURCE_DIR}/tmisc.c
+ ${HDF5_TEST_SOURCE_DIR}/trefer.c
+ ${HDF5_TEST_SOURCE_DIR}/trefstr.c
+ ${HDF5_TEST_SOURCE_DIR}/tselect.c
+ ${HDF5_TEST_SOURCE_DIR}/tskiplist.c
+ ${HDF5_TEST_SOURCE_DIR}/tsohm.c
+ ${HDF5_TEST_SOURCE_DIR}/ttime.c
+ ${HDF5_TEST_SOURCE_DIR}/ttst.c
+ ${HDF5_TEST_SOURCE_DIR}/tunicode.c
+ ${HDF5_TEST_SOURCE_DIR}/tvltypes.c
+ ${HDF5_TEST_SOURCE_DIR}/tvlstr.c
+)
+
+#-- Adding test for testhdf5
+ADD_EXECUTABLE (testhdf5 ${testhdf5_SRCS})
+TARGET_NAMING (testhdf5 ${LIB_TYPE})
+TARGET_C_PROPERTIES (testhdf5 " " " ")
+TARGET_LINK_LIBRARIES (testhdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+SET_TARGET_PROPERTIES (testhdf5 PROPERTIES FOLDER test)
+
+# Remove any output file left over from previous test run
+ADD_TEST (
+ NAME h5test-clear-testhdf5-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ coord.h5
+ sys_file1
+ tattr.h5
+ tfile1.h5
+ tfile2.h5
+ tfile3.h5
+ tfile4.h5
+ tfile5.h5
+ tfile6.h5
+ th5o_file
+ th5s1.h5
+ tselect.h5
+ tsohm.h5
+ tsohm_dst.h5
+ tsohm_src.h5
+)
+
+IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME testhdf5-base COMMAND $<TARGET_FILE:testhdf5> -x heap -x file -x select)
+ SET_TESTS_PROPERTIES(testhdf5-base PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+ SET_TESTS_PROPERTIES(testhdf5-base PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+ ADD_TEST (NAME testhdf5-heap COMMAND $<TARGET_FILE:testhdf5> -o heap)
+ SET_TESTS_PROPERTIES(testhdf5-heap PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+ SET_TESTS_PROPERTIES(testhdf5-heap PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+ ADD_TEST (NAME testhdf5-file COMMAND $<TARGET_FILE:testhdf5> -o file)
+ SET_TESTS_PROPERTIES(testhdf5-file PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+ SET_TESTS_PROPERTIES(testhdf5-file PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+ ADD_TEST (NAME testhdf5-select COMMAND $<TARGET_FILE:testhdf5> -o select)
+ SET_TESTS_PROPERTIES(testhdf5-select PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+ SET_TESTS_PROPERTIES(testhdf5-select PROPERTIES ENVIRONMENT HDF5_ALARM_SECONDS=3600)
+ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME testhdf5 COMMAND $<TARGET_FILE:testhdf5>)
+ SET_TESTS_PROPERTIES(testhdf5 PROPERTIES DEPENDS h5test-clear-testhdf5-objects)
+ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+MACRO (ADD_H5_TEST file)
+ ADD_EXECUTABLE (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c)
+ TARGET_NAMING (${file} ${LIB_TYPE})
+ TARGET_C_PROPERTIES (${file} " " " ")
+ TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test)
+
+ ADD_TEST (NAME ${file} COMMAND $<TARGET_FILE:${file}>)
+ENDMACRO (ADD_H5_TEST file)
+
+# Remove any output file left over from previous test run
+ADD_TEST (
+ NAME h5test-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ dt_arith1.h5
+ dt_arith2.h5
+ dtransform.h5
+ dtypes4.h5
+ dtypes5.h5
+ efc0.h5
+ efc1.h5
+ efc2.h5
+ efc3.h5
+ efc4.h5
+ efc5.h5
+ extlinks16A00000.h5
+ extlinks16A00001.h5
+ extlinks16A00002.h5
+ extlinks16B-b.h5
+ extlinks16B-g.h5
+ extlinks16B-l.h5
+ extlinks16B-r.h5
+ extlinks16B-s.h5
+ extlinks19B00000.h5
+ extlinks19B00001.h5
+ extlinks19B00002.h5
+ extlinks19B00003.h5
+ extlinks19B00004.h5
+ extlinks19B00005.h5
+ extlinks19B00006.h5
+ extlinks19B00007.h5
+ extlinks19B00008.h5
+ extlinks19B00009.h5
+ extlinks19B00010.h5
+ extlinks19B00011.h5
+ extlinks19B00012.h5
+ extlinks19B00013.h5
+ extlinks19B00014.h5
+ extlinks19B00015.h5
+ extlinks19B00016.h5
+ extlinks19B00017.h5
+ extlinks19B00018.h5
+ extlinks19B00019.h5
+ extlinks19B00020.h5
+ extlinks19B00021.h5
+ extlinks19B00022.h5
+ extlinks19B00023.h5
+ extlinks19B00024.h5
+ extlinks19B00025.h5
+ extlinks19B00026.h5
+ extlinks19B00027.h5
+ extlinks19B00028.h5
+ fheap.h5
+ new_multi_file_v16-r.h5
+ new_multi_file_v16-s.h5
+ objcopy_ext.dat
+ testmeta.h5
+ tstint1.h5
+ tstint2.h5
+ unregister_filter_1.h5
+ unregister_filter_2.h5
+)
+
+SET (H5_TESTS
+ accum
+ lheap
+ ohdr
+ stab
+ gheap
+ #cache
+ #cache_api
+ #cache_tagging
+ pool
+ hyperslab
+ istore
+ bittests
+ dt_arith
+ dtypes
+ cmpd_dset
+ filter_fail
+ extend
+ external
+ efc
+ objcopy
+ links
+ unlink
+ big
+ mtime
+ fillval
+ mount
+ flush1
+ flush2
+ app_ref
+ enum
+ set_extent
+ #ttsafe
+ getname
+ vfd
+ ntypes
+ dangle
+ dtransform
+ reserved
+ cross_read
+ freespace
+ mf
+ farray
+ earray
+ btree2
+ fheap
+ #error_test
+ #err_compat
+ tcheck_version
+ testmeta
+ #links_env
+ file_image
+ enc_dec_plist
+ enc_dec_plist_with_endianess
+ unregister
+)
+
+FOREACH (test ${H5_TESTS})
+ ADD_H5_TEST(${test})
+ SET_TESTS_PROPERTIES(${test} PROPERTIES DEPENDS h5test-clear-objects)
+ENDFOREACH (test ${H5_TESTS})
+
+SET_TESTS_PROPERTIES(flush2 PROPERTIES DEPENDS flush1)
+
+##############################################################################
+##############################################################################
+### A D D I T I O N A L T E S T S ###
+##############################################################################
+##############################################################################
+
+#-- Adding test for cache
+ADD_EXECUTABLE (cache ${HDF5_TEST_SOURCE_DIR}/cache.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
+TARGET_NAMING (cache ${LIB_TYPE})
+TARGET_C_PROPERTIES (cache " " " ")
+TARGET_LINK_LIBRARIES (cache ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (cache PROPERTIES FOLDER test)
+ADD_TEST (
+ NAME h5test-clear-cache-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ cache_test.h5
+)
+ADD_TEST (NAME cache COMMAND $<TARGET_FILE:cache>)
+SET_TESTS_PROPERTIES(cache PROPERTIES DEPENDS h5test-clear-cache-objects)
+
+#-- Adding test for cache_api
+ADD_EXECUTABLE (cache_api ${HDF5_TEST_SOURCE_DIR}/cache_api.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
+TARGET_NAMING (cache_api ${LIB_TYPE})
+TARGET_C_PROPERTIES (cache_api " " " ")
+TARGET_LINK_LIBRARIES (cache_api ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (cache_api PROPERTIES FOLDER test)
+
+ADD_TEST (
+ NAME h5test-clear-cache_api-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ cache_api_test.h5
+)
+ADD_TEST (NAME cache_api COMMAND $<TARGET_FILE:cache_api>)
+SET_TESTS_PROPERTIES(cache_api PROPERTIES DEPENDS h5test-clear-cache_api-objects)
+
+#-- Adding test for cache_tagging
+ADD_EXECUTABLE (cache_tagging ${HDF5_TEST_SOURCE_DIR}/cache_tagging.c ${HDF5_TEST_SOURCE_DIR}/cache_common.c)
+TARGET_NAMING (cache_tagging ${LIB_TYPE})
+TARGET_C_PROPERTIES (cache_tagging " " " ")
+TARGET_LINK_LIBRARIES (cache_tagging ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (cache_tagging PROPERTIES FOLDER test)
+
+ADD_TEST (
+ NAME h5test-clear-cache_tagging-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ tagging_test.h5
+ tagging_ext_test.h5
+)
+ADD_TEST (NAME cache_tagging COMMAND $<TARGET_FILE:cache_tagging>)
+SET_TESTS_PROPERTIES(cache_tagging PROPERTIES DEPENDS h5test-clear-cache_tagging-objects)
+
+#-- Adding test for ttsafe
+ADD_EXECUTABLE (ttsafe
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_dcreate.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_error.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_cancel.c
+ ${HDF5_TEST_SOURCE_DIR}/ttsafe_acreate.c
+)
+TARGET_NAMING (ttsafe ${LIB_TYPE})
+TARGET_C_PROPERTIES (ttsafe " " " ")
+TARGET_LINK_LIBRARIES (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (ttsafe PROPERTIES FOLDER test)
+
+ADD_TEST (
+ NAME h5test-clear-ttsafe-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ttsafe_error.h5
+ ttsafe_dcreate.h5
+ ttsafe_cancel.h5
+ ttsafe_acreate.h5
+)
+ADD_TEST (NAME ttsafe COMMAND $<TARGET_FILE:ttsafe>)
+SET_TESTS_PROPERTIES(ttsafe PROPERTIES DEPENDS h5test-clear-ttsafe-objects)
+
+#-- Adding test for err_compat
+IF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+ ADD_EXECUTABLE (err_compat ${HDF5_TEST_SOURCE_DIR}/err_compat.c)
+ TARGET_NAMING (err_compat ${LIB_TYPE})
+ TARGET_C_PROPERTIES (err_compat " " " ")
+ TARGET_LINK_LIBRARIES (err_compat ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+ SET_TARGET_PROPERTIES (err_compat PROPERTIES FOLDER test)
+
+ ADD_TEST (
+ NAME h5test-clear-err_compat-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ err_compat.txt
+ err_compat.txt.err
+ )
+ ADD_TEST (NAME err_compat COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:err_compat>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_MASK_ERROR=true"
+ -D "TEST_OUTPUT=err_compat.txt"
+ -D "TEST_REFERENCE=err_compat_1"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES(err_compat PROPERTIES DEPENDS h5test-clear-err_compat-objects)
+ENDIF (HDF5_ENABLE_DEPRECATED_SYMBOLS)
+
+#-- Adding test for error_test
+ADD_EXECUTABLE (error_test ${HDF5_TEST_SOURCE_DIR}/error_test.c)
+TARGET_NAMING (error_test ${LIB_TYPE})
+TARGET_C_PROPERTIES (error_test " " " ")
+TARGET_LINK_LIBRARIES (error_test ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (error_test PROPERTIES FOLDER test)
+
+ADD_TEST (
+ NAME h5test-clear-error_test-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ error_test.txt
+ error_test.txt.err
+)
+ADD_TEST (NAME error_test COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:error_test>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_EXPECT=0"
+ -D "TEST_MASK_ERROR=true"
+ -D "TEST_OUTPUT=error_test.txt"
+ -D "TEST_REFERENCE=error_test_1"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+)
+SET_TESTS_PROPERTIES(error_test PROPERTIES DEPENDS h5test-clear-error_test-objects)
+SET_TESTS_PROPERTIES (error_test PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PRELOAD=::")
+
+#-- Adding test for links_env
+ADD_EXECUTABLE (links_env ${HDF5_TEST_SOURCE_DIR}/links_env.c)
+TARGET_NAMING (links_env ${LIB_TYPE})
+TARGET_C_PROPERTIES (links_env " " " ")
+TARGET_LINK_LIBRARIES (links_env ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
+SET_TARGET_PROPERTIES (links_env PROPERTIES FOLDER test)
+
+ADD_TEST (
+ NAME h5test-clear-links_env-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ links_env.txt
+ links_env.txt.err
+ extlinks_env0.h5
+ extlinks_env1.h5
+ tmp/extlinks_env1.h5
+)
+ADD_TEST (NAME links_env COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:links_env>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_ENV_VAR:STRING=HDF5_EXT_PREFIX"
+ -D "TEST_ENV_VALUE:STRING=.:tmp"
+ -D "TEST_EXPECT=0"
+ -D "TEST_OUTPUT=links_env.txt"
+ -D "TEST_REFERENCE=links_env.out"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+)
+SET_TESTS_PROPERTIES(links_env PROPERTIES DEPENDS h5test-clear-links_env-objects)
+
+#-- Adding test for libinfo
+SET (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake)
+FILE (WRITE ${GREP_RUNNER}
+ "FILE (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\")
+IF (\${TEST_RESULT} STREQUAL \"0\")
+ MESSAGE (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\")
+ELSE (\${TEST_RESULT} STREQUAL \"0\")
+ MESSAGE (STATUS \"COMMAND Result: \${TEST_RESULT}\")
+ENDIF (\${TEST_RESULT} STREQUAL \"0\")
+"
+)
+
+ADD_TEST (NAME testlibinfo COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIB_TARGET}>" -P "${GREP_RUNNER}")
+
+##############################################################################
+### P L U G I N T E S T S
+##############################################################################
+IF (BUILD_SHARED_LIBS)
+
+ IF (WIN32 AND NOT CYGWIN)
+ SET(CMAKE_SEP "\;")
+ ELSE (WIN32 AND NOT CYGWIN)
+ SET(CMAKE_SEP ":")
+ ENDIF(WIN32 AND NOT CYGWIN)
+
+ ADD_EXECUTABLE (plugin ${HDF5_TEST_SOURCE_DIR}/plugin.c)
+ TARGET_NAMING (plugin ${LIB_TYPE})
+ TARGET_C_PROPERTIES (plugin " " " ")
+ TARGET_LINK_LIBRARIES (plugin ${HDF5_TEST_PLUGIN_LIB_TARGET})
+ SET_TARGET_PROPERTIES (plugin PROPERTIES FOLDER test)
+
+ ADD_TEST (NAME H5PLUGIN-plugin COMMAND $<TARGET_FILE:plugin>)
+ SET_TESTS_PROPERTIES (H5PLUGIN-plugin PROPERTIES ENVIRONMENT "HDF5_PLUGIN_PATH=${CMAKE_BINARY_DIR}/testdir1${CMAKE_SEP}${CMAKE_BINARY_DIR}/testdir2")
+ELSE (BUILD_SHARED_LIBS)
+ MESSAGE (STATUS " **** Plugins libraries must be built as shared libraries **** ")
+ ADD_TEST (
+ NAME H5PLUGIN-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP H5PLUGIN TESTING"
+ )
+ENDIF (BUILD_SHARED_LIBS)
+
+##############################################################################
+##############################################################################
+### V F D T E S T S ###
+##############################################################################
+##############################################################################
+
+IF (HDF5_TEST_VFD)
+
+ SET (VFD_LIST
+ sec2
+ stdio
+ core
+ split
+ multi
+ family
+ )
+
+ SET (H5_VFD_TESTS
+ testhdf5
+ accum
+ lheap
+ ohdr
+ stab
+ gheap
+ cache
+ cache_api
+ cache_tagging
+ pool
+ hyperslab
+ istore
+ bittests
+ dt_arith
+ dtypes
+ cmpd_dset
+ filter_fail
+ extend
+ external
+ efc
+ objcopy
+ links
+ unlink
+ big
+ mtime
+ fillval
+ mount
+ flush1
+ flush2
+ app_ref
+ enum
+ set_extent
+ ttsafe
+ getname
+ vfd
+ ntypes
+ dangle
+ dtransform
+ reserved
+ cross_read
+ freespace
+ mf
+ farray
+ earray
+ btree2
+ #fheap
+ error_test
+ err_compat
+ tcheck_version
+ testmeta
+ links_env
+ unregister
+)
+
+ IF (DIRECT_VFD)
+ SET (VFD_LIST ${VFD_LIST} direct)
+ ENDIF (DIRECT_VFD)
+
+ MACRO (ADD_VFD_TEST vfdname resultcode)
+ FOREACH (test ${H5_VFD_TESTS})
+ ADD_TEST (
+ NAME VFD-${vfdname}-${test}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${test}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ ENDFOREACH (test ${H5_VFD_TESTS})
+ IF (HDF5_TEST_FHEAP_VFD)
+ ADD_TEST (
+ NAME VFD-${vfdname}-fheap
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:fheap>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=fheap"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ ENDIF (HDF5_TEST_FHEAP_VFD)
+ ENDMACRO (ADD_VFD_TEST)
+
+ # Run test with different Virtual File Driver
+ FOREACH (vfd ${VFD_LIST})
+ ADD_VFD_TEST (${vfd} 0)
+ ENDFOREACH (vfd ${VFD_LIST})
+
+ENDIF (HDF5_TEST_VFD)
+
+##############################################################################
+##############################################################################
+### T H E G E N E R A T O R S ###
+##############################################################################
+##############################################################################
+
+IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
+ MACRO (ADD_H5_GENERATOR genfile)
+ ADD_EXECUTABLE (${genfile} ${HDF5_TEST_SOURCE_DIR}/${genfile}.c)
+ TARGET_NAMING (${genfile} ${LIB_TYPE})
+ TARGET_C_PROPERTIES (${genfile} " " " ")
+ TARGET_LINK_LIBRARIES (${genfile} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET})
+ SET_TARGET_PROPERTIES (${genfile} PROPERTIES FOLDER generator/test)
+ ENDMACRO (ADD_H5_GENERATOR genfile)
+
+ # generator executables
+ SET (H5_GENERATORS
+ gen_bad_ohdr
+ gen_bogus
+ gen_cross
+ gen_deflate
+ gen_filters
+ gen_new_array
+ gen_new_fill
+ gen_new_group
+ gen_new_mtime
+ gen_new_super
+ gen_noencoder
+ gen_nullspace
+ gen_udlinks
+ space_overflow
+ gen_filespace
+ gen_specmetaread
+ gen_sizes_lheap
+ gen_file_image
+ gen_plist
+ )
+
+ FOREACH (gen ${H5_GENERATORS})
+ ADD_H5_GENERATOR (${gen})
+ ENDFOREACH (gen ${H5_GENERATORS})
+
+ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt
index 04aa383..30cdcda 100644
--- a/testpar/CMakeLists.txt
+++ b/testpar/CMakeLists.txt
@@ -33,17 +33,13 @@ TARGET_C_PROPERTIES (testphdf5 " " " ")
TARGET_LINK_LIBRARIES (testphdf5 ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS})
SET_TARGET_PROPERTIES (testphdf5 PROPERTIES FOLDER test/par)
-ADD_TEST (NAME TEST_PAR_testphdf5 COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:testphdf5>)
-
-MACRO (ADD_H5P_TEST file)
+MACRO (ADD_H5P_EXE file)
ADD_EXECUTABLE (${file} ${HDF5_TEST_PAR_SOURCE_DIR}/${file}.c)
TARGET_NAMING (${file} ${LIB_TYPE})
TARGET_C_PROPERTIES (${file} " " " ")
TARGET_LINK_LIBRARIES (${file} ${HDF5_TEST_LIB_TARGET} ${HDF5_LIB_TARGET} ${LINK_LIBS})
SET_TARGET_PROPERTIES (${file} PROPERTIES FOLDER test/par)
-
- ADD_TEST (NAME TEST_PAR_${file} COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:${file}>)
-ENDMACRO (ADD_H5P_TEST file)
+ENDMACRO (ADD_H5P_EXE file)
SET (H5P_TESTS
t_mpi
@@ -55,56 +51,11 @@ SET (H5P_TESTS
)
FOREACH (testp ${H5P_TESTS})
- ADD_H5P_TEST(${testp})
+ ADD_H5P_EXE(${testp})
ENDFOREACH (testp ${H5P_TESTS})
-SET_TESTS_PROPERTIES(TEST_PAR_t_pflush2 PROPERTIES DEPENDS TEST_PAR_t_pflush1)
-
IF (NOT WIN32)
- ADD_H5P_TEST(t_posix_compliant)
+ ADD_H5P_EXE(t_posix_compliant)
ENDIF (NOT WIN32)
-
-IF (HDF5_TEST_VFD)
-
- SET (VFD_LIST
- sec2
- stdio
- core
- split
- multi
- family
- )
-
- SET (H5P_VFD_TESTS
- t_pflush1
- t_pflush2
- )
-
- IF (DIRECT_VFD)
- SET (VFD_LIST ${VFD_LIST} direct)
- ENDIF (DIRECT_VFD)
-
- MACRO (ADD_VFD_TEST vfdname resultcode)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- FOREACH (test ${H5P_VFD_TESTS})
- ADD_TEST (
- NAME VFD-${vfdname}-${test}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=${test}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
- )
- ENDFOREACH (test ${H5P_VFD_TESTS})
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_VFD_TEST)
-
- # Run test with different Virtual File Driver
- FOREACH (vfd ${VFD_LIST})
- ADD_VFD_TEST (${vfd} 0)
- ENDFOREACH (vfd ${VFD_LIST})
-ENDIF (HDF5_TEST_VFD)
+INCLUDE (CMakeTests.cmake)
diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake
new file mode 100644
index 0000000..bc8fc90
--- /dev/null
+++ b/testpar/CMakeTests.cmake
@@ -0,0 +1,63 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ADD_TEST (NAME TEST_PAR_testphdf5 COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:testphdf5>)
+
+FOREACH (testp ${H5P_TESTS})
+ ADD_TEST (NAME TEST_PAR_${testp} COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:${testp}>)
+ENDFOREACH (testp ${H5P_TESTS})
+
+SET_TESTS_PROPERTIES(TEST_PAR_t_pflush2 PROPERTIES DEPENDS TEST_PAR_t_pflush1)
+
+IF (NOT WIN32)
+ ADD_TEST (NAME TEST_PAR_t_posix_compliant COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:t_posix_compliant>)
+ENDIF (NOT WIN32)
+
+IF (HDF5_TEST_VFD)
+
+ SET (VFD_LIST
+ sec2
+ stdio
+ core
+ split
+ multi
+ family
+ )
+
+ SET (H5P_VFD_TESTS
+ t_pflush1
+ t_pflush2
+ )
+
+ IF (DIRECT_VFD)
+ SET (VFD_LIST ${VFD_LIST} direct)
+ ENDIF (DIRECT_VFD)
+
+ MACRO (ADD_VFD_TEST vfdname resultcode)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ FOREACH (test ${H5P_VFD_TESTS})
+ ADD_TEST (
+ NAME VFD-${vfdname}-${test}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${test}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ ENDFOREACH (test ${H5P_VFD_TESTS})
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_VFD_TEST)
+
+ # Run test with different Virtual File Driver
+ FOREACH (vfd ${VFD_LIST})
+ ADD_VFD_TEST (${vfd} 0)
+ ENDFOREACH (vfd ${VFD_LIST})
+
+ENDIF (HDF5_TEST_VFD)
diff --git a/tools/h5copy/CMakeLists.txt b/tools/h5copy/CMakeLists.txt
index 137edb0..6faf332 100644
--- a/tools/h5copy/CMakeLists.txt
+++ b/tools/h5copy/CMakeLists.txt
@@ -17,12 +17,6 @@ SET_TARGET_PROPERTIES (h5copy PROPERTIES FOLDER tools)
SET (H5_DEP_EXECUTABLES h5copy)
-##############################################################################
-##############################################################################
-### T E S T I N G ###
-##############################################################################
-##############################################################################
-
IF (BUILD_TESTING)
IF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
ADD_EXECUTABLE (h5copygentest ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/h5copygentest.c)
@@ -33,381 +27,8 @@ IF (BUILD_TESTING)
#ADD_TEST (NAME h5copygentest COMMAND $<TARGET_FILE:h5copygentest>)
ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
-
- # --------------------------------------------------------------------
- # Copy all the HDF5 files from the source directory into the test directory
- # --------------------------------------------------------------------
- SET (LIST_HDF5_TEST_FILES
- ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_src.h5
- ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_trg.h5
- ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_ref.h5
- ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copytst.h5
- )
-
- SET (LIST_OTHER_TEST_FILES
- ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_misc1.out
- )
-
- FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
-
- FOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${listfiles}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #MESSAGE (STATUS " Copying ${listfiles}")
- ADD_CUSTOM_COMMAND (
- TARGET h5copy
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${listfiles} ${dest}
- )
- ENDFOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
-
-##############################################################################
-##############################################################################
-### T H E T E S T S M A C R O S ###
-##############################################################################
-##############################################################################
- #
- # Perform h5copy according to passing parmeters
- #
- MACRO (ADD_H5_F_TEST testname resultcode infile fparam vparam sparam srcname dparam dstname)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5COPY_F-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ./testfiles/${testname}.out.h5
- )
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
-
- ADD_TEST (
- NAME H5COPY_F-${testname}
- COMMAND $<TARGET_FILE:h5copy> -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
- )
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY_F-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5COPY_F-${testname} PROPERTIES DEPENDS H5COPY_F-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
- # resultcode=2 will cause the test to skip the diff test
- IF (NOT ${resultcode} STREQUAL "2")
- ADD_TEST (
- NAME H5COPY_F-${testname}-DIFF
- COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
- )
- SET_TESTS_PROPERTIES(H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname})
- IF (${resultcode} STREQUAL "1")
- SET_TESTS_PROPERTIES (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- ENDIF (NOT ${resultcode} STREQUAL "2")
- ENDMACRO (ADD_H5_F_TEST)
-
- MACRO (ADD_H5_TEST testname resultcode infile vparam sparam srcname dparam dstname)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5COPY-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ./testfiles/${testname}.out.h5
- )
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
-
- ADD_TEST (
- NAME H5COPY-${testname}
- COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
- )
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
- # resultcode=2 will cause the test to skip the diff test
- IF (NOT ${resultcode} STREQUAL "2")
- ADD_TEST (
- NAME H5COPY-${testname}-DIFF
- COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
- )
- SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
- IF (${resultcode} STREQUAL "1")
- SET_TESTS_PROPERTIES (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- ENDIF (NOT ${resultcode} STREQUAL "2")
- ENDMACRO (ADD_H5_TEST)
-
- MACRO (ADD_H5_TEST2 testname resultcode infile psparam pdparam vparam sparam srcname dparam dstname)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5COPY-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ./testfiles/${testname}.out.h5
- )
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
-
- ADD_TEST (
- NAME H5COPY-${testname}-prefill
- COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
- )
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-${testname}-prefill PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5COPY-${testname}-prefill PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
- ADD_TEST (
- NAME H5COPY-${testname}
- COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
- )
- SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-prefill)
- # resultcode=2 will cause the test to skip the diff test
- IF (NOT ${resultcode} STREQUAL "2")
- ADD_TEST (
- NAME H5COPY-${testname}-DIFF
- COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
- )
- SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
- IF (${resultcode} STREQUAL "1")
- SET_TESTS_PROPERTIES (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- ENDIF (NOT ${resultcode} STREQUAL "2")
- ENDMACRO (ADD_H5_TEST2)
-
- MACRO (ADD_H5_TEST_SAME testname resultcode pfile psparam pdparam vparam sparam srcname dparam dstname)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5COPY_SAME-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ./testfiles/${testname}.out.h5
- )
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
-
- ADD_TEST (
- NAME H5COPY_SAME-${testname}-prefill
- COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
- )
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS H5COPY_SAME-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
- ADD_TEST (
- NAME H5COPY_SAME-${testname}
- COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${testname}.out.h5 -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
- )
- SET_TESTS_PROPERTIES (H5COPY_SAME-${testname} PROPERTIES DEPENDS H5COPY_SAME-${testname}-prefill)
- # resultcode=2 will cause the test to skip the diff test
- IF (NOT ${resultcode} STREQUAL "2")
- ADD_TEST (
- NAME H5COPY_SAME-${testname}-DIFF
- COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
- )
- SET_TESTS_PROPERTIES(H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname})
- IF (${resultcode} STREQUAL "1")
- SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- ENDIF (NOT ${resultcode} STREQUAL "2")
- ENDMACRO (ADD_H5_TEST_SAME)
-
- #
- # Similiar to ADD_H5_TEST macro. Compare to outputs from source & target
- # files instead of checking with h5ls.
- #
- MACRO (ADD_H5_CMP_TEST testname resultcode infile vparam sparam srcname dparam dstname)
- # If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5COPY-CMP-${testname} COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
- IF (${resultcode} STREQUAL "1")
- SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5COPY-CMP-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ./testfiles/${testname}.out.h5
- ./testfiles/${testname}.out.out
- ./testfiles/${testname}.out.out.err
- )
- ADD_TEST (
- NAME H5COPY-CMP-${testname}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5copy>"
- -D "TEST_ARGS=-i;./testfiles/${infile};-o;./testfiles/${testname}.out.h5;${vparam};${sparam};${srcname};${dparam};${dstname}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=./testfiles/${testname}.out.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=./testfiles/${testname}.out"
- -D "TEST_MASK=true"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES DEPENDS H5COPY-CMP-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_CMP_TEST)
-
-##############################################################################
-##############################################################################
-### T H E T E S T S ###
-##############################################################################
-##############################################################################
-
- # --------------------------------------------------------------------
- # test file names
- # --------------------------------------------------------------------
- SET (HDF_FILE1 h5copytst)
- SET (HDF_FILE2 h5copy_ref)
- SET (HDF_EXT_SRC_FILE h5copy_extlinks_src)
- SET (HDF_EXT_TRG_FILE h5copy_extlinks_trg)
-
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5COPY-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- simple.out.h5
- chunk.out.h5
- compact.out.h5
- compound.out.h5
- compressed.out.h5
- named_vl.out.h5
- nested_vl.out.h5
- simple_top.out.h5
- dsrename.out.h5
- grp_empty.out.h5
- grp_dsets.out.h5
- grp_nested.out.h5
- simple_group.out.h5
- grp_rename.out.h5
- grp_dsets_rename.out.h5
- A_B1_simple.out.h5
- A_B2_simple2.out.h5
- C_D_simple.out.h5
- E_F_grp_dsets.out.h5
- G_H_grp_nested.out.h5
- region_ref.out.h5
- ext_link.out.h5
- ext_link_f.out.h5
- ext_dangle_noobj.out.h5
- ext_dangle_noobj_f.out.h5
- ext_dangle_nofile.out.h5
- ext_dangle_nofile_f.out.h5
- ext_link_group.out.h5
- ext_link_group_f.out.h5
- samefile1.out.h5
- samefile2.out.h5
- h5copy_misc1.out.h5
- h5copy_misc1.out.out
- h5copy_misc1.out.out.err
- )
- SET_TESTS_PROPERTIES (H5COPY-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5COPY-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5COPY-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
- # "Test copying various forms of datasets"
- ADD_H5_TEST (simple 0 ${HDF_FILE1}.h5 -v -s simple -d simple)
- ADD_H5_TEST (chunk 0 ${HDF_FILE1}.h5 -v -s chunk -d chunk)
- ADD_H5_TEST (compact 0 ${HDF_FILE1}.h5 -v -s compact -d compact)
- ADD_H5_TEST (compound 0 ${HDF_FILE1}.h5 -v -s compound -d compound)
- ADD_H5_TEST (compressed 0 ${HDF_FILE1}.h5 -v -s compressed -d compressed)
- ADD_H5_TEST (named_vl 0 ${HDF_FILE1}.h5 -v -s named_vl -d named_vl)
- ADD_H5_TEST (nested_vl 0 ${HDF_FILE1}.h5 -v -s nested_vl -d nested_vl)
-
- # "Test copying dataset within group in source file to root of destination"
- ADD_H5_TEST (simple_top 0 ${HDF_FILE1}.h5 -v -s grp_dsets/simple -d simple_top)
-
- # "Test copying & renaming dataset"
- ADD_H5_TEST (dsrename 0 ${HDF_FILE1}.h5 -v -s compound -d rename)
-
- # "Test copying empty, 'full' & 'nested' groups"
- ADD_H5_TEST (grp_empty 0 ${HDF_FILE1}.h5 -v -s grp_empty -d grp_empty)
- ADD_H5_TEST (grp_dsets 0 ${HDF_FILE1}.h5 -v -s grp_dsets -d grp_dsets)
- ADD_H5_TEST (grp_nested 0 ${HDF_FILE1}.h5 -v -s grp_nested -d grp_nested)
-
- # "Test copying dataset within group in source file to group in destination"
- ADD_H5_TEST2 (simple_group 0 ${HDF_FILE1}.h5 grp_dsets grp_dsets -v -s /grp_dsets/simple -d /grp_dsets/simple_group)
-
- # "Test copying & renaming group"
- ADD_H5_TEST (grp_rename 0 ${HDF_FILE1}.h5 -v -s grp_dsets -d grp_rename)
-
- # "Test copying 'full' group hierarchy into group in destination file"
- ADD_H5_TEST2 (grp_dsets_rename 0 ${HDF_FILE1}.h5 grp_dsets grp_rename -v -s grp_dsets -d /grp_rename/grp_dsets)
-
- # "Test copying objects into group hier. that doesn't exist yet in destination file"
- ADD_H5_TEST (A_B1_simple 0 ${HDF_FILE1}.h5 -vp -s simple -d /A/B1/simple)
- ADD_H5_TEST (A_B2_simple2 0 ${HDF_FILE1}.h5 -vp -s simple -d /A/B2/simple2)
- ADD_H5_TEST (C_D_simple 0 ${HDF_FILE1}.h5 -vp -s /grp_dsets/simple -d /C/D/simple)
- ADD_H5_TEST (E_F_grp_dsets 0 ${HDF_FILE1}.h5 -vp -s /grp_dsets -d /E/F/grp_dsets)
- ADD_H5_TEST (G_H_grp_nested 0 ${HDF_FILE1}.h5 -vp -s /grp_nested -d /G/H/grp_nested)
-
-############# COPY REFERENCES ##############
-
- # "Test copying object and region references"
- ADD_H5_F_TEST (region_ref 2 ${HDF_FILE2}.h5 ref -v -s / -d /COPY)
-
-############# COPY EXT LINKS ##############
-
- # "Test copying external link directly without -f ext"
- ADD_H5_TEST (ext_link 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_dset -d /copy1_dset)
-
- # "Test copying external link directly with -f ext"
- ADD_H5_F_TEST (ext_link_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext/extlink_dset -d /copy2_dset)
-
- # "Test copying dangling external link (no obj) directly without -f ext"
- ADD_H5_TEST (ext_dangle_noobj 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_1)
-
- # "Test copying dangling external link (no obj) directly with -f ext"
- ADD_H5_F_TEST (ext_dangle_noobj_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2)
-
- # "Test copying dangling external link (no file) directly without -f ext"
- ADD_H5_TEST (ext_dangle_nofile 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_1)
-
- # "Test copying dangling external link (no file) directly with -f ext"
- ADD_H5_F_TEST (ext_dangle_nofile_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2)
-
- # "Test copying a group contains external links without -f ext"
- ADD_H5_TEST (ext_link_group 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext -d /copy1_group)
-
- # "Test copying a group contains external links with -f ext"
- ADD_H5_F_TEST (ext_link_group_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext -d /copy2_group)
-
-############# Test misc. ##############
-
- #-----------------------------------------------------------------
- # "Test copying object into group which doesn't exist, without -p"
- #
- ADD_H5_CMP_TEST (h5copy_misc1 1 ${HDF_FILE1}.h5 -v -s /simple -d /g1/g2/simple)
-
- #-------------------------------------------
- # "Test copying objects to the same file "
- #
- # - dataset
- ADD_H5_TEST_SAME (samefile1 0 ${HDF_FILE1}.h5 /simple /simple -v -s /simple -d /simple_cp)
- # - group with some datasets
- ADD_H5_TEST_SAME (samefile2 0 ${HDF_FILE1}.h5 /grp_dsets /grp_dsets -v -s /grp_dsets -d /grp_dsets_cp)
+ INCLUDE (CMakeTests.cmake)
ENDIF (BUILD_TESTING)
##############################################################################
diff --git a/tools/h5copy/CMakeTests.cmake b/tools/h5copy/CMakeTests.cmake
new file mode 100644
index 0000000..a4cce03
--- /dev/null
+++ b/tools/h5copy/CMakeTests.cmake
@@ -0,0 +1,381 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ # --------------------------------------------------------------------
+ # Copy all the HDF5 files from the source directory into the test directory
+ # --------------------------------------------------------------------
+ SET (LIST_HDF5_TEST_FILES
+ ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_src.h5
+ ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_extlinks_trg.h5
+ ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_ref.h5
+ ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copytst.h5
+ )
+
+ SET (LIST_OTHER_TEST_FILES
+ ${HDF5_TOOLS_H5COPY_SOURCE_DIR}/testfiles/h5copy_misc1.out
+ )
+
+ FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+
+ FOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ GET_FILENAME_COMPONENT(fname "${listfiles}" NAME)
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #MESSAGE (STATUS " Copying ${listfiles}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5copy
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${listfiles} ${dest}
+ )
+ ENDFOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ #
+ # Perform h5copy according to passing parmeters
+ #
+ MACRO (ADD_H5_F_TEST testname resultcode infile fparam vparam sparam srcname dparam dstname)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5COPY_F-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ./testfiles/${testname}.out.h5
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_TEST (
+ NAME H5COPY_F-${testname}
+ COMMAND $<TARGET_FILE:h5copy> -f ${fparam} -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ )
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5COPY_F-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ SET_TESTS_PROPERTIES (H5COPY_F-${testname} PROPERTIES DEPENDS H5COPY_F-${testname}-clear-objects)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ # resultcode=2 will cause the test to skip the diff test
+ IF (NOT ${resultcode} STREQUAL "2")
+ ADD_TEST (
+ NAME H5COPY_F-${testname}-DIFF
+ COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ )
+ SET_TESTS_PROPERTIES(H5COPY_F-${testname}-DIFF PROPERTIES DEPENDS H5COPY_F-${testname})
+ IF (${resultcode} STREQUAL "1")
+ SET_TESTS_PROPERTIES (H5COPY_F-${testname}-DIFF PROPERTIES WILL_FAIL "true")
+ ENDIF (${resultcode} STREQUAL "1")
+ ENDIF (NOT ${resultcode} STREQUAL "2")
+ ENDMACRO (ADD_H5_F_TEST)
+
+ MACRO (ADD_H5_TEST testname resultcode infile vparam sparam srcname dparam dstname)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5COPY-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ./testfiles/${testname}.out.h5
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_TEST (
+ NAME H5COPY-${testname}
+ COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ )
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ # resultcode=2 will cause the test to skip the diff test
+ IF (NOT ${resultcode} STREQUAL "2")
+ ADD_TEST (
+ NAME H5COPY-${testname}-DIFF
+ COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ )
+ SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
+ IF (${resultcode} STREQUAL "1")
+ SET_TESTS_PROPERTIES (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
+ ENDIF (${resultcode} STREQUAL "1")
+ ENDIF (NOT ${resultcode} STREQUAL "2")
+ ENDMACRO (ADD_H5_TEST)
+
+ MACRO (ADD_H5_TEST2 testname resultcode infile psparam pdparam vparam sparam srcname dparam dstname)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5COPY-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ./testfiles/${testname}.out.h5
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_TEST (
+ NAME H5COPY-${testname}-prefill
+ COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
+ )
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5COPY-${testname}-prefill PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ SET_TESTS_PROPERTIES (H5COPY-${testname}-prefill PROPERTIES DEPENDS H5COPY-${testname}-clear-objects)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_TEST (
+ NAME H5COPY-${testname}
+ COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ )
+ SET_TESTS_PROPERTIES (H5COPY-${testname} PROPERTIES DEPENDS H5COPY-${testname}-prefill)
+ # resultcode=2 will cause the test to skip the diff test
+ IF (NOT ${resultcode} STREQUAL "2")
+ ADD_TEST (
+ NAME H5COPY-${testname}-DIFF
+ COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${infile} ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ )
+ SET_TESTS_PROPERTIES(H5COPY-${testname}-DIFF PROPERTIES DEPENDS H5COPY-${testname})
+ IF (${resultcode} STREQUAL "1")
+ SET_TESTS_PROPERTIES (H5COPY-${testname}-DIFF PROPERTIES WILL_FAIL "true")
+ ENDIF (${resultcode} STREQUAL "1")
+ ENDIF (NOT ${resultcode} STREQUAL "2")
+ ENDMACRO (ADD_H5_TEST2)
+
+ MACRO (ADD_H5_TEST_SAME testname resultcode pfile psparam pdparam vparam sparam srcname dparam dstname)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5COPY_SAME-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ./testfiles/${testname}.out.h5
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_TEST (
+ NAME H5COPY_SAME-${testname}-prefill
+ COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${pfile} -o ./testfiles/${testname}.out.h5 -v -s ${psparam} -d ${pdparam}
+ )
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-prefill PROPERTIES DEPENDS H5COPY_SAME-${testname}-clear-objects)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_TEST (
+ NAME H5COPY_SAME-${testname}
+ COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${testname}.out.h5 -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN}
+ )
+ SET_TESTS_PROPERTIES (H5COPY_SAME-${testname} PROPERTIES DEPENDS H5COPY_SAME-${testname}-prefill)
+ # resultcode=2 will cause the test to skip the diff test
+ IF (NOT ${resultcode} STREQUAL "2")
+ ADD_TEST (
+ NAME H5COPY_SAME-${testname}-DIFF
+ COMMAND $<TARGET_FILE:h5diff> -q ./testfiles/${testname}.out.h5 ./testfiles/${testname}.out.h5 ${srcname} ${dstname}
+ )
+ SET_TESTS_PROPERTIES(H5COPY_SAME-${testname}-DIFF PROPERTIES DEPENDS H5COPY_SAME-${testname})
+ IF (${resultcode} STREQUAL "1")
+ SET_TESTS_PROPERTIES (H5COPY_SAME-${testname}-DIFF PROPERTIES WILL_FAIL "true")
+ ENDIF (${resultcode} STREQUAL "1")
+ ENDIF (NOT ${resultcode} STREQUAL "2")
+ ENDMACRO (ADD_H5_TEST_SAME)
+
+ #
+ # Similiar to ADD_H5_TEST macro. Compare to outputs from source & target
+ # files instead of checking with h5ls.
+ #
+ MACRO (ADD_H5_CMP_TEST testname resultcode infile vparam sparam srcname dparam dstname)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5COPY-CMP-${testname} COMMAND $<TARGET_FILE:h5copy> -i ./testfiles/${infile} -o ./testfiles/${testname}.out.h5 ${vparam} ${sparam} ${srcname} ${dparam} ${dstname} ${ARGN})
+ IF (${resultcode} STREQUAL "1")
+ SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES WILL_FAIL "true")
+ ENDIF (${resultcode} STREQUAL "1")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5COPY-CMP-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ./testfiles/${testname}.out.h5
+ ./testfiles/${testname}.out.out
+ ./testfiles/${testname}.out.out.err
+ )
+ ADD_TEST (
+ NAME H5COPY-CMP-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5copy>"
+ -D "TEST_ARGS=-i;./testfiles/${infile};-o;./testfiles/${testname}.out.h5;${vparam};${sparam};${srcname};${dparam};${dstname}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=./testfiles/${testname}.out.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=./testfiles/${testname}.out"
+ -D "TEST_MASK=true"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5COPY-CMP-${testname} PROPERTIES DEPENDS H5COPY-CMP-${testname}-clear-objects)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_CMP_TEST)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+
+ # --------------------------------------------------------------------
+ # test file names
+ # --------------------------------------------------------------------
+ SET (HDF_FILE1 h5copytst)
+ SET (HDF_FILE2 h5copy_ref)
+ SET (HDF_EXT_SRC_FILE h5copy_extlinks_src)
+ SET (HDF_EXT_TRG_FILE h5copy_extlinks_trg)
+
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5COPY-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ simple.out.h5
+ chunk.out.h5
+ compact.out.h5
+ compound.out.h5
+ compressed.out.h5
+ named_vl.out.h5
+ nested_vl.out.h5
+ simple_top.out.h5
+ dsrename.out.h5
+ grp_empty.out.h5
+ grp_dsets.out.h5
+ grp_nested.out.h5
+ simple_group.out.h5
+ grp_rename.out.h5
+ grp_dsets_rename.out.h5
+ A_B1_simple.out.h5
+ A_B2_simple2.out.h5
+ C_D_simple.out.h5
+ E_F_grp_dsets.out.h5
+ G_H_grp_nested.out.h5
+ region_ref.out.h5
+ ext_link.out.h5
+ ext_link_f.out.h5
+ ext_dangle_noobj.out.h5
+ ext_dangle_noobj_f.out.h5
+ ext_dangle_nofile.out.h5
+ ext_dangle_nofile_f.out.h5
+ ext_link_group.out.h5
+ ext_link_group_f.out.h5
+ samefile1.out.h5
+ samefile2.out.h5
+ h5copy_misc1.out.h5
+ h5copy_misc1.out.out
+ h5copy_misc1.out.out.err
+ )
+ SET_TESTS_PROPERTIES (H5COPY-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5COPY-clearall-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5COPY-clearall-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ # "Test copying various forms of datasets"
+ ADD_H5_TEST (simple 0 ${HDF_FILE1}.h5 -v -s simple -d simple)
+ ADD_H5_TEST (chunk 0 ${HDF_FILE1}.h5 -v -s chunk -d chunk)
+ ADD_H5_TEST (compact 0 ${HDF_FILE1}.h5 -v -s compact -d compact)
+ ADD_H5_TEST (compound 0 ${HDF_FILE1}.h5 -v -s compound -d compound)
+ ADD_H5_TEST (compressed 0 ${HDF_FILE1}.h5 -v -s compressed -d compressed)
+ ADD_H5_TEST (named_vl 0 ${HDF_FILE1}.h5 -v -s named_vl -d named_vl)
+ ADD_H5_TEST (nested_vl 0 ${HDF_FILE1}.h5 -v -s nested_vl -d nested_vl)
+
+ # "Test copying dataset within group in source file to root of destination"
+ ADD_H5_TEST (simple_top 0 ${HDF_FILE1}.h5 -v -s grp_dsets/simple -d simple_top)
+
+ # "Test copying & renaming dataset"
+ ADD_H5_TEST (dsrename 0 ${HDF_FILE1}.h5 -v -s compound -d rename)
+
+ # "Test copying empty, 'full' & 'nested' groups"
+ ADD_H5_TEST (grp_empty 0 ${HDF_FILE1}.h5 -v -s grp_empty -d grp_empty)
+ ADD_H5_TEST (grp_dsets 0 ${HDF_FILE1}.h5 -v -s grp_dsets -d grp_dsets)
+ ADD_H5_TEST (grp_nested 0 ${HDF_FILE1}.h5 -v -s grp_nested -d grp_nested)
+
+ # "Test copying dataset within group in source file to group in destination"
+ ADD_H5_TEST2 (simple_group 0 ${HDF_FILE1}.h5 grp_dsets grp_dsets -v -s /grp_dsets/simple -d /grp_dsets/simple_group)
+
+ # "Test copying & renaming group"
+ ADD_H5_TEST (grp_rename 0 ${HDF_FILE1}.h5 -v -s grp_dsets -d grp_rename)
+
+ # "Test copying 'full' group hierarchy into group in destination file"
+ ADD_H5_TEST2 (grp_dsets_rename 0 ${HDF_FILE1}.h5 grp_dsets grp_rename -v -s grp_dsets -d /grp_rename/grp_dsets)
+
+ # "Test copying objects into group hier. that doesn't exist yet in destination file"
+ ADD_H5_TEST (A_B1_simple 0 ${HDF_FILE1}.h5 -vp -s simple -d /A/B1/simple)
+ ADD_H5_TEST (A_B2_simple2 0 ${HDF_FILE1}.h5 -vp -s simple -d /A/B2/simple2)
+ ADD_H5_TEST (C_D_simple 0 ${HDF_FILE1}.h5 -vp -s /grp_dsets/simple -d /C/D/simple)
+ ADD_H5_TEST (E_F_grp_dsets 0 ${HDF_FILE1}.h5 -vp -s /grp_dsets -d /E/F/grp_dsets)
+ ADD_H5_TEST (G_H_grp_nested 0 ${HDF_FILE1}.h5 -vp -s /grp_nested -d /G/H/grp_nested)
+
+############# COPY REFERENCES ##############
+
+ # "Test copying object and region references"
+ ADD_H5_F_TEST (region_ref 2 ${HDF_FILE2}.h5 ref -v -s / -d /COPY)
+
+############# COPY EXT LINKS ##############
+
+ # "Test copying external link directly without -f ext"
+ ADD_H5_TEST (ext_link 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_dset -d /copy1_dset)
+
+ # "Test copying external link directly with -f ext"
+ ADD_H5_F_TEST (ext_link_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext/extlink_dset -d /copy2_dset)
+
+ # "Test copying dangling external link (no obj) directly without -f ext"
+ ADD_H5_TEST (ext_dangle_noobj 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_1)
+
+ # "Test copying dangling external link (no obj) directly with -f ext"
+ ADD_H5_F_TEST (ext_dangle_noobj_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext/extlink_notyet1 -d /copy_dangle1_2)
+
+ # "Test copying dangling external link (no file) directly without -f ext"
+ ADD_H5_TEST (ext_dangle_nofile 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_1)
+
+ # "Test copying dangling external link (no file) directly with -f ext"
+ ADD_H5_F_TEST (ext_dangle_nofile_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext/extlink_notyet2 -d /copy_dangle2_2)
+
+ # "Test copying a group contains external links without -f ext"
+ ADD_H5_TEST (ext_link_group 2 ${HDF_EXT_SRC_FILE}.h5 -v -s /group_ext -d /copy1_group)
+
+ # "Test copying a group contains external links with -f ext"
+ ADD_H5_F_TEST (ext_link_group_f 2 ${HDF_EXT_SRC_FILE}.h5 ext -v -s /group_ext -d /copy2_group)
+
+############# Test misc. ##############
+
+ #-----------------------------------------------------------------
+ # "Test copying object into group which doesn't exist, without -p"
+ #
+ ADD_H5_CMP_TEST (h5copy_misc1 1 ${HDF_FILE1}.h5 -v -s /simple -d /g1/g2/simple)
+
+ #-------------------------------------------
+ # "Test copying objects to the same file "
+ #
+ # - dataset
+ ADD_H5_TEST_SAME (samefile1 0 ${HDF_FILE1}.h5 /simple /simple -v -s /simple -d /simple_cp)
+ # - group with some datasets
+ ADD_H5_TEST_SAME (samefile2 0 ${HDF_FILE1}.h5 /grp_dsets /grp_dsets -v -s /grp_dsets -d /grp_dsets_cp)
diff --git a/tools/h5diff/CMakeLists.txt b/tools/h5diff/CMakeLists.txt
index e4e722a..d79c290 100644
--- a/tools/h5diff/CMakeLists.txt
+++ b/tools/h5diff/CMakeLists.txt
@@ -31,12 +31,6 @@ IF (H5_HAVE_PARALLEL)
SET_TARGET_PROPERTIES (ph5diff PROPERTIES FOLDER tools)
ENDIF (H5_HAVE_PARALLEL)
-##############################################################################
-##############################################################################
-### T E S T I N G ###
-##############################################################################
-##############################################################################
-
IF (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5diff and test executables
@@ -50,1382 +44,8 @@ IF (BUILD_TESTING)
#ADD_TEST (NAME h5diffgentest COMMAND $<TARGET_FILE:h5diffgentest>)
ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
-
- # --------------------------------------------------------------------
- # Copy all the HDF5 files from the test directory into the source directory
- # --------------------------------------------------------------------
- SET (LIST_HDF5_TEST_FILES
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_basic1.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_basic2.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_types.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dtypes.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr2.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset1.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset2.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper1.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper2.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_empty.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_links.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_softlinks.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_linked_softlink.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_extlink_src.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_extlink_trg.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_ext2softlink_src.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_ext2softlink_trg.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset_zero_dim_size1.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset_zero_dim_size2.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_danglelinks1.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_danglelinks2.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse1.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse2.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext1.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext2-1.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext2-2.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext2-3.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude1-1.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude1-2.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude2-1.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude2-2.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude3-1.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude3-2.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_comp_vl_strs.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr_v_level1.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr_v_level2.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/compounds_array_vlen1.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/compounds_array_vlen2.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/non_comparables1.h5
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/non_comparables2.h5
- )
-
- SET (LIST_OTHER_TEST_FILES
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_10.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_100.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_101.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_103.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_11.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_12.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_13.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_14.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_15.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_16_1.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_16_2.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_16_3.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_17.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_171.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_172.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_18_1.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_18.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_20.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_200.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_201.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_202.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_203.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_204.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_205.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_206.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_207.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_208.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_220.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_221.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_222.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_223.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_224.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_21.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_22.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_23.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_24.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_25.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_26.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_27.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_28.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_300.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_400.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_401.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_402.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_403.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_404.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_405.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_406.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_407.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_408.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_409.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_410.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_411.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_412.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_413.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_414.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_415.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_416.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_417.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_418.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_419.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_420.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_421.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_422.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_423.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_424.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_425.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_450.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_451.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_452.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_453.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_454.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_455.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_456.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_457.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_458.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_459.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_465.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_466.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_467.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_468.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_469.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_471.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_472.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_473.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_474.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_475.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_480.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_481.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_482.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_483.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_484.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_485.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_486.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_487.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_50.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_51.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_52.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_53.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_54.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_55.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_56.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_57.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_58.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_59.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_500.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_501.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_502.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_503.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_504.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_505.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_506.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_507.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_508.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_509.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_510.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_511.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_512.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_513.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_514.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_515.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_516.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_517.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_518.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_530.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_540.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_600.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_601.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_603.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_604.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_605.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_606.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_607.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_608.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_609.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_610.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_612.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_613.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_614.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_615.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_616.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_617.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_618.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_619.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_621.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_622.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_623.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_624.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_625.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_626.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_627.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_628.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_629.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_630.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_631.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_640.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_641.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_642.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_643.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_644.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_645.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_646.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_70.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_700.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_701.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_702.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_703.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_704.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_705.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_706.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_707.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_708.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_709.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_710.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_80.txt
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_90.txt
- )
-
- # Make testfiles dir under build dir
- FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
-
- #
- # copy test files from source to build dir
- #
- FOREACH (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${h5_tstfiles}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #MESSAGE (STATUS " Copying ${fname}")
- ADD_CUSTOM_COMMAND (
- TARGET h5diff
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${h5_tstfiles} ${dest}
- )
- ENDFOREACH (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
-
-
- #
- # Overwrite system dependent files (Windows)
- #
- IF (WIN32 AND NOT CYGWIN)
- ADD_CUSTOM_COMMAND (
- TARGET h5diff
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_101w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_101.txt
- )
-
- ADD_CUSTOM_COMMAND (
- TARGET h5diff
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_102.txt
- )
- ADD_CUSTOM_COMMAND (
- TARGET h5diff
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_103w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_103.txt
- )
-
- ADD_CUSTOM_COMMAND (
- TARGET h5diff
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_104.txt
- )
- ENDIF (WIN32 AND NOT CYGWIN)
-
-##############################################################################
-##############################################################################
-### T H E T E S T S M A C R O S ###
-##############################################################################
-##############################################################################
-
- MACRO (ADD_H5_TEST resultfile resultcode)
- # If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DIFF-${resultfile} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
- SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DIFF-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err
- )
- ADD_TEST (
- NAME H5DIFF-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5diff>"
- -D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.txt"
- -D "TEST_APPEND=EXIT CODE:"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS "H5DIFF-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (H5_HAVE_PARALLEL)
- ADD_PH5_TEST (${resultfile} ${resultcode} ${ARGN})
- ENDIF (H5_HAVE_PARALLEL)
- ENDMACRO (ADD_H5_TEST file)
-
- MACRO (ADD_PH5_TEST resultfile resultcode)
- # If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME PH5DIFF-${resultfile} COMMAND $<TARGET_FILE:ph5diff> ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} ${ARGN})
- SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME PH5DIFF-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ./testfiles/${resultfile}_p.out ./testfiles/${resultfile}_p.out.err
- )
- ADD_TEST (
- NAME PH5DIFF-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=${MPIEXEC};${MPIEXEC_PREFLAGS};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_POSTFLAGS};$<TARGET_FILE:ph5diff>"
- -D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
- -D "TEST_OUTPUT=P_${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.txt"
-# -D "TEST_APPEND=EXIT CODE: [0-9]"
-# -D "TEST_REF_FILTER=EXIT CODE: 0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF5_RESOURCES_DIR}/prunTest.cmake"
- )
- SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS "PH5DIFF-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_PH5_TEST file)
-
- # ADD_H5_NO_OUTPUT_TEST
- # Purpose to verify only exitcode without output comparison
- # Don't use this if possible; this may be removed.
- MACRO (ADD_H5_NO_OUTPUT_TEST testname resultcode)
- # If using memchecker add tests without using scripts
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DIFF-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ./testfiles/${testname}.out ./testfiles/${testname}.out.err
- )
- # if there was a previous test
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DIFF-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
-
- ADD_TEST (NAME H5DIFF-${testname} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
-
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS H5DIFF-${testname}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_NO_OUTPUT_TEST)
-
-##############################################################################
-##############################################################################
-### T H E T E S T S ###
-##############################################################################
-##############################################################################
-
- # --------------------------------------------------------------------
- # test file names
- # --------------------------------------------------------------------
- SET (FILE1 h5diff_basic1.h5)
- SET (FILE2 h5diff_basic2.h5)
- SET (FILE3 h5diff_types.h5)
- SET (FILE4 h5diff_dtypes.h5)
- SET (FILE5 h5diff_attr1.h5)
- SET (FILE6 h5diff_attr2.h5)
- SET (FILE7 h5diff_dset1.h5)
- SET (FILE8 h5diff_dset2.h5)
- SET (FILE9 h5diff_hyper1.h5)
- SET (FILE10 h5diff_hyper2.h5)
- SET (FILE11 h5diff_empty.h5)
- SET (FILE12 h5diff_links.h5)
- SET (FILE13 h5diff_softlinks.h5)
- SET (FILE14 h5diff_linked_softlink.h5)
- SET (FILE15 h5diff_extlink_src.h5)
- SET (FILE16 h5diff_extlink_trg.h5)
- SET (FILE17 h5diff_ext2softlink_src.h5)
- SET (FILE18 h5diff_ext2softlink_trg.h5)
- SET (FILE19 h5diff_dset_zero_dim_size1.h5)
- SET (FILE20 h5diff_dset_zero_dim_size2.h5)
- SET (DANGLE_LINK_FILE1 h5diff_danglelinks1.h5)
- SET (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5)
- SET (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5)
- SET (GRP_RECURSE_FILE2 h5diff_grp_recurse2.h5)
- # group recursive - same structure via external links through files
- SET (GRP_RECURSE1_EXT h5diff_grp_recurse_ext1.h5)
- SET (GRP_RECURSE2_EXT1 h5diff_grp_recurse_ext2-1.h5)
- SET (GRP_RECURSE2_EXT2 h5diff_grp_recurse_ext2-2.h5)
- SET (GRP_RECURSE2_EXT3 h5diff_grp_recurse_ext2-3.h5)
- # same structure, same obj name with different value
- SET (EXCLUDE_FILE1_1 h5diff_exclude1-1.h5)
- SET (EXCLUDE_FILE1_2 h5diff_exclude1-2.h5)
- # different structure and obj names
- SET (EXCLUDE_FILE2_1 h5diff_exclude2-1.h5)
- SET (EXCLUDE_FILE2_2 h5diff_exclude2-2.h5)
- # Only one file contains unique objs. Common objs are same.
- SET (EXCLUDE_FILE3_1 h5diff_exclude3-1.h5)
- SET (EXCLUDE_FILE3_2 h5diff_exclude3-2.h5)
- # compound type with multiple vlen string types
- SET (COMP_VL_STRS_FILE h5diff_comp_vl_strs.h5)
- # container types (array,vlen) with multiple nested compound types
- SET (COMPS_ARRAY_VLEN_FILE1 compounds_array_vlen1.h5)
- SET (COMPS_ARRAY_VLEN_FILE2 compounds_array_vlen2.h5)
- # attrs with verbose option level
- SET (ATTR_VERBOSE_LEVEL_FILE1 h5diff_attr_v_level1.h5)
- SET (ATTR_VERBOSE_LEVEL_FILE2 h5diff_attr_v_level2.h5)
-
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5DIFF-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- h5diff_10.out
- h5diff_10.out.err
- h5diff_100.out
- h5diff_100.out.err
- h5diff_101.out
- h5diff_101.out.err
- h5diff_102.out
- h5diff_102.out.err
- h5diff_103.out
- h5diff_103.out.err
- h5diff_104.out
- h5diff_104.out.err
- h5diff_11.out
- h5diff_11.out.err
- h5diff_12.out
- h5diff_12.out.err
- h5diff_13.out
- h5diff_13.out.err
- h5diff_14.out
- h5diff_14.out.err
- h5diff_15.out
- h5diff_15.out.err
- h5diff_16_1.out
- h5diff_16_1.out.err
- h5diff_16_2.out
- h5diff_16_2.out.err
- h5diff_16_3.out
- h5diff_16_3.out.err
- h5diff_17.out
- h5diff_17.out.err
- h5diff_171.out
- h5diff_171.out.err
- h5diff_172.out
- h5diff_172.out.err
- h5diff_18_1.out
- h5diff_18_1.out.err
- h5diff_18.out
- h5diff_18.out.err
- h5diff_20.out
- h5diff_20.out.err
- h5diff_200.out
- h5diff_200.out.err
- h5diff_201.out
- h5diff_201.out.err
- h5diff_202.out
- h5diff_202.out.err
- h5diff_203.out
- h5diff_203.out.err
- h5diff_204.out
- h5diff_204.out.err
- h5diff_205.out
- h5diff_205.out.err
- h5diff_206.out
- h5diff_206.out.err
- h5diff_207.out
- h5diff_207.out.err
- h5diff_208.out
- h5diff_208.out.err
- h5diff_220.out
- h5diff_220.out.err
- h5diff_221.out
- h5diff_221.out.err
- h5diff_222.out
- h5diff_222.out.err
- h5diff_223.out
- h5diff_223.out.err
- h5diff_224.out
- h5diff_224.out.err
- h5diff_21.out
- h5diff_21.out.err
- h5diff_22.out
- h5diff_22.out.err
- h5diff_23.out
- h5diff_23.out.err
- h5diff_24.out
- h5diff_24.out.err
- h5diff_25.out
- h5diff_25.out.err
- h5diff_26.out
- h5diff_26.out.err
- h5diff_27.out
- h5diff_27.out.err
- h5diff_28.out
- h5diff_28.out.err
- h5diff_300.out
- h5diff_300.out.err
- h5diff_400.out
- h5diff_400.out.err
- h5diff_401.out
- h5diff_401.out.err
- h5diff_402.out
- h5diff_402.out.err
- h5diff_403.out
- h5diff_403.out.err
- h5diff_404.out
- h5diff_404.out.err
- h5diff_405.out
- h5diff_405.out.err
- h5diff_406.out
- h5diff_406.out.err
- h5diff_407.out
- h5diff_407.out.err
- h5diff_408.out
- h5diff_408.out.err
- h5diff_409.out
- h5diff_409.out.err
- h5diff_410.out
- h5diff_410.out.err
- h5diff_411.out
- h5diff_411.out.err
- h5diff_412.out
- h5diff_412.out.err
- h5diff_413.out
- h5diff_413.out.err
- h5diff_414.out
- h5diff_414.out.err
- h5diff_415.out
- h5diff_415.out.err
- h5diff_416.out
- h5diff_416.out.err
- h5diff_417.out
- h5diff_417.out.err
- h5diff_418.out
- h5diff_418.out.err
- h5diff_419.out
- h5diff_419.out.err
- h5diff_420.out
- h5diff_420.out.err
- h5diff_421.out
- h5diff_421.out.err
- h5diff_422.out
- h5diff_422.out.err
- h5diff_423.out
- h5diff_423.out.err
- h5diff_424.out
- h5diff_424.out.err
- h5diff_425.out
- h5diff_425.out.err
- h5diff_450.out
- h5diff_450.out.err
- h5diff_451.out
- h5diff_451.out.err
- h5diff_452.out
- h5diff_452.out.err
- h5diff_453.out
- h5diff_453.out.err
- h5diff_454.out
- h5diff_454.out.err
- h5diff_455.out
- h5diff_455.out.err
- h5diff_456.out
- h5diff_456.out.err
- h5diff_457.out
- h5diff_457.out.err
- h5diff_458.out
- h5diff_458.out.err
- h5diff_459.out
- h5diff_459.out.err
- h5diff_465.out
- h5diff_465.out.err
- h5diff_466.out
- h5diff_466.out.err
- h5diff_467.out
- h5diff_467.out.err
- h5diff_468.out
- h5diff_468.out.err
- h5diff_469.out
- h5diff_469.out.err
- h5diff_471.out
- h5diff_471.out.err
- h5diff_472.out
- h5diff_472.out.err
- h5diff_473.out
- h5diff_473.out.err
- h5diff_474.out
- h5diff_474.out.err
- h5diff_475.out
- h5diff_475.out.err
- h5diff_480.out
- h5diff_480.out.err
- h5diff_481.out
- h5diff_481.out.err
- h5diff_482.out
- h5diff_482.out.err
- h5diff_483.out
- h5diff_483.out.err
- h5diff_484.out
- h5diff_484.out.err
- h5diff_50.out
- h5diff_50.out.err
- h5diff_51.out
- h5diff_51.out.err
- h5diff_52.out
- h5diff_52.out.err
- h5diff_53.out
- h5diff_53.out.err
- h5diff_54.out
- h5diff_54.out.err
- h5diff_55.out
- h5diff_55.out.err
- h5diff_56.out
- h5diff_56.out.err
- h5diff_57.out
- h5diff_57.out.err
- h5diff_58.out
- h5diff_58.out.err
- h5diff_59.out
- h5diff_59.out.err
- h5diff_500.out
- h5diff_500.out.err
- h5diff_501.out
- h5diff_501.out.err
- h5diff_502.out
- h5diff_502.out.err
- h5diff_503.out
- h5diff_503.out.err
- h5diff_504.out
- h5diff_504.out.err
- h5diff_505.out
- h5diff_505.out.err
- h5diff_506.out
- h5diff_506.out.err
- h5diff_507.out
- h5diff_507.out.err
- h5diff_508.out
- h5diff_508.out.err
- h5diff_509.out
- h5diff_509.out.err
- h5diff_510.out
- h5diff_510.out.err
- h5diff_511.out
- h5diff_511.out.err
- h5diff_512.out
- h5diff_512.out.err
- h5diff_513.out
- h5diff_513.out.err
- h5diff_514.out
- h5diff_514.out.err
- h5diff_515.out
- h5diff_515.out.err
- h5diff_516.out
- h5diff_516.out.err
- h5diff_517.out
- h5diff_517.out.err
- h5diff_518.out
- h5diff_518.out.err
- h5diff_530.out
- h5diff_530.out.err
- h5diff_540.out
- h5diff_540.out.err
- h5diff_600.out
- h5diff_600.out.err
- h5diff_601.out
- h5diff_601.out.err
- h5diff_603.out
- h5diff_603.out.err
- h5diff_604.out
- h5diff_604.out.err
- h5diff_605.out
- h5diff_605.out.err
- h5diff_606.out
- h5diff_606.out.err
- h5diff_607.out
- h5diff_607.out.err
- h5diff_608.out
- h5diff_608.out.err
- h5diff_609.out
- h5diff_609.out.err
- h5diff_610.out
- h5diff_610.out.err
- h5diff_612.out
- h5diff_612.out.err
- h5diff_613.out
- h5diff_613.out.err
- h5diff_614.out
- h5diff_614.out.err
- h5diff_615.out
- h5diff_615.out.err
- h5diff_616.out
- h5diff_616.out.err
- h5diff_617.out
- h5diff_617.out.err
- h5diff_618.out
- h5diff_618.out.err
- h5diff_619.out
- h5diff_619.out.err
- h5diff_621.out
- h5diff_621.out.err
- h5diff_622.out
- h5diff_622.out.err
- h5diff_623.out
- h5diff_623.out.err
- h5diff_624.out
- h5diff_624.out.err
- h5diff_625.out
- h5diff_625.out.err
- h5diff_626.out
- h5diff_626.out.err
- h5diff_627.out
- h5diff_627.out.err
- h5diff_628.out
- h5diff_628.out.err
- h5diff_629.out
- h5diff_629.out.err
- h5diff_640.out
- h5diff_640.out.err
- h5diff_641.out
- h5diff_641.out.err
- h5diff_642.out
- h5diff_642.out.err
- h5diff_643.out
- h5diff_643.out.err
- h5diff_644.out
- h5diff_644.out.err
- h5diff_645.out
- h5diff_645.out.err
- h5diff_646.out
- h5diff_646.out.err
- h5diff_70.out
- h5diff_70.out.err
- h5diff_700.out
- h5diff_700.out.err
- h5diff_701.out
- h5diff_701.out.err
- h5diff_702.out
- h5diff_702.out.err
- h5diff_703.out
- h5diff_703.out.err
- h5diff_704.out
- h5diff_704.out.err
- h5diff_705.out
- h5diff_705.out.err
- h5diff_706.out
- h5diff_706.out.err
- h5diff_707.out
- h5diff_707.out.err
- h5diff_708.out
- h5diff_708.out.err
- h5diff_709.out
- h5diff_709.out.err
- h5diff_710.out
- h5diff_710.out.err
- h5diff_80.out
- h5diff_80.out.err
- h5diff_90.out
- h5diff_90.out.err
- )
- SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DIFF-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
-# ############################################################################
-# # Common usage
-# ############################################################################
-
-# 1.0
-ADD_H5_TEST (h5diff_10 0 -h)
-
-# 1.1 normal mode
-ADD_H5_TEST (h5diff_11 1 ${FILE1} ${FILE2})
-
-# 1.2 normal mode with objects
-ADD_H5_TEST (h5diff_12 1 ${FILE1} ${FILE2} g1/dset1 g1/dset2)
-
-# 1.3 report mode
-ADD_H5_TEST (h5diff_13 1 -r ${FILE1} ${FILE2})
-
-# 1.4 report mode with objects
-ADD_H5_TEST (h5diff_14 1 -r ${FILE1} ${FILE2} g1/dset1 g1/dset2)
-
-# 1.5 with -d
-ADD_H5_TEST (h5diff_15 1 --report --delta=5 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 1.6.1 with -p (int)
-ADD_H5_TEST (h5diff_16_1 1 -v -p 0.02 ${FILE1} ${FILE1} g1/dset5 g1/dset6)
-
-# 1.6.2 with -p (unsigned long_long)
-ADD_H5_TEST (h5diff_16_2 1 --verbose --relative=0.02 ${FILE1} ${FILE1} g1/dset7 g1/dset8)
-
-# 1.6.3 with -p (double)
-ADD_H5_TEST (h5diff_16_3 1 -v -p 0.02 ${FILE1} ${FILE1} g1/dset9 g1/dset10)
-
-# 1.7 verbose mode
-ADD_H5_TEST (h5diff_17 1 -v ${FILE1} ${FILE2})
-
-# 1.7 test 32-bit INFINITY
-ADD_H5_TEST (h5diff_171 0 -v ${FILE1} ${FILE1} /g1/fp19 /g1/fp19_COPY)
-
-# 1.7 test 64-bit INFINITY
-ADD_H5_TEST (h5diff_172 0 -v ${FILE1} ${FILE1} /g1/fp20 /g1/fp20_COPY)
-
-# 1.8 quiet mode
-ADD_H5_TEST (h5diff_18 1 -q ${FILE1} ${FILE2})
-
-# 1.8 -v and -q
-ADD_H5_TEST (h5diff_18_1 2 -v -q ${FILE1} ${FILE2})
-
-# ##############################################################################
-# # not comparable types
-# ##############################################################################
-
-# 2.0
-ADD_H5_TEST (h5diff_20 0 -v ${FILE3} ${FILE3} dset g1)
-
-# 2.1
-ADD_H5_TEST (h5diff_21 0 -v ${FILE3} ${FILE3} dset l1)
-
-# 2.2
-ADD_H5_TEST (h5diff_22 0 -v ${FILE3} ${FILE3} dset t1)
-
-# ##############################################################################
-# # compare groups, types, links (no differences and differences)
-# ##############################################################################
-
-# 2.3
-ADD_H5_TEST (h5diff_23 0 -v ${FILE3} ${FILE3} g1 g1)
-
-# 2.4
-ADD_H5_TEST (h5diff_24 0 -v ${FILE3} ${FILE3} t1 t1)
-
-# 2.5
-ADD_H5_TEST (h5diff_25 0 -v ${FILE3} ${FILE3} l1 l1)
-
-# 2.6
-ADD_H5_TEST (h5diff_26 0 -v ${FILE3} ${FILE3} g1 g2)
-
-# 2.7
-ADD_H5_TEST (h5diff_27 1 -v ${FILE3} ${FILE3} t1 t2)
-
-# 2.8
-ADD_H5_TEST (h5diff_28 1 -v ${FILE3} ${FILE3} l1 l2)
-
-# ##############################################################################
-# # Dataset datatypes
-# ##############################################################################
-
-# 5.0
-ADD_H5_TEST (h5diff_50 1 -v ${FILE4} ${FILE4} dset0a dset0b)
-
-# 5.1
-ADD_H5_TEST (h5diff_51 1 -v ${FILE4} ${FILE4} dset1a dset1b)
-
-# 5.2
-ADD_H5_TEST (h5diff_52 1 -v ${FILE4} ${FILE4} dset2a dset2b)
-
-# 5.3
-ADD_H5_TEST (h5diff_53 1 -v ${FILE4} ${FILE4} dset3a dset4b)
-
-# 5.4
-ADD_H5_TEST (h5diff_54 1 -v ${FILE4} ${FILE4} dset4a dset4b)
-
-# 5.5
-ADD_H5_TEST (h5diff_55 1 -v ${FILE4} ${FILE4} dset5a dset5b)
-
-# 5.6
-ADD_H5_TEST (h5diff_56 1 -v ${FILE4} ${FILE4} dset6a dset6b)
-
-# 5.7
-ADD_H5_TEST (h5diff_57 0 -v ${FILE4} ${FILE4} dset7a dset7b)
-
-# 5.8 (region reference)
-ADD_H5_TEST (h5diff_58 1 -v ${FILE7} ${FILE8} refreg)
-
-# test for both dset and attr with same type but with different size
-# ( HDDFV-7942 )
-ADD_H5_TEST (h5diff_59 0 -v ${FILE4} ${FILE4} dset11a dset11b)
-
-# ##############################################################################
-# # Error messages
-# ##############################################################################
-
-# 6.0: Check if the command line number of arguments is less than 3
-ADD_H5_TEST (h5diff_600 1 ${FILE1})
-
-# 6.1: Check if non-exist object name is specified
-ADD_H5_TEST (h5diff_601 2 ${FILE1} ${FILE1} nono_obj)
-
-# ##############################################################################
-# # -d
-# ##############################################################################
-
-# 6.3: negative value
-ADD_H5_TEST (h5diff_603 1 -d -4 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.4: zero
-ADD_H5_TEST (h5diff_604 1 -d 0 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.5: non number
-ADD_H5_TEST (h5diff_605 1 -d u ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.6: hexadecimal
-ADD_H5_TEST (h5diff_606 1 -d 0x1 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.7: string
-ADD_H5_TEST (h5diff_607 1 -d "1" ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.8: use system epsilon
-ADD_H5_TEST (h5diff_608 1 --use-system-epsilon ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.9: number larger than biggest difference
-ADD_H5_TEST (h5diff_609 0 -d 200 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.10: number smaller than smallest difference
-ADD_H5_TEST (h5diff_610 1 -d 1 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# ##############################################################################
-# # -p
-# ##############################################################################
-
-# 6.12: negative value
-ADD_H5_TEST (h5diff_612 1 -p -4 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.13: zero
-ADD_H5_TEST (h5diff_613 1 -p 0 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.14: non number
-ADD_H5_TEST (h5diff_614 1 -p u ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.15: hexadecimal
-ADD_H5_TEST (h5diff_615 1 -p 0x1 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.16: string
-ADD_H5_TEST (h5diff_616 1 -p "0.21" ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.17: repeated option
-ADD_H5_TEST (h5diff_617 1 -p 0.21 -p 0.22 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.18: number larger than biggest difference
-ADD_H5_TEST (h5diff_618 0 -p 2 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.19: number smaller than smallest difference
-ADD_H5_TEST (h5diff_619 1 -p 0.005 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# ##############################################################################
-# # -n
-# ##############################################################################
-
-# 6.21: negative value
-ADD_H5_TEST (h5diff_621 1 -n -4 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.22: zero
-ADD_H5_TEST (h5diff_622 1 -n 0 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.23: non number
-ADD_H5_TEST (h5diff_623 1 -n u ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.24: hexadecimal
-ADD_H5_TEST (h5diff_624 1 -n 0x1 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.25: string
-ADD_H5_TEST (h5diff_625 1 -n "2" ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.26: repeated option
-ADD_H5_TEST (h5diff_626 1 -n 2 -n 3 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.27: number larger than biggest difference
-ADD_H5_TEST (h5diff_627 1 --count=200 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# 6.28: number smaller than smallest difference
-ADD_H5_TEST (h5diff_628 1 -n 1 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
-
-# Disabling this test as it hangs - LRK 20090618
-# 6.29 non valid files
-#ADD_H5_TEST (h5diff_629 2 file1.h6 file2.h6)
-
-# ##############################################################################
-# # NaN
-# ##############################################################################
-# 6.30: test (NaN == NaN) must be true based on our documentation -- XCAO
-ADD_H5_TEST (h5diff_630 0 -v -d "0.0001" ${FILE1} ${FILE1} g1/fp18 g1/fp18_COPY)
-ADD_H5_TEST (h5diff_631 0 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp18 g1/fp18_COPY)
-
-# ##############################################################################
-# 7. attributes
-# ##############################################################################
-ADD_H5_TEST (h5diff_70 1 -v ${FILE5} ${FILE6})
-
-# ##################################################
-# attrs with verbose option level
-# ##################################################
-ADD_H5_TEST (h5diff_700 1 -v1 ${FILE5} ${FILE6})
-ADD_H5_TEST (h5diff_701 1 -v2 ${FILE5} ${FILE6})
-ADD_H5_TEST (h5diff_702 1 --verbose=1 ${FILE5} ${FILE6})
-ADD_H5_TEST (h5diff_703 1 --verbose=2 ${FILE5} ${FILE6})
-
-# same attr number , all same attr name
-ADD_H5_TEST (h5diff_704 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g)
-
-# same attr number , some same attr name
-ADD_H5_TEST (h5diff_705 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /dset)
-
-# same attr number , all different attr name
-ADD_H5_TEST (h5diff_706 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /ntype)
-
-# different attr number , same attr name (intersected)
-ADD_H5_TEST (h5diff_707 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g2)
-
-# different attr number , all different attr name
-ADD_H5_TEST (h5diff_708 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g3)
-
-# when no attributes exist in both objects
-ADD_H5_TEST (h5diff_709 0 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g4)
-
-# file vs file
-ADD_H5_TEST (h5diff_710 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2})
-
-# ##############################################################################
-# 8. all dataset datatypes
-# ##############################################################################
-ADD_H5_TEST (h5diff_80 1 -v ${FILE7} ${FILE8})
-
-# 9. compare a file with itself
-ADD_H5_TEST (h5diff_90 0 -v ${FILE2} ${FILE2})
-
-# 10. read by hyperslab, print indexes
-#if test -n "$pmode" -a "$mydomainname" = hdfgroup.uiuc.edu; then
-# # skip this test which sometimes hangs in some THG machines
-# MESSAGE (STATUS "SKIP -v ${FILE9} ${FILE10})
-#else
-# ADD_H5_TEST (h5diff_100 1 -v ${FILE9} ${FILE10})
-#fi
-
-# 11. floating point comparison
-ADD_H5_TEST (h5diff_101 1 -v ${FILE1} ${FILE1} g1/d1 g1/d2)
-
-ADD_H5_TEST (h5diff_102 1 -v ${FILE1} ${FILE1} g1/fp1 g1/fp2)
-
-# with --use-system-epsilon for double value. expect less differences
-ADD_H5_TEST (h5diff_103 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/d1
-g1/d2)
-
-# with --use-system-epsilon for float value. expect less differences
-ADD_H5_TEST (h5diff_104 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp1
-g1/fp2)
-
-# not comparable -c flag
-ADD_H5_TEST (h5diff_200 0 ${FILE2} ${FILE2} g2/dset1 g2/dset2)
-
-ADD_H5_TEST (h5diff_201 0 -c ${FILE2} ${FILE2} g2/dset1 g2/dset2)
-
-ADD_H5_TEST (h5diff_202 0 -c ${FILE2} ${FILE2} g2/dset2 g2/dset3)
-
-ADD_H5_TEST (h5diff_203 0 -c ${FILE2} ${FILE2} g2/dset3 g2/dset4)
-
-ADD_H5_TEST (h5diff_204 0 -c ${FILE2} ${FILE2} g2/dset4 g2/dset5)
-
-ADD_H5_TEST (h5diff_205 0 -c ${FILE2} ${FILE2} g2/dset5 g2/dset6)
-
-# not comparable in compound
-ADD_H5_TEST (h5diff_206 0 -c ${FILE2} ${FILE2} g2/dset7 g2/dset8)
-
-ADD_H5_TEST (h5diff_207 0 -c ${FILE2} ${FILE2} g2/dset8 g2/dset9)
-
-# not comparable in dataspace of zero dimension size
-ADD_H5_TEST (h5diff_208 0 -c ${FILE19} ${FILE20})
-
-# non-comparable dataset with comparable attribute, and other comparable datasets.
-# All the rest comparables should display differences.
-ADD_H5_TEST (h5diff_220 1 -c non_comparables1.h5 non_comparables2.h5 /g1)
-
-# comparable dataset with non-comparable attribute and other comparable attributes.
-# Also test non-compatible attributes with different type, dimention, rank.
-# All the rest comparables should display differences.
-ADD_H5_TEST (h5diff_221 1 -c non_comparables1.h5 non_comparables2.h5 /g2)
-
-# entire file
-# All the rest comparables should display differences
-ADD_H5_TEST (h5diff_222 1 -c non_comparables1.h5 non_comparables2.h5)
-
-# non-comparable test for common objects (same name) with different object types
-# (HDFFV-7644)
-ADD_H5_TEST (h5diff_223 0 -c non_comparables1.h5 non_comparables2.h5 /diffobjtypes)
-# swap files
-ADD_H5_TEST (h5diff_224 0 -c non_comparables2.h5 non_comparables1.h5 /diffobjtypes)
-
-# ##############################################################################
-# # Links compare without --follow-symlinks nor --no-dangling-links
-# ##############################################################################
-# test for bug1749
-ADD_H5_TEST (h5diff_300 1 -v ${FILE12} ${FILE12} /link_g1 /link_g2)
-
-# ##############################################################################
-# # Links compare with --follow-symlinks Only
-# ##############################################################################
-# soft links file to file
-ADD_H5_TEST (h5diff_400 0 --follow-symlinks -v ${FILE13} ${FILE13})
-
-# softlink vs dset"
-ADD_H5_TEST (h5diff_401 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_dset1_1 /target_dset2)
-
-# dset vs softlink"
-ADD_H5_TEST (h5diff_402 1 --follow-symlinks -v ${FILE13} ${FILE13} /target_dset2 /softlink_dset1_1)
-
-# softlink vs softlink"
-ADD_H5_TEST (h5diff_403 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_dset1_1 /softlink_dset2)
-
-# extlink vs extlink (FILE)"
-ADD_H5_TEST (h5diff_404 0 --follow-symlinks -v ${FILE15} ${FILE15})
-
-# extlink vs dset"
-ADD_H5_TEST (h5diff_405 1 --follow-symlinks -v ${FILE15} ${FILE16} /ext_link_dset1 /target_group2/x_dset)
-
-# dset vs extlink"
-ADD_H5_TEST (h5diff_406 1 --follow-symlinks -v ${FILE16} ${FILE15} /target_group2/x_dset /ext_link_dset1)
-
-# extlink vs extlink"
-ADD_H5_TEST (h5diff_407 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_dset2)
-
-# softlink vs extlink"
-ADD_H5_TEST (h5diff_408 1 --follow-symlinks -v ${FILE13} ${FILE15} /softlink_dset1_1 /ext_link_dset2)
-
-# extlink vs softlink "
-ADD_H5_TEST (h5diff_409 1 --follow-symlinks -v ${FILE15} ${FILE13} /ext_link_dset2 /softlink_dset1_1)
-
-# linked_softlink vs linked_softlink (FILE)"
-ADD_H5_TEST (h5diff_410 0 --follow-symlinks -v ${FILE14} ${FILE14})
-
-# dset2 vs linked_softlink_dset1"
-ADD_H5_TEST (h5diff_411 1 --follow-symlinks -v ${FILE14} ${FILE14} /target_dset2 /softlink1_to_slink2)
-
-# linked_softlink_dset1 vs dset2"
-ADD_H5_TEST (h5diff_412 1 --follow-symlinks -v ${FILE14} ${FILE14} /softlink1_to_slink2 /target_dset2)
-
-# linked_softlink_to_dset1 vs linked_softlink_to_dset2"
-ADD_H5_TEST (h5diff_413 1 --follow-symlinks -v ${FILE14} ${FILE14} /softlink1_to_slink2 /softlink2_to_slink2)
-
-# group vs linked_softlink_group1"
-ADD_H5_TEST (h5diff_414 1 --follow-symlinks -v ${FILE14} ${FILE14} /target_group /softlink3_to_slink2)
-
-# linked_softlink_group1 vs group"
-ADD_H5_TEST (h5diff_415 1 --follow-symlinks -v ${FILE14} ${FILE14} /softlink3_to_slink2 /target_group)
-
-# linked_softlink_to_group1 vs linked_softlink_to_group2"
-ADD_H5_TEST (h5diff_416 0 --follow-symlinks -v ${FILE14} ${FILE14} /softlink3_to_slink2 /softlink4_to_slink2)
-
-# non-exist-softlink vs softlink"
-ADD_H5_TEST (h5diff_417 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_noexist /softlink_dset2)
-
-# softlink vs non-exist-softlink"
-ADD_H5_TEST (h5diff_418 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_dset2 /softlink_noexist)
-
-# non-exist-extlink_file vs extlink"
-ADD_H5_TEST (h5diff_419 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_noexist2 /ext_link_dset2)
-
-# exlink vs non-exist-extlink_file"
-ADD_H5_TEST (h5diff_420 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_dset2 /ext_link_noexist2)
-
-# extlink vs non-exist-extlink_obj"
-ADD_H5_TEST (h5diff_421 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_dset2 /ext_link_noexist1)
-
-# non-exist-extlink_obj vs extlink"
-ADD_H5_TEST (h5diff_422 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_noexist1 /ext_link_dset2)
-
-# extlink_to_softlink_to_dset1 vs dset2"
-ADD_H5_TEST (h5diff_423 1 --follow-symlinks -v ${FILE17} ${FILE18} /ext_link_to_slink1 /dset2)
-
-# dset2 vs extlink_to_softlink_to_dset1"
-ADD_H5_TEST (h5diff_424 1 --follow-symlinks -v ${FILE18} ${FILE17} /dset2 /ext_link_to_slink1)
-
-# extlink_to_softlink_to_dset1 vs extlink_to_softlink_to_dset2"
-ADD_H5_TEST (h5diff_425 1 --follow-symlinks -v ${FILE17} ${FILE17} /ext_link_to_slink1 /ext_link_to_slink2)
-
-# ##############################################################################
-# # Dangling links compare (--follow-symlinks and --no-dangling-links)
-# ##############################################################################
-# dangling links --follow-symlinks (FILE to FILE)
-ADD_H5_TEST (h5diff_450 1 --follow-symlinks -v ${DANGLE_LINK_FILE1} ${DANGLE_LINK_FILE2})
-
-# dangling links --follow-symlinks and --no-dangling-links (FILE to FILE)
-ADD_H5_TEST (h5diff_451 2 --follow-symlinks -v --no-dangling-links ${DANGLE_LINK_FILE1} ${DANGLE_LINK_FILE2})
-
-# try --no-dangling-links without --follow-symlinks options
-ADD_H5_TEST (h5diff_452 2 --no-dangling-links ${FILE13} ${FILE13})
-
-# dangling link found for soft links (FILE to FILE)
-ADD_H5_TEST (h5diff_453 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13})
-
-# dangling link found for soft links (obj to obj)
-ADD_H5_TEST (h5diff_454 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_dset2 /softlink_noexist)
-
-# dangling link found for soft links (obj to obj) Both dangle links
-ADD_H5_TEST (h5diff_455 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_noexist /softlink_noexist)
-
-# dangling link found for ext links (FILE to FILE)
-ADD_H5_TEST (h5diff_456 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15})
-
-# dangling link found for ext links (obj to obj). target file exist
-ADD_H5_TEST (h5diff_457 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist1)
-
-# dangling link found for ext links (obj to obj). target file NOT exist
-ADD_H5_TEST (h5diff_458 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist2)
-
-# dangling link found for ext links (obj to obj). Both dangle links
-ADD_H5_TEST (h5diff_459 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_noexist1 /ext_link_noexist2)
-
-# dangling link --follow-symlinks (obj vs obj)
-# (HDFFV-7836)
-ADD_H5_TEST (h5diff_465 0 --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1)
-# (HDFFV-7835)
-# soft dangling vs. soft dangling
-ADD_H5_TEST (h5diff_466 0 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1)
-# soft link vs. soft dangling
-ADD_H5_TEST (h5diff_467 1 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link2)
-# ext dangling vs. ext dangling
-ADD_H5_TEST (h5diff_468 0 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link4)
-# ext link vs. ext dangling
-ADD_H5_TEST (h5diff_469 1 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link2)
-
-#---------------------------------------------------
-# dangling links without follow symlink
-# (HDFFV-7998)
-# test - soft dangle links (same and different paths),
-# - external dangle links (same and different paths)
-ADD_H5_TEST (h5diff_471 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5)
-ADD_H5_TEST (h5diff_472 0 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1)
-ADD_H5_TEST (h5diff_473 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link4)
-ADD_H5_TEST (h5diff_474 0 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link4)
-ADD_H5_TEST (h5diff_475 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link1)
-
-
-# ##############################################################################
-# # test for group diff recursivly
-# ##############################################################################
-# root
-ADD_H5_TEST (h5diff_500 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /)
-ADD_H5_TEST (h5diff_501 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /)
-
-# root vs group
-ADD_H5_TEST (h5diff_502 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /grp1/grp2/grp3)
-
-# group vs group (same name and structure)
-ADD_H5_TEST (h5diff_503 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /grp1)
-
-# group vs group (different name and structure)
-ADD_H5_TEST (h5diff_504 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1/grp2 /grp1/grp2/grp3)
-
-# groups vs soft-link
-ADD_H5_TEST (h5diff_505 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /slink_grp1)
-ADD_H5_TEST (h5diff_506 0 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1/grp2 /slink_grp2)
-
-# groups vs ext-link
-ADD_H5_TEST (h5diff_507 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /elink_grp1)
-ADD_H5_TEST (h5diff_508 0 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /elink_grp1)
-
-# soft-link vs ext-link
-ADD_H5_TEST (h5diff_509 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp1 /elink_grp1)
-ADD_H5_TEST (h5diff_510 0 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp1 /elink_grp1)
-
-# circled ext links
-ADD_H5_TEST (h5diff_511 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp10 /grp11)
-ADD_H5_TEST (h5diff_512 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp10 /grp11)
-
-# circled soft2ext-link vs soft2ext-link
-ADD_H5_TEST (h5diff_513 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11)
-ADD_H5_TEST (h5diff_514 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11)
-
-###############################################################################
-# Test for group recursive diff via multi-linked external links
-# With follow-symlinks, file $GRP_RECURSE1_EXT and $GRP_RECURSE2_EXT1 should
-# be same with the external links.
-###############################################################################
-# file vs file
-ADD_H5_TEST (h5diff_515 1 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1})
-ADD_H5_TEST (h5diff_516 0 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1})
-# group vs group
-ADD_H5_TEST (h5diff_517 1 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1)
-ADD_H5_TEST (h5diff_518 0 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1)
-
-# ##############################################################################
-# # Exclude path (--exclude-path)
-# ##############################################################################
-#
-# Same structure, same names and different value.
-#
-# Exclude the object with different value. Expect return - same
-ADD_H5_TEST (h5diff_480 0 -v --exclude-path /group1/dset3 ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2})
-# Verify different by not excluding. Expect return - diff
-ADD_H5_TEST (h5diff_481 1 -v ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2})
-
-#
-# Different structure, different names.
-#
-# Exclude all the different objects. Expect return - same
-ADD_H5_TEST (h5diff_482 0 -v --exclude-path "/group1" --exclude-path "/dset1" ${EXCLUDE_FILE2_1} ${EXCLUDE_FILE2_2})
-# Exclude only some different objects. Expect return - diff
-ADD_H5_TEST (h5diff_483 1 -v --exclude-path "/group1" ${EXCLUDE_FILE2_1} ${EXCLUDE_FILE2_2})
-
-# Exclude from group compare
-ADD_H5_TEST (h5diff_484 0 -v --exclude-path "/dset3" ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2} /group1)
-
-#
-# Only one file contains unique objs. Common objs are same.
-# (HDFFV-7837)
-#
-ADD_H5_TEST (h5diff_485 0 -v --exclude-path "/group1" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5)
-ADD_H5_TEST (h5diff_486 0 -v --exclude-path "/group1" h5diff_exclude3-2.h5 h5diff_exclude3-1.h5)
-ADD_H5_TEST (h5diff_487 1 -v --exclude-path "/group1/dset" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5)
-
-
-
-# ##############################################################################
-# # diff various multiple vlen and fixed strings in a compound type dataset
-# ##############################################################################
-ADD_H5_TEST (h5diff_530 0 -v ${COMP_VL_STRS_FILE} ${COMP_VL_STRS_FILE} /group /group_copy)
-
-# ##############################################################################
-# # Test container types (array,vlen) with multiple nested compound types
-# # Complex compound types in dataset and attribute
-# ##############################################################################
-ADD_H5_TEST (h5diff_540 1 -v ${COMPS_ARRAY_VLEN_FILE1} ${COMPS_ARRAY_VLEN_FILE2})
-# ##############################################################################
-# # Test mutually exclusive options
-# ##############################################################################
-#
-# Test with -d , -p and --use-system-epsilon.
-ADD_H5_TEST (h5diff_640 1 -v -d 5 -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
-ADD_H5_TEST (h5diff_641 1 -v -d 5 -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
-ADD_H5_TEST (h5diff_642 1 -v -p 0.05 -d 5 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
-ADD_H5_TEST (h5diff_643 1 -v -d 5 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
-ADD_H5_TEST (h5diff_644 1 -v --use-system-epsilon -d 5 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
-ADD_H5_TEST (h5diff_645 1 -v -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
-ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
+ INCLUDE (CMakeTests.cmake)
ENDIF (BUILD_TESTING)
diff --git a/tools/h5diff/CMakeTests.cmake b/tools/h5diff/CMakeTests.cmake
new file mode 100644
index 0000000..cac4f84
--- /dev/null
+++ b/tools/h5diff/CMakeTests.cmake
@@ -0,0 +1,1382 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ # --------------------------------------------------------------------
+ # Copy all the HDF5 files from the test directory into the source directory
+ # --------------------------------------------------------------------
+ SET (LIST_HDF5_TEST_FILES
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_basic1.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_basic2.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_types.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dtypes.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr2.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset1.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset2.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper1.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_hyper2.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_empty.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_links.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_softlinks.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_linked_softlink.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_extlink_src.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_extlink_trg.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_ext2softlink_src.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_ext2softlink_trg.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset_zero_dim_size1.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_dset_zero_dim_size2.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_danglelinks1.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_danglelinks2.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse1.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse2.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext1.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext2-1.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext2-2.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_grp_recurse_ext2-3.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude1-1.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude1-2.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude2-1.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude2-2.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude3-1.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_exclude3-2.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_comp_vl_strs.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr_v_level1.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr_v_level2.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/compounds_array_vlen1.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/compounds_array_vlen2.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/non_comparables1.h5
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/non_comparables2.h5
+ )
+
+ SET (LIST_OTHER_TEST_FILES
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_10.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_100.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_101.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_103.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_11.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_12.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_13.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_14.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_15.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_16_1.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_16_2.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_16_3.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_17.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_171.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_172.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_18_1.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_18.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_20.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_200.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_201.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_202.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_203.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_204.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_205.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_206.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_207.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_208.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_220.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_221.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_222.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_223.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_224.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_21.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_22.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_23.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_24.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_25.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_26.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_27.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_28.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_300.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_400.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_401.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_402.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_403.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_404.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_405.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_406.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_407.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_408.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_409.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_410.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_411.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_412.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_413.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_414.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_415.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_416.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_417.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_418.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_419.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_420.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_421.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_422.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_423.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_424.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_425.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_450.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_451.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_452.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_453.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_454.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_455.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_456.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_457.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_458.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_459.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_465.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_466.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_467.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_468.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_469.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_471.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_472.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_473.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_474.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_475.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_480.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_481.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_482.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_483.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_484.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_485.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_486.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_487.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_50.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_51.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_52.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_53.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_54.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_55.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_56.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_57.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_58.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_59.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_500.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_501.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_502.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_503.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_504.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_505.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_506.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_507.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_508.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_509.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_510.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_511.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_512.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_513.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_514.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_515.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_516.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_517.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_518.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_530.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_540.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_600.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_601.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_603.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_604.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_605.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_606.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_607.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_608.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_609.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_610.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_612.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_613.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_614.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_615.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_616.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_617.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_618.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_619.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_621.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_622.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_623.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_624.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_625.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_626.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_627.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_628.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_629.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_630.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_631.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_640.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_641.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_642.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_643.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_644.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_645.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_646.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_70.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_700.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_701.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_702.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_703.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_704.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_705.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_706.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_707.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_708.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_709.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_710.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_80.txt
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_90.txt
+ )
+
+ # Make testfiles dir under build dir
+ FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+
+ #
+ # copy test files from source to build dir
+ #
+ FOREACH (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ GET_FILENAME_COMPONENT(fname "${h5_tstfiles}" NAME)
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #MESSAGE (STATUS " Copying ${fname}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5diff
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${h5_tstfiles} ${dest}
+ )
+ ENDFOREACH (h5_tstfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+
+
+ #
+ # Overwrite system dependent files (Windows)
+ #
+ IF (WIN32 AND NOT CYGWIN)
+ ADD_CUSTOM_COMMAND (
+ TARGET h5diff
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_101w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_101.txt
+ )
+
+ ADD_CUSTOM_COMMAND (
+ TARGET h5diff
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_102w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_102.txt
+ )
+ ADD_CUSTOM_COMMAND (
+ TARGET h5diff
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_103w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_103.txt
+ )
+
+ ADD_CUSTOM_COMMAND (
+ TARGET h5diff
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_104w.txt ${PROJECT_BINARY_DIR}/testfiles/h5diff_104.txt
+ )
+ ENDIF (WIN32 AND NOT CYGWIN)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ MACRO (ADD_H5_TEST resultfile resultcode)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5DIFF-${resultfile} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
+ SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ IF (NOT ${resultcode} STREQUAL "0")
+ SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT ${resultcode} STREQUAL "0")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DIFF-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err
+ )
+ ADD_TEST (
+ NAME H5DIFF-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.txt"
+ -D "TEST_APPEND=EXIT CODE:"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DIFF-${resultfile} PROPERTIES DEPENDS "H5DIFF-${resultfile}-clear-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ IF (H5_HAVE_PARALLEL)
+ ADD_PH5_TEST (${resultfile} ${resultcode} ${ARGN})
+ ENDIF (H5_HAVE_PARALLEL)
+ ENDMACRO (ADD_H5_TEST file)
+
+ MACRO (ADD_PH5_TEST resultfile resultcode)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME PH5DIFF-${resultfile} COMMAND $<TARGET_FILE:ph5diff> ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} ${ARGN})
+ SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ IF (NOT ${resultcode} STREQUAL "0")
+ SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT ${resultcode} STREQUAL "0")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME PH5DIFF-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ./testfiles/${resultfile}_p.out ./testfiles/${resultfile}_p.out.err
+ )
+ ADD_TEST (
+ NAME PH5DIFF-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=${MPIEXEC};${MPIEXEC_PREFLAGS};${MPIEXEC_NUMPROC_FLAG};${MPIEXEC_MAX_NUMPROCS};${MPIEXEC_POSTFLAGS};$<TARGET_FILE:ph5diff>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=P_${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.txt"
+# -D "TEST_APPEND=EXIT CODE: [0-9]"
+# -D "TEST_REF_FILTER=EXIT CODE: 0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -P "${HDF5_RESOURCES_DIR}/prunTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (PH5DIFF-${resultfile} PROPERTIES DEPENDS "PH5DIFF-${resultfile}-clear-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_PH5_TEST file)
+
+ # ADD_H5_NO_OUTPUT_TEST
+ # Purpose to verify only exitcode without output comparison
+ # Don't use this if possible; this may be removed.
+ MACRO (ADD_H5_NO_OUTPUT_TEST testname resultcode)
+ # If using memchecker add tests without using scripts
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DIFF-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ./testfiles/${testname}.out ./testfiles/${testname}.out.err
+ )
+ # if there was a previous test
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DIFF-${testname}-clear-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_TEST (NAME H5DIFF-${testname} COMMAND $<TARGET_FILE:h5diff> ${ARGN})
+ IF (NOT ${resultcode} STREQUAL "0")
+ SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT ${resultcode} STREQUAL "0")
+
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ SET_TESTS_PROPERTIES (H5DIFF-${testname} PROPERTIES DEPENDS H5DIFF-${testname}-clear-objects)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_NO_OUTPUT_TEST)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+
+ # --------------------------------------------------------------------
+ # test file names
+ # --------------------------------------------------------------------
+ SET (FILE1 h5diff_basic1.h5)
+ SET (FILE2 h5diff_basic2.h5)
+ SET (FILE3 h5diff_types.h5)
+ SET (FILE4 h5diff_dtypes.h5)
+ SET (FILE5 h5diff_attr1.h5)
+ SET (FILE6 h5diff_attr2.h5)
+ SET (FILE7 h5diff_dset1.h5)
+ SET (FILE8 h5diff_dset2.h5)
+ SET (FILE9 h5diff_hyper1.h5)
+ SET (FILE10 h5diff_hyper2.h5)
+ SET (FILE11 h5diff_empty.h5)
+ SET (FILE12 h5diff_links.h5)
+ SET (FILE13 h5diff_softlinks.h5)
+ SET (FILE14 h5diff_linked_softlink.h5)
+ SET (FILE15 h5diff_extlink_src.h5)
+ SET (FILE16 h5diff_extlink_trg.h5)
+ SET (FILE17 h5diff_ext2softlink_src.h5)
+ SET (FILE18 h5diff_ext2softlink_trg.h5)
+ SET (FILE19 h5diff_dset_zero_dim_size1.h5)
+ SET (FILE20 h5diff_dset_zero_dim_size2.h5)
+ SET (DANGLE_LINK_FILE1 h5diff_danglelinks1.h5)
+ SET (DANGLE_LINK_FILE2 h5diff_danglelinks2.h5)
+ SET (GRP_RECURSE_FILE1 h5diff_grp_recurse1.h5)
+ SET (GRP_RECURSE_FILE2 h5diff_grp_recurse2.h5)
+ # group recursive - same structure via external links through files
+ SET (GRP_RECURSE1_EXT h5diff_grp_recurse_ext1.h5)
+ SET (GRP_RECURSE2_EXT1 h5diff_grp_recurse_ext2-1.h5)
+ SET (GRP_RECURSE2_EXT2 h5diff_grp_recurse_ext2-2.h5)
+ SET (GRP_RECURSE2_EXT3 h5diff_grp_recurse_ext2-3.h5)
+ # same structure, same obj name with different value
+ SET (EXCLUDE_FILE1_1 h5diff_exclude1-1.h5)
+ SET (EXCLUDE_FILE1_2 h5diff_exclude1-2.h5)
+ # different structure and obj names
+ SET (EXCLUDE_FILE2_1 h5diff_exclude2-1.h5)
+ SET (EXCLUDE_FILE2_2 h5diff_exclude2-2.h5)
+ # Only one file contains unique objs. Common objs are same.
+ SET (EXCLUDE_FILE3_1 h5diff_exclude3-1.h5)
+ SET (EXCLUDE_FILE3_2 h5diff_exclude3-2.h5)
+ # compound type with multiple vlen string types
+ SET (COMP_VL_STRS_FILE h5diff_comp_vl_strs.h5)
+ # container types (array,vlen) with multiple nested compound types
+ SET (COMPS_ARRAY_VLEN_FILE1 compounds_array_vlen1.h5)
+ SET (COMPS_ARRAY_VLEN_FILE2 compounds_array_vlen2.h5)
+ # attrs with verbose option level
+ SET (ATTR_VERBOSE_LEVEL_FILE1 h5diff_attr_v_level1.h5)
+ SET (ATTR_VERBOSE_LEVEL_FILE2 h5diff_attr_v_level2.h5)
+
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5DIFF-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ h5diff_10.out
+ h5diff_10.out.err
+ h5diff_100.out
+ h5diff_100.out.err
+ h5diff_101.out
+ h5diff_101.out.err
+ h5diff_102.out
+ h5diff_102.out.err
+ h5diff_103.out
+ h5diff_103.out.err
+ h5diff_104.out
+ h5diff_104.out.err
+ h5diff_11.out
+ h5diff_11.out.err
+ h5diff_12.out
+ h5diff_12.out.err
+ h5diff_13.out
+ h5diff_13.out.err
+ h5diff_14.out
+ h5diff_14.out.err
+ h5diff_15.out
+ h5diff_15.out.err
+ h5diff_16_1.out
+ h5diff_16_1.out.err
+ h5diff_16_2.out
+ h5diff_16_2.out.err
+ h5diff_16_3.out
+ h5diff_16_3.out.err
+ h5diff_17.out
+ h5diff_17.out.err
+ h5diff_171.out
+ h5diff_171.out.err
+ h5diff_172.out
+ h5diff_172.out.err
+ h5diff_18_1.out
+ h5diff_18_1.out.err
+ h5diff_18.out
+ h5diff_18.out.err
+ h5diff_20.out
+ h5diff_20.out.err
+ h5diff_200.out
+ h5diff_200.out.err
+ h5diff_201.out
+ h5diff_201.out.err
+ h5diff_202.out
+ h5diff_202.out.err
+ h5diff_203.out
+ h5diff_203.out.err
+ h5diff_204.out
+ h5diff_204.out.err
+ h5diff_205.out
+ h5diff_205.out.err
+ h5diff_206.out
+ h5diff_206.out.err
+ h5diff_207.out
+ h5diff_207.out.err
+ h5diff_208.out
+ h5diff_208.out.err
+ h5diff_220.out
+ h5diff_220.out.err
+ h5diff_221.out
+ h5diff_221.out.err
+ h5diff_222.out
+ h5diff_222.out.err
+ h5diff_223.out
+ h5diff_223.out.err
+ h5diff_224.out
+ h5diff_224.out.err
+ h5diff_21.out
+ h5diff_21.out.err
+ h5diff_22.out
+ h5diff_22.out.err
+ h5diff_23.out
+ h5diff_23.out.err
+ h5diff_24.out
+ h5diff_24.out.err
+ h5diff_25.out
+ h5diff_25.out.err
+ h5diff_26.out
+ h5diff_26.out.err
+ h5diff_27.out
+ h5diff_27.out.err
+ h5diff_28.out
+ h5diff_28.out.err
+ h5diff_300.out
+ h5diff_300.out.err
+ h5diff_400.out
+ h5diff_400.out.err
+ h5diff_401.out
+ h5diff_401.out.err
+ h5diff_402.out
+ h5diff_402.out.err
+ h5diff_403.out
+ h5diff_403.out.err
+ h5diff_404.out
+ h5diff_404.out.err
+ h5diff_405.out
+ h5diff_405.out.err
+ h5diff_406.out
+ h5diff_406.out.err
+ h5diff_407.out
+ h5diff_407.out.err
+ h5diff_408.out
+ h5diff_408.out.err
+ h5diff_409.out
+ h5diff_409.out.err
+ h5diff_410.out
+ h5diff_410.out.err
+ h5diff_411.out
+ h5diff_411.out.err
+ h5diff_412.out
+ h5diff_412.out.err
+ h5diff_413.out
+ h5diff_413.out.err
+ h5diff_414.out
+ h5diff_414.out.err
+ h5diff_415.out
+ h5diff_415.out.err
+ h5diff_416.out
+ h5diff_416.out.err
+ h5diff_417.out
+ h5diff_417.out.err
+ h5diff_418.out
+ h5diff_418.out.err
+ h5diff_419.out
+ h5diff_419.out.err
+ h5diff_420.out
+ h5diff_420.out.err
+ h5diff_421.out
+ h5diff_421.out.err
+ h5diff_422.out
+ h5diff_422.out.err
+ h5diff_423.out
+ h5diff_423.out.err
+ h5diff_424.out
+ h5diff_424.out.err
+ h5diff_425.out
+ h5diff_425.out.err
+ h5diff_450.out
+ h5diff_450.out.err
+ h5diff_451.out
+ h5diff_451.out.err
+ h5diff_452.out
+ h5diff_452.out.err
+ h5diff_453.out
+ h5diff_453.out.err
+ h5diff_454.out
+ h5diff_454.out.err
+ h5diff_455.out
+ h5diff_455.out.err
+ h5diff_456.out
+ h5diff_456.out.err
+ h5diff_457.out
+ h5diff_457.out.err
+ h5diff_458.out
+ h5diff_458.out.err
+ h5diff_459.out
+ h5diff_459.out.err
+ h5diff_465.out
+ h5diff_465.out.err
+ h5diff_466.out
+ h5diff_466.out.err
+ h5diff_467.out
+ h5diff_467.out.err
+ h5diff_468.out
+ h5diff_468.out.err
+ h5diff_469.out
+ h5diff_469.out.err
+ h5diff_471.out
+ h5diff_471.out.err
+ h5diff_472.out
+ h5diff_472.out.err
+ h5diff_473.out
+ h5diff_473.out.err
+ h5diff_474.out
+ h5diff_474.out.err
+ h5diff_475.out
+ h5diff_475.out.err
+ h5diff_480.out
+ h5diff_480.out.err
+ h5diff_481.out
+ h5diff_481.out.err
+ h5diff_482.out
+ h5diff_482.out.err
+ h5diff_483.out
+ h5diff_483.out.err
+ h5diff_484.out
+ h5diff_484.out.err
+ h5diff_50.out
+ h5diff_50.out.err
+ h5diff_51.out
+ h5diff_51.out.err
+ h5diff_52.out
+ h5diff_52.out.err
+ h5diff_53.out
+ h5diff_53.out.err
+ h5diff_54.out
+ h5diff_54.out.err
+ h5diff_55.out
+ h5diff_55.out.err
+ h5diff_56.out
+ h5diff_56.out.err
+ h5diff_57.out
+ h5diff_57.out.err
+ h5diff_58.out
+ h5diff_58.out.err
+ h5diff_59.out
+ h5diff_59.out.err
+ h5diff_500.out
+ h5diff_500.out.err
+ h5diff_501.out
+ h5diff_501.out.err
+ h5diff_502.out
+ h5diff_502.out.err
+ h5diff_503.out
+ h5diff_503.out.err
+ h5diff_504.out
+ h5diff_504.out.err
+ h5diff_505.out
+ h5diff_505.out.err
+ h5diff_506.out
+ h5diff_506.out.err
+ h5diff_507.out
+ h5diff_507.out.err
+ h5diff_508.out
+ h5diff_508.out.err
+ h5diff_509.out
+ h5diff_509.out.err
+ h5diff_510.out
+ h5diff_510.out.err
+ h5diff_511.out
+ h5diff_511.out.err
+ h5diff_512.out
+ h5diff_512.out.err
+ h5diff_513.out
+ h5diff_513.out.err
+ h5diff_514.out
+ h5diff_514.out.err
+ h5diff_515.out
+ h5diff_515.out.err
+ h5diff_516.out
+ h5diff_516.out.err
+ h5diff_517.out
+ h5diff_517.out.err
+ h5diff_518.out
+ h5diff_518.out.err
+ h5diff_530.out
+ h5diff_530.out.err
+ h5diff_540.out
+ h5diff_540.out.err
+ h5diff_600.out
+ h5diff_600.out.err
+ h5diff_601.out
+ h5diff_601.out.err
+ h5diff_603.out
+ h5diff_603.out.err
+ h5diff_604.out
+ h5diff_604.out.err
+ h5diff_605.out
+ h5diff_605.out.err
+ h5diff_606.out
+ h5diff_606.out.err
+ h5diff_607.out
+ h5diff_607.out.err
+ h5diff_608.out
+ h5diff_608.out.err
+ h5diff_609.out
+ h5diff_609.out.err
+ h5diff_610.out
+ h5diff_610.out.err
+ h5diff_612.out
+ h5diff_612.out.err
+ h5diff_613.out
+ h5diff_613.out.err
+ h5diff_614.out
+ h5diff_614.out.err
+ h5diff_615.out
+ h5diff_615.out.err
+ h5diff_616.out
+ h5diff_616.out.err
+ h5diff_617.out
+ h5diff_617.out.err
+ h5diff_618.out
+ h5diff_618.out.err
+ h5diff_619.out
+ h5diff_619.out.err
+ h5diff_621.out
+ h5diff_621.out.err
+ h5diff_622.out
+ h5diff_622.out.err
+ h5diff_623.out
+ h5diff_623.out.err
+ h5diff_624.out
+ h5diff_624.out.err
+ h5diff_625.out
+ h5diff_625.out.err
+ h5diff_626.out
+ h5diff_626.out.err
+ h5diff_627.out
+ h5diff_627.out.err
+ h5diff_628.out
+ h5diff_628.out.err
+ h5diff_629.out
+ h5diff_629.out.err
+ h5diff_640.out
+ h5diff_640.out.err
+ h5diff_641.out
+ h5diff_641.out.err
+ h5diff_642.out
+ h5diff_642.out.err
+ h5diff_643.out
+ h5diff_643.out.err
+ h5diff_644.out
+ h5diff_644.out.err
+ h5diff_645.out
+ h5diff_645.out.err
+ h5diff_646.out
+ h5diff_646.out.err
+ h5diff_70.out
+ h5diff_70.out.err
+ h5diff_700.out
+ h5diff_700.out.err
+ h5diff_701.out
+ h5diff_701.out.err
+ h5diff_702.out
+ h5diff_702.out.err
+ h5diff_703.out
+ h5diff_703.out.err
+ h5diff_704.out
+ h5diff_704.out.err
+ h5diff_705.out
+ h5diff_705.out.err
+ h5diff_706.out
+ h5diff_706.out.err
+ h5diff_707.out
+ h5diff_707.out.err
+ h5diff_708.out
+ h5diff_708.out.err
+ h5diff_709.out
+ h5diff_709.out.err
+ h5diff_710.out
+ h5diff_710.out.err
+ h5diff_80.out
+ h5diff_80.out.err
+ h5diff_90.out
+ h5diff_90.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DIFF-clearall-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DIFF-clearall-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+# ############################################################################
+# # Common usage
+# ############################################################################
+
+# 1.0
+ADD_H5_TEST (h5diff_10 0 -h)
+
+# 1.1 normal mode
+ADD_H5_TEST (h5diff_11 1 ${FILE1} ${FILE2})
+
+# 1.2 normal mode with objects
+ADD_H5_TEST (h5diff_12 1 ${FILE1} ${FILE2} g1/dset1 g1/dset2)
+
+# 1.3 report mode
+ADD_H5_TEST (h5diff_13 1 -r ${FILE1} ${FILE2})
+
+# 1.4 report mode with objects
+ADD_H5_TEST (h5diff_14 1 -r ${FILE1} ${FILE2} g1/dset1 g1/dset2)
+
+# 1.5 with -d
+ADD_H5_TEST (h5diff_15 1 --report --delta=5 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 1.6.1 with -p (int)
+ADD_H5_TEST (h5diff_16_1 1 -v -p 0.02 ${FILE1} ${FILE1} g1/dset5 g1/dset6)
+
+# 1.6.2 with -p (unsigned long_long)
+ADD_H5_TEST (h5diff_16_2 1 --verbose --relative=0.02 ${FILE1} ${FILE1} g1/dset7 g1/dset8)
+
+# 1.6.3 with -p (double)
+ADD_H5_TEST (h5diff_16_3 1 -v -p 0.02 ${FILE1} ${FILE1} g1/dset9 g1/dset10)
+
+# 1.7 verbose mode
+ADD_H5_TEST (h5diff_17 1 -v ${FILE1} ${FILE2})
+
+# 1.7 test 32-bit INFINITY
+ADD_H5_TEST (h5diff_171 0 -v ${FILE1} ${FILE1} /g1/fp19 /g1/fp19_COPY)
+
+# 1.7 test 64-bit INFINITY
+ADD_H5_TEST (h5diff_172 0 -v ${FILE1} ${FILE1} /g1/fp20 /g1/fp20_COPY)
+
+# 1.8 quiet mode
+ADD_H5_TEST (h5diff_18 1 -q ${FILE1} ${FILE2})
+
+# 1.8 -v and -q
+ADD_H5_TEST (h5diff_18_1 2 -v -q ${FILE1} ${FILE2})
+
+# ##############################################################################
+# # not comparable types
+# ##############################################################################
+
+# 2.0
+ADD_H5_TEST (h5diff_20 0 -v ${FILE3} ${FILE3} dset g1)
+
+# 2.1
+ADD_H5_TEST (h5diff_21 0 -v ${FILE3} ${FILE3} dset l1)
+
+# 2.2
+ADD_H5_TEST (h5diff_22 0 -v ${FILE3} ${FILE3} dset t1)
+
+# ##############################################################################
+# # compare groups, types, links (no differences and differences)
+# ##############################################################################
+
+# 2.3
+ADD_H5_TEST (h5diff_23 0 -v ${FILE3} ${FILE3} g1 g1)
+
+# 2.4
+ADD_H5_TEST (h5diff_24 0 -v ${FILE3} ${FILE3} t1 t1)
+
+# 2.5
+ADD_H5_TEST (h5diff_25 0 -v ${FILE3} ${FILE3} l1 l1)
+
+# 2.6
+ADD_H5_TEST (h5diff_26 0 -v ${FILE3} ${FILE3} g1 g2)
+
+# 2.7
+ADD_H5_TEST (h5diff_27 1 -v ${FILE3} ${FILE3} t1 t2)
+
+# 2.8
+ADD_H5_TEST (h5diff_28 1 -v ${FILE3} ${FILE3} l1 l2)
+
+# ##############################################################################
+# # Dataset datatypes
+# ##############################################################################
+
+# 5.0
+ADD_H5_TEST (h5diff_50 1 -v ${FILE4} ${FILE4} dset0a dset0b)
+
+# 5.1
+ADD_H5_TEST (h5diff_51 1 -v ${FILE4} ${FILE4} dset1a dset1b)
+
+# 5.2
+ADD_H5_TEST (h5diff_52 1 -v ${FILE4} ${FILE4} dset2a dset2b)
+
+# 5.3
+ADD_H5_TEST (h5diff_53 1 -v ${FILE4} ${FILE4} dset3a dset4b)
+
+# 5.4
+ADD_H5_TEST (h5diff_54 1 -v ${FILE4} ${FILE4} dset4a dset4b)
+
+# 5.5
+ADD_H5_TEST (h5diff_55 1 -v ${FILE4} ${FILE4} dset5a dset5b)
+
+# 5.6
+ADD_H5_TEST (h5diff_56 1 -v ${FILE4} ${FILE4} dset6a dset6b)
+
+# 5.7
+ADD_H5_TEST (h5diff_57 0 -v ${FILE4} ${FILE4} dset7a dset7b)
+
+# 5.8 (region reference)
+ADD_H5_TEST (h5diff_58 1 -v ${FILE7} ${FILE8} refreg)
+
+# test for both dset and attr with same type but with different size
+# ( HDDFV-7942 )
+ADD_H5_TEST (h5diff_59 0 -v ${FILE4} ${FILE4} dset11a dset11b)
+
+# ##############################################################################
+# # Error messages
+# ##############################################################################
+
+# 6.0: Check if the command line number of arguments is less than 3
+ADD_H5_TEST (h5diff_600 1 ${FILE1})
+
+# 6.1: Check if non-exist object name is specified
+ADD_H5_TEST (h5diff_601 2 ${FILE1} ${FILE1} nono_obj)
+
+# ##############################################################################
+# # -d
+# ##############################################################################
+
+# 6.3: negative value
+ADD_H5_TEST (h5diff_603 1 -d -4 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.4: zero
+ADD_H5_TEST (h5diff_604 1 -d 0 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.5: non number
+ADD_H5_TEST (h5diff_605 1 -d u ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.6: hexadecimal
+ADD_H5_TEST (h5diff_606 1 -d 0x1 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.7: string
+ADD_H5_TEST (h5diff_607 1 -d "1" ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.8: use system epsilon
+ADD_H5_TEST (h5diff_608 1 --use-system-epsilon ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.9: number larger than biggest difference
+ADD_H5_TEST (h5diff_609 0 -d 200 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.10: number smaller than smallest difference
+ADD_H5_TEST (h5diff_610 1 -d 1 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# ##############################################################################
+# # -p
+# ##############################################################################
+
+# 6.12: negative value
+ADD_H5_TEST (h5diff_612 1 -p -4 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.13: zero
+ADD_H5_TEST (h5diff_613 1 -p 0 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.14: non number
+ADD_H5_TEST (h5diff_614 1 -p u ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.15: hexadecimal
+ADD_H5_TEST (h5diff_615 1 -p 0x1 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.16: string
+ADD_H5_TEST (h5diff_616 1 -p "0.21" ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.17: repeated option
+ADD_H5_TEST (h5diff_617 1 -p 0.21 -p 0.22 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.18: number larger than biggest difference
+ADD_H5_TEST (h5diff_618 0 -p 2 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.19: number smaller than smallest difference
+ADD_H5_TEST (h5diff_619 1 -p 0.005 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# ##############################################################################
+# # -n
+# ##############################################################################
+
+# 6.21: negative value
+ADD_H5_TEST (h5diff_621 1 -n -4 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.22: zero
+ADD_H5_TEST (h5diff_622 1 -n 0 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.23: non number
+ADD_H5_TEST (h5diff_623 1 -n u ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.24: hexadecimal
+ADD_H5_TEST (h5diff_624 1 -n 0x1 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.25: string
+ADD_H5_TEST (h5diff_625 1 -n "2" ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.26: repeated option
+ADD_H5_TEST (h5diff_626 1 -n 2 -n 3 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.27: number larger than biggest difference
+ADD_H5_TEST (h5diff_627 1 --count=200 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# 6.28: number smaller than smallest difference
+ADD_H5_TEST (h5diff_628 1 -n 1 ${FILE1} ${FILE2} g1/dset3 g1/dset4)
+
+# Disabling this test as it hangs - LRK 20090618
+# 6.29 non valid files
+#ADD_H5_TEST (h5diff_629 2 file1.h6 file2.h6)
+
+# ##############################################################################
+# # NaN
+# ##############################################################################
+# 6.30: test (NaN == NaN) must be true based on our documentation -- XCAO
+ADD_H5_TEST (h5diff_630 0 -v -d "0.0001" ${FILE1} ${FILE1} g1/fp18 g1/fp18_COPY)
+ADD_H5_TEST (h5diff_631 0 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp18 g1/fp18_COPY)
+
+# ##############################################################################
+# 7. attributes
+# ##############################################################################
+ADD_H5_TEST (h5diff_70 1 -v ${FILE5} ${FILE6})
+
+# ##################################################
+# attrs with verbose option level
+# ##################################################
+ADD_H5_TEST (h5diff_700 1 -v1 ${FILE5} ${FILE6})
+ADD_H5_TEST (h5diff_701 1 -v2 ${FILE5} ${FILE6})
+ADD_H5_TEST (h5diff_702 1 --verbose=1 ${FILE5} ${FILE6})
+ADD_H5_TEST (h5diff_703 1 --verbose=2 ${FILE5} ${FILE6})
+
+# same attr number , all same attr name
+ADD_H5_TEST (h5diff_704 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g)
+
+# same attr number , some same attr name
+ADD_H5_TEST (h5diff_705 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /dset)
+
+# same attr number , all different attr name
+ADD_H5_TEST (h5diff_706 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /ntype)
+
+# different attr number , same attr name (intersected)
+ADD_H5_TEST (h5diff_707 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g2)
+
+# different attr number , all different attr name
+ADD_H5_TEST (h5diff_708 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g3)
+
+# when no attributes exist in both objects
+ADD_H5_TEST (h5diff_709 0 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2} /g4)
+
+# file vs file
+ADD_H5_TEST (h5diff_710 1 -v2 ${ATTR_VERBOSE_LEVEL_FILE1} ${ATTR_VERBOSE_LEVEL_FILE2})
+
+# ##############################################################################
+# 8. all dataset datatypes
+# ##############################################################################
+ADD_H5_TEST (h5diff_80 1 -v ${FILE7} ${FILE8})
+
+# 9. compare a file with itself
+ADD_H5_TEST (h5diff_90 0 -v ${FILE2} ${FILE2})
+
+# 10. read by hyperslab, print indexes
+#if test -n "$pmode" -a "$mydomainname" = hdfgroup.uiuc.edu; then
+# # skip this test which sometimes hangs in some THG machines
+# MESSAGE (STATUS "SKIP -v ${FILE9} ${FILE10})
+#else
+# ADD_H5_TEST (h5diff_100 1 -v ${FILE9} ${FILE10})
+#fi
+
+# 11. floating point comparison
+ADD_H5_TEST (h5diff_101 1 -v ${FILE1} ${FILE1} g1/d1 g1/d2)
+
+ADD_H5_TEST (h5diff_102 1 -v ${FILE1} ${FILE1} g1/fp1 g1/fp2)
+
+# with --use-system-epsilon for double value. expect less differences
+ADD_H5_TEST (h5diff_103 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/d1
+g1/d2)
+
+# with --use-system-epsilon for float value. expect less differences
+ADD_H5_TEST (h5diff_104 1 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp1
+g1/fp2)
+
+# not comparable -c flag
+ADD_H5_TEST (h5diff_200 0 ${FILE2} ${FILE2} g2/dset1 g2/dset2)
+
+ADD_H5_TEST (h5diff_201 0 -c ${FILE2} ${FILE2} g2/dset1 g2/dset2)
+
+ADD_H5_TEST (h5diff_202 0 -c ${FILE2} ${FILE2} g2/dset2 g2/dset3)
+
+ADD_H5_TEST (h5diff_203 0 -c ${FILE2} ${FILE2} g2/dset3 g2/dset4)
+
+ADD_H5_TEST (h5diff_204 0 -c ${FILE2} ${FILE2} g2/dset4 g2/dset5)
+
+ADD_H5_TEST (h5diff_205 0 -c ${FILE2} ${FILE2} g2/dset5 g2/dset6)
+
+# not comparable in compound
+ADD_H5_TEST (h5diff_206 0 -c ${FILE2} ${FILE2} g2/dset7 g2/dset8)
+
+ADD_H5_TEST (h5diff_207 0 -c ${FILE2} ${FILE2} g2/dset8 g2/dset9)
+
+# not comparable in dataspace of zero dimension size
+ADD_H5_TEST (h5diff_208 0 -c ${FILE19} ${FILE20})
+
+# non-comparable dataset with comparable attribute, and other comparable datasets.
+# All the rest comparables should display differences.
+ADD_H5_TEST (h5diff_220 1 -c non_comparables1.h5 non_comparables2.h5 /g1)
+
+# comparable dataset with non-comparable attribute and other comparable attributes.
+# Also test non-compatible attributes with different type, dimention, rank.
+# All the rest comparables should display differences.
+ADD_H5_TEST (h5diff_221 1 -c non_comparables1.h5 non_comparables2.h5 /g2)
+
+# entire file
+# All the rest comparables should display differences
+ADD_H5_TEST (h5diff_222 1 -c non_comparables1.h5 non_comparables2.h5)
+
+# non-comparable test for common objects (same name) with different object types
+# (HDFFV-7644)
+ADD_H5_TEST (h5diff_223 0 -c non_comparables1.h5 non_comparables2.h5 /diffobjtypes)
+# swap files
+ADD_H5_TEST (h5diff_224 0 -c non_comparables2.h5 non_comparables1.h5 /diffobjtypes)
+
+# ##############################################################################
+# # Links compare without --follow-symlinks nor --no-dangling-links
+# ##############################################################################
+# test for bug1749
+ADD_H5_TEST (h5diff_300 1 -v ${FILE12} ${FILE12} /link_g1 /link_g2)
+
+# ##############################################################################
+# # Links compare with --follow-symlinks Only
+# ##############################################################################
+# soft links file to file
+ADD_H5_TEST (h5diff_400 0 --follow-symlinks -v ${FILE13} ${FILE13})
+
+# softlink vs dset"
+ADD_H5_TEST (h5diff_401 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_dset1_1 /target_dset2)
+
+# dset vs softlink"
+ADD_H5_TEST (h5diff_402 1 --follow-symlinks -v ${FILE13} ${FILE13} /target_dset2 /softlink_dset1_1)
+
+# softlink vs softlink"
+ADD_H5_TEST (h5diff_403 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_dset1_1 /softlink_dset2)
+
+# extlink vs extlink (FILE)"
+ADD_H5_TEST (h5diff_404 0 --follow-symlinks -v ${FILE15} ${FILE15})
+
+# extlink vs dset"
+ADD_H5_TEST (h5diff_405 1 --follow-symlinks -v ${FILE15} ${FILE16} /ext_link_dset1 /target_group2/x_dset)
+
+# dset vs extlink"
+ADD_H5_TEST (h5diff_406 1 --follow-symlinks -v ${FILE16} ${FILE15} /target_group2/x_dset /ext_link_dset1)
+
+# extlink vs extlink"
+ADD_H5_TEST (h5diff_407 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_dset2)
+
+# softlink vs extlink"
+ADD_H5_TEST (h5diff_408 1 --follow-symlinks -v ${FILE13} ${FILE15} /softlink_dset1_1 /ext_link_dset2)
+
+# extlink vs softlink "
+ADD_H5_TEST (h5diff_409 1 --follow-symlinks -v ${FILE15} ${FILE13} /ext_link_dset2 /softlink_dset1_1)
+
+# linked_softlink vs linked_softlink (FILE)"
+ADD_H5_TEST (h5diff_410 0 --follow-symlinks -v ${FILE14} ${FILE14})
+
+# dset2 vs linked_softlink_dset1"
+ADD_H5_TEST (h5diff_411 1 --follow-symlinks -v ${FILE14} ${FILE14} /target_dset2 /softlink1_to_slink2)
+
+# linked_softlink_dset1 vs dset2"
+ADD_H5_TEST (h5diff_412 1 --follow-symlinks -v ${FILE14} ${FILE14} /softlink1_to_slink2 /target_dset2)
+
+# linked_softlink_to_dset1 vs linked_softlink_to_dset2"
+ADD_H5_TEST (h5diff_413 1 --follow-symlinks -v ${FILE14} ${FILE14} /softlink1_to_slink2 /softlink2_to_slink2)
+
+# group vs linked_softlink_group1"
+ADD_H5_TEST (h5diff_414 1 --follow-symlinks -v ${FILE14} ${FILE14} /target_group /softlink3_to_slink2)
+
+# linked_softlink_group1 vs group"
+ADD_H5_TEST (h5diff_415 1 --follow-symlinks -v ${FILE14} ${FILE14} /softlink3_to_slink2 /target_group)
+
+# linked_softlink_to_group1 vs linked_softlink_to_group2"
+ADD_H5_TEST (h5diff_416 0 --follow-symlinks -v ${FILE14} ${FILE14} /softlink3_to_slink2 /softlink4_to_slink2)
+
+# non-exist-softlink vs softlink"
+ADD_H5_TEST (h5diff_417 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_noexist /softlink_dset2)
+
+# softlink vs non-exist-softlink"
+ADD_H5_TEST (h5diff_418 1 --follow-symlinks -v ${FILE13} ${FILE13} /softlink_dset2 /softlink_noexist)
+
+# non-exist-extlink_file vs extlink"
+ADD_H5_TEST (h5diff_419 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_noexist2 /ext_link_dset2)
+
+# exlink vs non-exist-extlink_file"
+ADD_H5_TEST (h5diff_420 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_dset2 /ext_link_noexist2)
+
+# extlink vs non-exist-extlink_obj"
+ADD_H5_TEST (h5diff_421 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_dset2 /ext_link_noexist1)
+
+# non-exist-extlink_obj vs extlink"
+ADD_H5_TEST (h5diff_422 1 --follow-symlinks -v ${FILE15} ${FILE15} /ext_link_noexist1 /ext_link_dset2)
+
+# extlink_to_softlink_to_dset1 vs dset2"
+ADD_H5_TEST (h5diff_423 1 --follow-symlinks -v ${FILE17} ${FILE18} /ext_link_to_slink1 /dset2)
+
+# dset2 vs extlink_to_softlink_to_dset1"
+ADD_H5_TEST (h5diff_424 1 --follow-symlinks -v ${FILE18} ${FILE17} /dset2 /ext_link_to_slink1)
+
+# extlink_to_softlink_to_dset1 vs extlink_to_softlink_to_dset2"
+ADD_H5_TEST (h5diff_425 1 --follow-symlinks -v ${FILE17} ${FILE17} /ext_link_to_slink1 /ext_link_to_slink2)
+
+# ##############################################################################
+# # Dangling links compare (--follow-symlinks and --no-dangling-links)
+# ##############################################################################
+# dangling links --follow-symlinks (FILE to FILE)
+ADD_H5_TEST (h5diff_450 1 --follow-symlinks -v ${DANGLE_LINK_FILE1} ${DANGLE_LINK_FILE2})
+
+# dangling links --follow-symlinks and --no-dangling-links (FILE to FILE)
+ADD_H5_TEST (h5diff_451 2 --follow-symlinks -v --no-dangling-links ${DANGLE_LINK_FILE1} ${DANGLE_LINK_FILE2})
+
+# try --no-dangling-links without --follow-symlinks options
+ADD_H5_TEST (h5diff_452 2 --no-dangling-links ${FILE13} ${FILE13})
+
+# dangling link found for soft links (FILE to FILE)
+ADD_H5_TEST (h5diff_453 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13})
+
+# dangling link found for soft links (obj to obj)
+ADD_H5_TEST (h5diff_454 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_dset2 /softlink_noexist)
+
+# dangling link found for soft links (obj to obj) Both dangle links
+ADD_H5_TEST (h5diff_455 2 --follow-symlinks -v --no-dangling-links ${FILE13} ${FILE13} /softlink_noexist /softlink_noexist)
+
+# dangling link found for ext links (FILE to FILE)
+ADD_H5_TEST (h5diff_456 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15})
+
+# dangling link found for ext links (obj to obj). target file exist
+ADD_H5_TEST (h5diff_457 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist1)
+
+# dangling link found for ext links (obj to obj). target file NOT exist
+ADD_H5_TEST (h5diff_458 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_dset1 /ext_link_noexist2)
+
+# dangling link found for ext links (obj to obj). Both dangle links
+ADD_H5_TEST (h5diff_459 2 --follow-symlinks -v --no-dangling-links ${FILE15} ${FILE15} /ext_link_noexist1 /ext_link_noexist2)
+
+# dangling link --follow-symlinks (obj vs obj)
+# (HDFFV-7836)
+ADD_H5_TEST (h5diff_465 0 --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1)
+# (HDFFV-7835)
+# soft dangling vs. soft dangling
+ADD_H5_TEST (h5diff_466 0 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1)
+# soft link vs. soft dangling
+ADD_H5_TEST (h5diff_467 1 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link2)
+# ext dangling vs. ext dangling
+ADD_H5_TEST (h5diff_468 0 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link4)
+# ext link vs. ext dangling
+ADD_H5_TEST (h5diff_469 1 -v --follow-symlinks h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link2)
+
+#---------------------------------------------------
+# dangling links without follow symlink
+# (HDFFV-7998)
+# test - soft dangle links (same and different paths),
+# - external dangle links (same and different paths)
+ADD_H5_TEST (h5diff_471 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5)
+ADD_H5_TEST (h5diff_472 0 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link1)
+ADD_H5_TEST (h5diff_473 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /soft_link4)
+ADD_H5_TEST (h5diff_474 0 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link4)
+ADD_H5_TEST (h5diff_475 1 -v h5diff_danglelinks1.h5 h5diff_danglelinks2.h5 /ext_link1)
+
+
+# ##############################################################################
+# # test for group diff recursivly
+# ##############################################################################
+# root
+ADD_H5_TEST (h5diff_500 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /)
+ADD_H5_TEST (h5diff_501 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /)
+
+# root vs group
+ADD_H5_TEST (h5diff_502 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} / /grp1/grp2/grp3)
+
+# group vs group (same name and structure)
+ADD_H5_TEST (h5diff_503 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /grp1)
+
+# group vs group (different name and structure)
+ADD_H5_TEST (h5diff_504 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1/grp2 /grp1/grp2/grp3)
+
+# groups vs soft-link
+ADD_H5_TEST (h5diff_505 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /slink_grp1)
+ADD_H5_TEST (h5diff_506 0 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1/grp2 /slink_grp2)
+
+# groups vs ext-link
+ADD_H5_TEST (h5diff_507 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /elink_grp1)
+ADD_H5_TEST (h5diff_508 0 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp1 /elink_grp1)
+
+# soft-link vs ext-link
+ADD_H5_TEST (h5diff_509 0 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp1 /elink_grp1)
+ADD_H5_TEST (h5diff_510 0 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp1 /elink_grp1)
+
+# circled ext links
+ADD_H5_TEST (h5diff_511 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp10 /grp11)
+ADD_H5_TEST (h5diff_512 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /grp10 /grp11)
+
+# circled soft2ext-link vs soft2ext-link
+ADD_H5_TEST (h5diff_513 1 -v ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11)
+ADD_H5_TEST (h5diff_514 1 -v --follow-symlinks ${GRP_RECURSE_FILE1} ${GRP_RECURSE_FILE2} /slink_grp10 /slink_grp11)
+
+###############################################################################
+# Test for group recursive diff via multi-linked external links
+# With follow-symlinks, file $GRP_RECURSE1_EXT and $GRP_RECURSE2_EXT1 should
+# be same with the external links.
+###############################################################################
+# file vs file
+ADD_H5_TEST (h5diff_515 1 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1})
+ADD_H5_TEST (h5diff_516 0 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1})
+# group vs group
+ADD_H5_TEST (h5diff_517 1 -v ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1)
+ADD_H5_TEST (h5diff_518 0 -v --follow-symlinks ${GRP_RECURSE1_EXT} ${GRP_RECURSE2_EXT1} /g1)
+
+# ##############################################################################
+# # Exclude path (--exclude-path)
+# ##############################################################################
+#
+# Same structure, same names and different value.
+#
+# Exclude the object with different value. Expect return - same
+ADD_H5_TEST (h5diff_480 0 -v --exclude-path /group1/dset3 ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2})
+# Verify different by not excluding. Expect return - diff
+ADD_H5_TEST (h5diff_481 1 -v ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2})
+
+#
+# Different structure, different names.
+#
+# Exclude all the different objects. Expect return - same
+ADD_H5_TEST (h5diff_482 0 -v --exclude-path "/group1" --exclude-path "/dset1" ${EXCLUDE_FILE2_1} ${EXCLUDE_FILE2_2})
+# Exclude only some different objects. Expect return - diff
+ADD_H5_TEST (h5diff_483 1 -v --exclude-path "/group1" ${EXCLUDE_FILE2_1} ${EXCLUDE_FILE2_2})
+
+# Exclude from group compare
+ADD_H5_TEST (h5diff_484 0 -v --exclude-path "/dset3" ${EXCLUDE_FILE1_1} ${EXCLUDE_FILE1_2} /group1)
+
+#
+# Only one file contains unique objs. Common objs are same.
+# (HDFFV-7837)
+#
+ADD_H5_TEST (h5diff_485 0 -v --exclude-path "/group1" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5)
+ADD_H5_TEST (h5diff_486 0 -v --exclude-path "/group1" h5diff_exclude3-2.h5 h5diff_exclude3-1.h5)
+ADD_H5_TEST (h5diff_487 1 -v --exclude-path "/group1/dset" h5diff_exclude3-1.h5 h5diff_exclude3-2.h5)
+
+
+
+# ##############################################################################
+# # diff various multiple vlen and fixed strings in a compound type dataset
+# ##############################################################################
+ADD_H5_TEST (h5diff_530 0 -v ${COMP_VL_STRS_FILE} ${COMP_VL_STRS_FILE} /group /group_copy)
+
+# ##############################################################################
+# # Test container types (array,vlen) with multiple nested compound types
+# # Complex compound types in dataset and attribute
+# ##############################################################################
+ADD_H5_TEST (h5diff_540 1 -v ${COMPS_ARRAY_VLEN_FILE1} ${COMPS_ARRAY_VLEN_FILE2})
+
+# ##############################################################################
+# # Test mutually exclusive options
+# ##############################################################################
+#
+# Test with -d , -p and --use-system-epsilon.
+ADD_H5_TEST (h5diff_640 1 -v -d 5 -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
+ADD_H5_TEST (h5diff_641 1 -v -d 5 -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
+ADD_H5_TEST (h5diff_642 1 -v -p 0.05 -d 5 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
+ADD_H5_TEST (h5diff_643 1 -v -d 5 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
+ADD_H5_TEST (h5diff_644 1 -v --use-system-epsilon -d 5 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
+ADD_H5_TEST (h5diff_645 1 -v -p 0.05 --use-system-epsilon ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
+ADD_H5_TEST (h5diff_646 1 -v --use-system-epsilon -p 0.05 ${FILE1} ${FILE2} /g1/dset3 /g1/dset4)
diff --git a/tools/h5dump/CMakeLists.txt b/tools/h5dump/CMakeLists.txt
index df9cc5f..30ff215 100644
--- a/tools/h5dump/CMakeLists.txt
+++ b/tools/h5dump/CMakeLists.txt
@@ -21,12 +21,6 @@ SET_TARGET_PROPERTIES (h5dump PROPERTIES FOLDER tools)
SET (H5_DEP_EXECUTABLES h5dump)
-##############################################################################
-##############################################################################
-### T E S T I N G ###
-##############################################################################
-##############################################################################
-
IF (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5dump test executable
@@ -40,2141 +34,12 @@ IF (BUILD_TESTING)
#ADD_TEST (NAME h5dumpgentest COMMAND $<TARGET_FILE:h5dumpgentest>)
ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
-
- # --------------------------------------------------------------------
- # Copy all the HDF5 files from the test directory into the source directory
- # --------------------------------------------------------------------
- SET (HDF5_REFERENCE_FILES
- ${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A0.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2B.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-3.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-4s.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-5s.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-6.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-7.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-7N.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tallfilters.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1_big.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray5.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray8.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-3.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-4_be.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrcontents1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrcontents2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrintsize.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrregR.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin3.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tbigdims.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tboot1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tboot2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tchunked.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-3.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompact.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcontents.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcontiguos.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdataregR.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdeflate.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-3s.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubstart.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubcount.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubstride.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubblock.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/texternal.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinkfar.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfill.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfletcher32.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-3.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-5.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/thyperslab.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicesno.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub3.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicesyes.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tlarge_objname.ddl
- #${HDF5_TOOLS_SRC_DIR}/testfiles/tldouble.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tlonglinks.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop-1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tmultifile.ddl
- #${HDF5_TOOLS_SRC_DIR}/testfiles/tqmarkfile.ddl
- #${HDF5_TOOLS_SRC_DIR}/testfiles/tstarfile.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcmpddt.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnbit.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoattrdata.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoattrddl.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoddl.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoddlfile.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/trawdatafile.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/trawssetfile.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr3.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr5.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr3.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/torderlinks1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/torderlinks2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tperror.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/treference.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarintsize.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarattrintsize.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarstring.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tscaleoffset.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tshuffle.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-D.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstringe.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tszip.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tuserfilter.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/twidedisplay.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/twithddlfile.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/h5dump-help.txt
- ${HDF5_TOOLS_SRC_DIR}/testfiles/out3.h5import
- )
- SET (HDF5_REFERENCE_EXP_FILES
- tall-6.exp
- tnoddlfile.exp
- trawdatafile.exp
- trawssetfile.exp
- tstr2bin2.exp
- tstr2bin6.exp
- twithddl.exp
- twithddlfile.exp
- )
- SET (HDF5_REFERENCE_TEST_FILES
- ${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/taindices.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1_big.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray4.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray5.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray8.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr4_be.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrintsize.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tbigdims.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinary.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinkfar.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinktar.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00000.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00001.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00002.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00003.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00004.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00005.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00006.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00007.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00008.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00009.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00010.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfcontents1.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfcontents2.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfilters.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfvalues.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/thyperslab.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tlarge_objname.h5
- #${HDF5_TOOLS_SRC_DIR}/testfiles/tldouble.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tlonglinks.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-b.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-g.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-l.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-o.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-r.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-s.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcmpddt.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarintsize.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarattrintsize.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarstring.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file-m.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file-r.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr3.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.h5
- )
- SET (HDF5_ERROR_REFERENCE_TEST_FILES
- ${PROJECT_SOURCE_DIR}/errfiles/filter_fail.err
- ${PROJECT_SOURCE_DIR}/errfiles/tall-1.err
- ${PROJECT_SOURCE_DIR}/errfiles/tall-2A.err
- ${PROJECT_SOURCE_DIR}/errfiles/tall-2A0.err
- ${PROJECT_SOURCE_DIR}/errfiles/tall-2B.err
- ${PROJECT_SOURCE_DIR}/errfiles/tarray1_big.err
- ${PROJECT_SOURCE_DIR}/errfiles/tattrregR.err
- ${PROJECT_SOURCE_DIR}/errfiles/tattr-3.err
- ${PROJECT_SOURCE_DIR}/errfiles/tcomp-3.err
- ${PROJECT_SOURCE_DIR}/errfiles/tdataregR.err
- ${PROJECT_SOURCE_DIR}/errfiles/tdset-2.err
- ${PROJECT_SOURCE_DIR}/errfiles/texceedsubblock.err
- ${PROJECT_SOURCE_DIR}/errfiles/texceedsubcount.err
- ${PROJECT_SOURCE_DIR}/errfiles/texceedsubstart.err
- ${PROJECT_SOURCE_DIR}/errfiles/texceedsubstride.err
- ${PROJECT_SOURCE_DIR}/errfiles/textlink.err
- ${PROJECT_SOURCE_DIR}/errfiles/textlinkfar.err
- ${PROJECT_SOURCE_DIR}/errfiles/textlinksrc.err
- ${PROJECT_SOURCE_DIR}/errfiles/torderlinks1.err
- ${PROJECT_SOURCE_DIR}/errfiles/torderlinks2.err
- ${PROJECT_SOURCE_DIR}/errfiles/tgroup-2.err
- ${PROJECT_SOURCE_DIR}/errfiles/tperror.err
- ${PROJECT_SOURCE_DIR}/errfiles/tslink-D.err
- )
-
- # make test dir
- FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
-
- #
- # copy test files from source dir to test dir
- #
- FOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${tst_h5_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
- #MESSAGE (STATUS " Copying ${tst_h5_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${tst_h5_file} ${dest}
- )
- ENDFOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
-
- FOREACH (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
- IF (WIN32 AND NOT CYGWIN)
- FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} TEST_STREAM)
- FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}")
- ELSE (WIN32 AND NOT CYGWIN)
- ADD_CUSTOM_COMMAND (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file}
- )
- ENDIF (WIN32 AND NOT CYGWIN)
- ENDFOREACH (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
-
- FOREACH (tst_other_file ${HDF5_REFERENCE_FILES})
- GET_FILENAME_COMPONENT(fname "${tst_other_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
- #MESSAGE (STATUS " Copying ${tst_other_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${tst_other_file} ${dest}
- )
- ENDFOREACH (tst_other_file ${HDF5_REFERENCE_FILES})
-
- FOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${tst_error_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
- #MESSAGE (STATUS " Copying ${tst_error_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${tst_error_file} ${dest}
- )
- ENDFOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
-
- # --------------------------------------------------------------------
- # Special file handling
- # --------------------------------------------------------------------
- ADD_CUSTOM_COMMAND (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl
- )
-
- IF (WIN32 AND NOT CYGWIN)
- FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM)
- FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}")
- ELSE (WIN32 AND NOT CYGWIN)
- ADD_CUSTOM_COMMAND (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp
- )
- ENDIF (WIN32 AND NOT CYGWIN)
-
- #
- # copy XML test files from source dir to test dir
- #
- SET (HDF5_XML_REFERENCE_TEST_FILES
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5
- )
- SET (HDF5_XML_REFERENCE_FILES
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-2.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-uri.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-2.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-uri.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns-2.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr1.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr2.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr3.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5.xml
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5.xml
- )
-
- FOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${tst_xml_h5_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
- #MESSAGE (STATUS " Copying ${tst_xml_h5_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${tst_xml_h5_file} ${dest}
- )
- ENDFOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
-
- FOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
- GET_FILENAME_COMPONENT(fname "${tst_xml_other_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
- #MESSAGE (STATUS " Copying ${tst_xml_other_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${tst_xml_other_file} ${dest}
- )
- ENDFOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
-
- # --------------------------------------------------------------------
- # Packed Bits
- # --------------------------------------------------------------------
- #-- Copy all the HDF5 files from the test directory into the source directory
- SET (HDF5_REFERENCE_PBITS
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnofilename-with-packed-bits.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsArray.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCompound.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIncomplete.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharLengthExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntLengthExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongLengthExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthPositive.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMax.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMaxExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharOffsetExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntOffsetExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongOffsetExceeded.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetNegative.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOverlapped.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedIntWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedIntWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole1.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole63.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole63.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt8.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt8.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong16.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong16.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong32.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong32.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned2.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt4.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong8.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong8.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong16.ddl
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong16.ddl
- )
- SET (HDF5_REFERENCE_TEST_PBITS
- ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5
- )
- SET (HDF5_ERROR_REFERENCE_PBITS
- ${PROJECT_SOURCE_DIR}/errfiles/tnofilename-with-packed-bits.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharLengthExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharOffsetExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIncomplete.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntLengthExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntOffsetExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthPositive.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongLengthExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongOffsetExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsMaxExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetExceeded.err
- ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetNegative.err
- )
-
- FOREACH (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
- GET_FILENAME_COMPONENT(fname "${pbits_h5_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
- #MESSAGE (STATUS " Copying ${pbits_h5_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${pbits_h5_file} ${dest}
- )
- ENDFOREACH (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
-
-
- FOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
- GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
- SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
- #MESSAGE (STATUS " Copying ${ddl_pbits}")
- ADD_CUSTOM_COMMAND (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${ddl_pbits} ${ddldest}
- )
- ENDFOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
-
- FOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
- GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
- SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
- #MESSAGE (STATUS " Copying ${ddl_pbits}")
- ADD_CUSTOM_COMMAND (
- TARGET h5dump
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${ddl_pbits} ${ddldest}
- )
- ENDFOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
-
-##############################################################################
-##############################################################################
-### T H E T E S T S M A C R O S ###
-##############################################################################
-##############################################################################
-
- MACRO (ADD_HELP_TEST testname resultcode)
- # If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-${testname} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
- SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-${testname}")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DUMP-h5dump-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove h5dump-${testname}.out h5dump-${testname}.out.err
- )
- SET_TESTS_PROPERTIES (H5DUMP-h5dump-${testname}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
- NAME H5DUMP-h5dump-${testname}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
- -D "TEST_OUTPUT=h5dump-${testname}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=h5dump-${testname}.txt"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5DUMP-h5dump-${testname} PROPERTIES DEPENDS "H5DUMP-h5dump-${testname}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_HELP_TEST)
-
- MACRO (ADD_SKIP_H5_TEST skipresultfile skipresultcode testtype)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DUMP-${skipresultfile}-SKIPPED
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${skipresultfile} ${ARGN}"
- )
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ELSE (${testtype} STREQUAL "SKIP")
- ADD_H5_TEST (${skipresultfile} ${skipresultcode} ${ARGN})
- ENDIF (${testtype} STREQUAL "SKIP")
- ENDMACRO (ADD_SKIP_H5_TEST)
-
- MACRO (ADD_H5_TEST resultfile resultcode)
- # If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DUMP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}.bin ${resultfile}.out ${resultfile}.out.err
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
- NAME H5DUMP-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_TEST file)
-
- MACRO (ADD_H5_TEST_N resultfile resultcode)
- # If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-N-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
- SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DUMP-N-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}-N.bin ${resultfile}-N.out ${resultfile}-N.out.err
- )
- SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
- NAME H5DUMP-N-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
- -D "TEST_OUTPUT=${resultfile}-N.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS "H5DUMP-N-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_TEST_N file)
-
- MACRO (ADD_H5_TEST_EXPORT resultfile targetfile resultcode)
- # If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${resultfile}.txt ${targetfile})
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DUMP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}.txt ${resultfile}.out ${resultfile}.out.err
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
- NAME H5DUMP-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=${ARGN};${resultfile}.txt;${targetfile}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ADD_TEST (
- NAME H5DUMP-${resultfile}-output-cmp
- COMMAND ${CMAKE_COMMAND}
- -E compare_files ${resultfile}.txt ${resultfile}.exp
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_TEST_EXPORT file)
-
- MACRO (ADD_H5_TEST_EXPORT_DDL resultfile targetfile resultcode ddlfile)
- # If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile})
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DUMP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${ddlfile}.txt ${resultfile}.txt ${resultfile}.out ${resultfile}.out.err
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
- NAME H5DUMP-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=--ddl=${ddlfile}.txt;${ARGN};${resultfile}.txt;${targetfile}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ADD_TEST (
- NAME H5DUMP-${resultfile}-output-cmp
- COMMAND ${CMAKE_COMMAND}
- -E compare_files ${resultfile}.txt ${resultfile}.exp
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
- ADD_TEST (
- NAME H5DUMP-${resultfile}-output-cmp-ddl
- COMMAND ${CMAKE_COMMAND}
- -E compare_files ${ddlfile}.txt ${ddlfile}.exp
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_TEST_EXPORT_DDL file)
-
- MACRO (ADD_H5_EXPORT_TEST resultfile targetfile resultcode)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DUMP-output-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}.txt
- )
- SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
- NAME H5DUMP-output-${resultfile}
- COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${resultfile}.txt ${targetfile}
- )
- SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}-clear-objects)
- ADD_TEST (
- NAME H5DUMP-output-cmp-${resultfile}
- COMMAND ${CMAKE_COMMAND}
- -E compare_files ${resultfile}.txt ${resultfile}.exp
- )
- SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile})
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_EXPORT_TEST file)
-
- MACRO (ADD_H5_MASK_TEST resultfile resultcode)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DUMP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}.out ${resultfile}.out.err
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
- NAME H5DUMP-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.ddl"
- -D "TEST_MASK_ERROR=true"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_MASK_TEST file)
-
- MACRO (ADD_H5ERR_MASK_TEST resultfile resultcode)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DUMP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}.out ${resultfile}.out.err
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
- NAME H5DUMP-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.ddl"
- -D "TEST_ERRREF=${resultfile}.err"
- -D "TEST_MASK_ERROR=true"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5ERR_MASK_TEST file)
-
- MACRO (ADD_H5ERR_MASK_ENV_TEST resultfile resultcode envvar envval)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DUMP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}.out ${resultfile}.out.err
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
- NAME H5DUMP-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.ddl"
- -D "TEST_ERRREF=${resultfile}.err"
- -D "TEST_MASK_ERROR=true"
- -D "TEST_ENV_VAR:STRING=${envvar}"
- -D "TEST_ENV_VALUE:STRING=${envval}"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5ERR_MASK_ENV_TEST)
-
- MACRO (ADD_H5_TEST_IMPORT conffile resultfile testfile resultcode)
- # If using memchecker add tests without using scripts
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DUMP-IMPORT-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${conffile}.out ${conffile}.out.err ${resultfile}.bin ${resultfile}.h5
- )
- SET_TESTS_PROPERTIES (H5DUMP-IMPORT-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- ADD_TEST (
- NAME H5DUMP-IMPORT-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=${ARGN};-o;${resultfile}.bin;${testfile}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
- -D "TEST_OUTPUT=${conffile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${conffile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5DUMP-IMPORT-${resultfile} PROPERTIES DEPENDS "H5DUMP-IMPORT-${resultfile}-clear-objects")
- ADD_TEST (NAME H5DUMP-IMPORT-h5import-${resultfile} COMMAND h5import ${resultfile}.bin -c ${conffile}.out -o ${resultfile}.h5)
- SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-${resultfile})
- ADD_TEST (NAME H5DUMP-IMPORT-h5diff-${resultfile} COMMAND h5diff ${testfile} ${resultfile}.h5 /integer /integer)
- SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-h5import-${resultfile})
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_TEST_IMPORT file)
-
- MACRO (ADD_H5_PBITS_TEST resultfile resultcode)
- # If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_pbits_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test})
- ENDIF (NOT "${last_pbits_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DUMP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}.out ${resultfile}.out.err
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
- ADD_TEST (
- NAME H5DUMP-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/pbits"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_PBITS_TEST file)
-
- MACRO (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DUMP-XML-${skipresultfile}-SKIPPED
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${skipresultfile}.xml --xml ${ARGN}"
- )
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ELSE (${testtype} STREQUAL "SKIP")
- ADD_XML_H5_TEST (${skipresultfile} ${skipresultcode} ${ARGN})
- ENDIF (${testtype} STREQUAL "SKIP")
- ENDMACRO (ADD_XML_SKIP_H5_TEST)
-
- MACRO (ADD_XML_H5_TEST resultfile resultcode)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5DUMP-XML-${resultfile} COMMAND $<TARGET_FILE:h5dump> --xml ${ARGN})
- SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_xml_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test})
- ENDIF (NOT "${last_xml_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5DUMP-XML-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}.out ${resultfile}.out.err
- )
- SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
- ADD_TEST (
- NAME H5DUMP-XML-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=--xml;${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/xml"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.xml"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS "H5DUMP-XML-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_XML_H5_TEST file)
-
-##############################################################################
-##############################################################################
-### T H E T E S T S HDF5_ENABLE_USING_MEMCHECKER ###
-##############################################################################
-##############################################################################
-
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5DUMP-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- h5dump-help.out
- charsets.out
- charsets.out.err
- file_space.out
- file_space.out.err
- filter_fail.out
- filter_fail.out.err
- 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-2A0.out
- tall-2A0.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
- tall-6.txt
- tall-6.out
- tall-6.out.err
- tall-7.out
- tall-7.out.err
- tall-7N.out
- tall-7N.out.err
- tallfilters.out
- tallfilters.out.err
- tarray1.out
- tarray1.out.err
- tarray1_big.out
- tarray1_big.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
- tattr-4_be.out
- tattr-4_be.out.err
- tattrcontents1.out
- tattrcontents1.out.err
- tattrcontents2.out
- tattrcontents2.out.err
- tattrintsize.out
- tattrintsize.out.err
- tattrreg.out
- tattrreg.out.err
- tattrregR.out
- tattrregR.out.err
- tbin1LE.bin
- tbinregR.txt
- 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
- tcmpdattrintsize.out
- tcmpdattrintsize.out.err
- tcmpdintsize.out
- tcmpdintsize.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
- texceedsubstart.out
- texceedsubstart.out.err
- texceedsubcount.out
- texceedsubcount.out.err
- texceedsubstride.out
- texceedsubstride.out.err
- texceedsubblock.out
- texceedsubblock.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
- tmultifile.out
- tmultifile.out.err
-# tqmarkfile.out
-# tqmarkfile.out.err
-# tstarfile.out
-# tstarfile.out.err
- tnamed_dtype_attr.out
- tnamed_dtype_attr.out.err
- tnestcomp-1.out
- tnestcomp-1.out.err
- tnestedcmpddt.out
- tnestedcmpddt.out.err
- tnbit.out
- tnbit.out.err
- tnoattrdata.out
- tnoattrdata.out.err
- tnoattrddl.out
- tnoattrddl.out.err
- tnodata.out
- tnodata.out.err
- tnoddl.out
- tnoddl.out.err
- tnoddlfile.out
- tnoddlfile.out.err
- trawdatafile.out
- trawdatafile.out.err
- trawdatafile.txt
- trawssetfile.out
- trawssetfile.out.err
- trawssetfile.txt
- tno-subset.out
- tno-subset.out.err
- tnullspace.out
- tnullspace.out.err
- zerodim.out
- zerodim.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
- tordercontents1.out
- tordercontents1.out.err
- tordercontents2.out
- tordercontents2.out.err
- torderlinks1.out
- torderlinks1.out.err
- torderlinks2.out
- torderlinks2.out.err
- tperror.out
- tperror.out.err
- treference.out
- treference.out.err
- tsaf.out
- tsaf.out.err
- tscalarintsize.out
- tscalarintsize.out.err
- tscalarattrintsize.out
- tscalarattrintsize.out.err
- tscalarstring.out
- tscalarstring.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
- tslink-D.out
- tslink-D.out.err
- tsplit_file.out
- tsplit_file.out.err
- tstr-1.out
- tstr-1.out.err
- tstr-2.out
- tstr-2.out.err
- tstr2bin2.txt
- tstr2bin6.txt
- 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
- twidedisplay.out
- twidedisplay.out.err
- twithddl.txt
- twithddlfile.out
- twithddlfile.out.err
- twithddlfile.txt
- )
- SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5DUMP-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
- ADD_HELP_TEST(help 0 -h)
-
- # test data output redirection
- #ADD_H5_TEST (tnoddl 0 --enable-error-stack -O -y packedbits.h5)
- ADD_H5_TEST (tnoddl 0 --enable-error-stack --ddl -y packedbits.h5)
- #ADD_H5_TEST (tnodata 0 --enable-error-stack -o packedbits.h5)
- ADD_H5_TEST (tnodata 0 --enable-error-stack --output packedbits.h5)
- ADD_H5_TEST (tnoattrddl 0 --enable-error-stack -O -y tattr.h5)
- ADD_H5_TEST (tnoattrdata 0 --enable-error-stack -A -o tattr.h5)
- ADD_H5_TEST_EXPORT (trawdatafile packedbits.h5 0 --enable-error-stack -y -o)
- ADD_H5_TEST_EXPORT (tnoddlfile packedbits.h5 0 --enable-error-stack -O -y -o)
- ADD_H5_TEST_EXPORT (trawssetfile tdset.h5 0 --enable-error-stack -d "/dset1[1,1;;;]" -y -o)
-
- ADD_H5_TEST_EXPORT_DDL (twithddlfile packedbits.h5 0 twithddl --enable-error-stack --ddl=twithddl.txt -y -o)
-
- # test for maximum display datasets
- ADD_H5_TEST (twidedisplay 0 --enable-error-stack -w0 packedbits.h5)
-
- # test for signed/unsigned datasets
- ADD_H5_TEST (packedbits 0 --enable-error-stack packedbits.h5)
- # test for compound signed/unsigned datasets
- ADD_H5_TEST (tcmpdintsize 0 --enable-error-stack tcmpdintsize.h5)
- # test for signed/unsigned scalar datasets
- ADD_H5_TEST (tscalarintsize 0 --enable-error-stack tscalarintsize.h5)
- # test for signed/unsigned attributes
- ADD_H5_TEST (tattrintsize 0 --enable-error-stack tattrintsize.h5)
- # test for compound signed/unsigned attributes
- ADD_H5_TEST (tcmpdattrintsize 0 --enable-error-stack tcmpdattrintsize.h5)
- # test for signed/unsigned scalar attributes
- ADD_H5_TEST (tscalarattrintsize 0 --enable-error-stack tscalarattrintsize.h5)
- # test for string scalar dataset and attribute
- ADD_H5_TEST (tscalarstring 0 --enable-error-stack tscalarstring.h5)
- # test for displaying groups
- ADD_H5_TEST (tgroup-1 0 --enable-error-stack tgroup.h5)
- # test for displaying the selected groups
- ADD_H5ERR_MASK_TEST (tgroup-2 1 --enable-error-stack --group=/g2 --group / -g /y tgroup.h5)
-
- # test for displaying simple space datasets
- ADD_H5_TEST (tdset-1 0 --enable-error-stack tdset.h5)
- # test for displaying selected datasets
- ADD_H5ERR_MASK_TEST (tdset-2 1 --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 tdset.h5)
-
- # test for displaying attributes
- ADD_H5_TEST (tattr-1 0 --enable-error-stack tattr.h5)
- # test for displaying the selected attributes of string type and scalar space
- ADD_H5_TEST (tattr-2 0 --enable-error-stack -a /\\\\/attr1 --attribute /attr4 --attribute=/attr5 tattr.h5)
- ADD_H5_TEST_N (tattr-2 0 --enable-error-stack -N /\\\\/attr1 --any_path /attr4 --any_path=/attr5 tattr.h5)
- # test for header and error messages
- ADD_H5ERR_MASK_TEST (tattr-3 1 --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5)
- # test for displaying attributes in shared datatype (also in group and dataset)
- ADD_H5_TEST (tnamed_dtype_attr 0 --enable-error-stack tnamed_dtype_attr.h5)
- # test for displaying at least 9 attributes on root from a be machine
- ADD_H5_TEST (tattr-4_be 0 --enable-error-stack tattr4_be.h5)
-
- # test for displaying soft links and user-defined links
- ADD_H5_TEST (tslink-1 0 --enable-error-stack tslink.h5)
- ADD_H5_TEST (tudlink-1 0 --enable-error-stack tudlink.h5)
- # test for displaying the selected link
- ADD_H5_TEST (tslink-2 0 --enable-error-stack -l slink2 tslink.h5)
- ADD_H5_TEST_N (tslink-2 0 --enable-error-stack -N slink2 tslink.h5)
- ADD_H5_TEST (tudlink-2 0 --enable-error-stack -l udlink2 tudlink.h5)
- # test for displaying dangling soft links
- ADD_H5ERR_MASK_TEST (tslink-D 0 --enable-error-stack -d /slink1 tslink.h5)
-
- # tests for hard links
- ADD_H5_TEST (thlink-1 0 --enable-error-stack thlink.h5)
- ADD_H5_TEST (thlink-2 0 --enable-error-stack -d /g1/dset2 --dataset /dset1 --dataset=/g1/g1.1/dset3 thlink.h5)
- ADD_H5_TEST (thlink-3 0 --enable-error-stack -d /g1/g1.1/dset3 --dataset /g1/dset2 --dataset=/dset1 thlink.h5)
- ADD_H5_TEST (thlink-4 0 --enable-error-stack -g /g1 thlink.h5)
- ADD_H5_TEST_N (thlink-4 0 --enable-error-stack -N /g1 thlink.h5)
- ADD_H5_TEST (thlink-5 0 --enable-error-stack -d /dset1 -g /g2 -d /g1/dset2 thlink.h5)
- ADD_H5_TEST_N (thlink-5 0 --enable-error-stack -N /dset1 -N /g2 -N /g1/dset2 thlink.h5)
-
- # tests for compound data types
- ADD_H5_TEST (tcomp-1 0 --enable-error-stack tcompound.h5)
- # test for named data types
- ADD_H5_TEST (tcomp-2 0 --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5)
- ADD_H5_TEST_N (tcomp-2 0 --enable-error-stack -N /type1 --any_path /type2 --any_path=/group1/type3 tcompound.h5)
- # test for unamed type
- ADD_H5ERR_MASK_TEST (tcomp-3 0 "--enable-error-stack;-t;/#6632;-g;/group2;tcompound.h5")
- # test complicated compound datatype
- ADD_H5_TEST (tcomp-4 0 --enable-error-stack tcompound_complex.h5)
-
- #test for the nested compound type
- ADD_H5_TEST (tnestcomp-1 0 --enable-error-stack tnestedcomp.h5)
- ADD_H5_TEST (tnestedcmpddt 0 --enable-error-stack tnestedcmpddt.h5)
-
- # test for options
- ADD_H5ERR_MASK_TEST (tall-1 0 --enable-error-stack tall.h5)
- ADD_H5_TEST (tall-2 0 --enable-error-stack --header -g /g1/g1.1 -a attr2 tall.h5)
- ADD_H5_TEST (tall-3 0 --enable-error-stack -d /g2/dset2.1 -l /g1/g1.2/g1.2.1/slink tall.h5)
- ADD_H5_TEST_N (tall-3 0 --enable-error-stack -N /g2/dset2.1 -N /g1/g1.2/g1.2.1/slink tall.h5)
- ADD_H5_TEST (tall-7 0 --enable-error-stack -a attr1 tall.h5)
- ADD_H5_TEST (tall-7N 0 --enable-error-stack -N attr1 tall.h5)
-
- # test for loop detection
- ADD_H5_TEST (tloop-1 0 --enable-error-stack tloop.h5)
-
- # test for string
- ADD_H5_TEST (tstr-1 0 --enable-error-stack tstr.h5)
- ADD_H5_TEST (tstr-2 0 --enable-error-stack tstr2.h5)
-
- # test for file created by Lib SAF team
- ADD_H5_TEST (tsaf 0 --enable-error-stack tsaf.h5)
-
- # test for file with variable length data
- ADD_H5_TEST (tvldtypes1 0 --enable-error-stack tvldtypes1.h5)
- ADD_H5_TEST (tvldtypes2 0 --enable-error-stack tvldtypes2.h5)
- ADD_H5_TEST (tvldtypes3 0 --enable-error-stack tvldtypes3.h5)
- ADD_H5_TEST (tvldtypes4 0 --enable-error-stack tvldtypes4.h5)
- ADD_H5_TEST (tvldtypes5 0 --enable-error-stack tvldtypes5.h5)
-
- #test for file with variable length string data
- ADD_H5_TEST (tvlstr 0 --enable-error-stack tvlstr.h5)
-
- # test for files with array data
- ADD_H5_TEST (tarray1 0 --enable-error-stack tarray1.h5)
- # # added for bug# 2092 - tarray1_big.h5
- ADD_H5ERR_MASK_TEST (tarray1_big 0 --enable-error-stack -R tarray1_big.h5)
- ADD_H5_TEST (tarray2 0 --enable-error-stack tarray2.h5)
- ADD_H5_TEST (tarray3 0 --enable-error-stack tarray3.h5)
- ADD_H5_TEST (tarray4 0 --enable-error-stack tarray4.h5)
- ADD_H5_TEST (tarray5 0 --enable-error-stack tarray5.h5)
- ADD_H5_TEST (tarray6 0 --enable-error-stack tarray6.h5)
- ADD_H5_TEST (tarray7 0 --enable-error-stack tarray7.h5)
- ADD_H5_TEST (tarray8 0 --enable-error-stack tarray8.h5)
-
- # test for wildcards in filename (does not work with cmake)
- #ADD_H5_MASK_TEST (tstarfile 0 --enable-error-stack -H -d Dataset1 tarr*.h5)
- #ADD_H5_MASK_TEST (tqmarkfile 0 --enable-error-stack -H -d Dataset1 tarray?.h5)
- ADD_H5_TEST (tmultifile 0 --enable-error-stack -H -d Dataset1 tarray2.h5 tarray3.h5 tarray4.h5 tarray5.h5 tarray6.h5 tarray7.h5)
-
- # test for files with empty data
- ADD_H5_TEST (tempty 0 --enable-error-stack tempty.h5)
-
- # test for files with groups that have comments
- ADD_H5_TEST (tgrp_comments 0 --enable-error-stack tgrp_comments.h5)
-
- # test the --filedriver flag
- ADD_H5_TEST (tsplit_file 0 --enable-error-stack --filedriver=split tsplit_file)
- ADD_H5_TEST (tfamily 0 --enable-error-stack --filedriver=family tfamily%05d.h5)
- ADD_H5_TEST (tmulti 0 --enable-error-stack --filedriver=multi tmulti)
-
- # test for files with group names which reach > 1024 bytes in size
- ADD_H5_TEST (tlarge_objname 0 --enable-error-stack -w157 tlarge_objname.h5)
-
- # test '-A' to suppress data but print attr's
- ADD_H5ERR_MASK_TEST (tall-2A 0 --enable-error-stack -A tall.h5)
-
- # test '-A' to suppress attr's but print data
- ADD_H5ERR_MASK_TEST (tall-2A0 0 --enable-error-stack -A 0 tall.h5)
-
- # test '-r' to print attributes in ASCII instead of decimal
- ADD_H5ERR_MASK_TEST (tall-2B 0 --enable-error-stack -A -r tall.h5)
-
- # test Subsetting
- ADD_H5_TEST (tall-4s 0 --enable-error-stack --dataset=/g1/g1.1/dset1.1.1 --start=1,1 --stride=2,3 --count=3,2 --block=1,1 tall.h5)
- ADD_H5_TEST (tall-5s 0 --enable-error-stack -d "/g1/g1.1/dset1.1.2[0;2;10;]" tall.h5)
- ADD_H5_TEST (tdset-3s 0 --enable-error-stack -d "/dset1[1,1;;;]" tdset.h5)
- ADD_H5_TEST (tno-subset 0 --enable-error-stack --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" tno-subset.h5)
-
- # test printing characters in ASCII instead of decimal
- ADD_H5_TEST (tchar1 0 --enable-error-stack -r tchar.h5)
-
- # test datatypes in ASCII and UTF8
- ADD_H5_TEST (charsets 0 --enable-error-stack charsets.h5)
-
- # rev. 2004
- # tests for super block
- ADD_H5_TEST (tboot1 0 --enable-error-stack -H -B -d dset tfcontents1.h5)
- ADD_H5_TEST (tboot2 0 --enable-error-stack -B tfcontents2.h5)
- ADD_H5_TEST (file_space 0 --enable-error-stack -B file_space.h5)
-
- # test -p with a non existing dataset
- ADD_H5ERR_MASK_TEST (tperror 1 --enable-error-stack -p -d bogus tfcontents1.h5)
-
- # test for file contents
- ADD_H5_TEST (tcontents 0 --enable-error-stack -n tfcontents1.h5)
- ADD_H5_TEST (tordercontents1 0 --enable-error-stack -n --sort_by=name --sort_order=ascending tfcontents1.h5)
- ADD_H5_TEST (tordercontents2 0 --enable-error-stack -n --sort_by=name --sort_order=descending tfcontents1.h5)
- ADD_H5_TEST (tattrcontents1 0 --enable-error-stack -n 1 --sort_order=ascending tall.h5)
- ADD_H5_TEST (tattrcontents2 0 --enable-error-stack -n 1 --sort_order=descending tall.h5)
-
- # tests for storage layout
- # compact
- ADD_H5_TEST (tcompact 0 --enable-error-stack -H -p -d compact tfilters.h5)
- # contiguous
- ADD_H5_TEST (tcontiguos 0 --enable-error-stack -H -p -d contiguous tfilters.h5)
- # chunked
- ADD_H5_TEST (tchunked 0 --enable-error-stack -H -p -d chunked tfilters.h5)
- # external
- ADD_H5_TEST (texternal 0 --enable-error-stack -H -p -d external tfilters.h5)
-
- # fill values
- ADD_H5_TEST (tfill 0 --enable-error-stack -p tfvalues.h5)
-
- # several datatype, with references , print path
- ADD_H5_TEST (treference 0 --enable-error-stack tattr2.h5)
-
- # escape/not escape non printable characters
- ADD_H5_TEST (tstringe 0 --enable-error-stack -e tstr3.h5)
- ADD_H5_TEST (tstring 0 --enable-error-stack tstr3.h5)
- # char data as ASCII with non escape
- ADD_H5_TEST (tstring2 0 --enable-error-stack -r -d str4 tstr3.h5)
-
- # array indices print/not print
- ADD_H5_TEST (tindicesyes 0 --enable-error-stack taindices.h5)
- ADD_H5_TEST (tindicesno 0 --enable-error-stack -y taindices.h5)
-
- ########## array indices with subsetting
- # 1D case
- ADD_H5_TEST (tindicessub1 0 --enable-error-stack -d 1d -s 1 -S 10 -c 2 -k 3 taindices.h5)
-
- # 2D case
- ADD_H5_TEST (tindicessub2 0 --enable-error-stack -d 2d -s 1,2 -S 3,3 -c 3,2 -k 2,2 taindices.h5)
-
- # 3D case
- ADD_H5_TEST (tindicessub3 0 --enable-error-stack -d 3d -s 0,1,2 -S 1,3,3 -c 2,2,2 -k 1,2,2 taindices.h5)
-
- # 4D case
- ADD_H5_TEST (tindicessub4 0 --enable-error-stack -d 4d -s 0,0,1,2 -c 2,2,3,2 -S 1,1,3,3 -k 1,1,2,2 taindices.h5)
-
- # Exceed the dimensions for subsetting
- ADD_H5_TEST (texceedsubstart 1 --enable-error-stack -d 1d -s 1,3 taindices.h5)
- ADD_H5_TEST (texceedsubcount 1 --enable-error-stack -d 1d -c 1,3 taindices.h5)
- ADD_H5_TEST (texceedsubstride 1 --enable-error-stack -d 1d -S 1,3 taindices.h5)
- ADD_H5_TEST (texceedsubblock 1 --enable-error-stack -d 1d -k 1,3 taindices.h5)
-
- # tests for filters
- # SZIP
- ADD_H5_TEST (tszip 0 --enable-error-stack -H -p -d szip tfilters.h5)
-
- # deflate
- ADD_H5_TEST (tdeflate 0 --enable-error-stack -H -p -d deflate tfilters.h5)
-
- # shuffle
- ADD_H5_TEST (tshuffle 0 --enable-error-stack -H -p -d shuffle tfilters.h5)
-
- # fletcher32
- ADD_H5_TEST (tfletcher32 0 --enable-error-stack -H -p -d fletcher32 tfilters.h5)
-
- # nbit
- ADD_H5_TEST (tnbit 0 --enable-error-stack -H -p -d nbit tfilters.h5)
-
- # scaleoffset
- ADD_H5_TEST (tscaleoffset 0 --enable-error-stack -H -p -d scaleoffset tfilters.h5)
-
- # all
- ADD_H5_TEST (tallfilters 0 --enable-error-stack -H -p -d all tfilters.h5)
-
- # user defined
- ADD_H5_TEST (tuserfilter 0 --enable-error-stack -H -p -d myfilter tfilters.h5)
-
- # test for displaying objects with very long names
- ADD_H5_TEST (tlonglinks 0 --enable-error-stack tlonglinks.h5)
-
- # dimensions over 4GB, print boundary
- ADD_H5_TEST (tbigdims 0 --enable-error-stack -d dset4gb -s 4294967284 -c 22 tbigdims.h5)
-
- # hyperslab read
- ADD_H5_TEST (thyperslab 0 --enable-error-stack thyperslab.h5)
-
- # test for displaying dataset and attribute of null space
- ADD_H5_TEST (tnullspace 0 --enable-error-stack tnullspace.h5)
-
- # test for displaying dataset and attribute of space with 0 dimension size
- ADD_H5_TEST (zerodim 0 --enable-error-stack zerodim.h5)
-
- # test for long double (some systems do not have long double)
- #ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5)
-
- # test for vms
- ADD_H5_TEST (tvms 0 --enable-error-stack tvms.h5)
-
- # test for binary output
- ADD_H5_TEST (tbin1LE 0 --enable-error-stack -d integer -o tbin1LE.bin -b LE tbinary.h5)
-
- # test for string binary output
- ADD_H5_EXPORT_TEST (tstr2bin2 tstr2.h5 0 --enable-error-stack -d /g2/dset2 -b -o)
- ADD_H5_EXPORT_TEST (tstr2bin6 tstr2.h5 0 --enable-error-stack -d /g6/dset6 -b -o)
-
- # NATIVE default. the NATIVE test can be validated with h5import/h5diff
- ADD_H5_TEST_IMPORT (tbin1 out1D tbinary.h5 0 --enable-error-stack -d integer -b)
-
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_H5_TEST (tbin2 0 --enable-error-stack -b BE -d float -o tbin2.bin tbinary.h5)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
-
- # the NATIVE test can be validated with h5import/h5diff
- ADD_H5_TEST_IMPORT (tbin3 out3D tbinary.h5 0 --enable-error-stack -d integer -b NATIVE)
-
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_H5_TEST (tbin4 0 --enable-error-stack -d double -b FILE -o tbin4.bin tbinary.h5)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
-
- # test for dataset region references
- ADD_H5_TEST (tdatareg 0 --enable-error-stack tdatareg.h5)
- ADD_H5ERR_MASK_TEST (tdataregR 0 --enable-error-stack -R tdatareg.h5)
- ADD_H5ERR_MASK_TEST (tattrregR 0 -R --enable-error-stack tattrreg.h5)
- ADD_H5_EXPORT_TEST (tbinregR tdatareg.h5 0 --enable-error-stack -d /Dataset1 -s 0 -R -y -o)
-
- # tests for group creation order
- # "1" tracked, "2" name, root tracked
- ADD_H5_TEST (tordergr1 0 --enable-error-stack --group=1 --sort_by=creation_order --sort_order=ascending tordergr.h5)
- ADD_H5_TEST (tordergr2 0 --enable-error-stack --group=1 --sort_by=creation_order --sort_order=descending tordergr.h5)
- ADD_H5_TEST (tordergr3 0 --enable-error-stack -g 2 -q name -z ascending tordergr.h5)
- ADD_H5_TEST (tordergr4 0 --enable-error-stack -g 2 -q name -z descending tordergr.h5)
- ADD_H5_TEST (tordergr5 0 --enable-error-stack -q creation_order tordergr.h5)
-
- # tests for attribute order
- ADD_H5_TEST (torderattr1 0 --enable-error-stack -H --sort_by=name --sort_order=ascending torderattr.h5)
- ADD_H5_TEST (torderattr2 0 --enable-error-stack -H --sort_by=name --sort_order=descending torderattr.h5)
- ADD_H5_TEST (torderattr3 0 --enable-error-stack -H --sort_by=creation_order --sort_order=ascending torderattr.h5)
- ADD_H5_TEST (torderattr4 0 --enable-error-stack -H --sort_by=creation_order --sort_order=descending torderattr.h5)
-
- # tests for link references and order
- ADD_H5ERR_MASK_TEST (torderlinks1 0 --enable-error-stack --sort_by=name --sort_order=ascending tfcontents1.h5)
- ADD_H5ERR_MASK_TEST (torderlinks2 0 --enable-error-stack --sort_by=name --sort_order=descending tfcontents1.h5)
-
- # tests for floating point user defined printf format
- ADD_H5_TEST (tfpformat 0 --enable-error-stack -m %.7f tfpformat.h5)
-
- # tests for traversal of external links
- ADD_H5ERR_MASK_TEST (textlinksrc 0 --enable-error-stack textlinksrc.h5)
- ADD_H5ERR_MASK_TEST (textlinkfar 0 --enable-error-stack textlinkfar.h5)
-
- # test for dangling external links
- ADD_H5ERR_MASK_TEST (textlink 0 --enable-error-stack textlink.h5)
-
- # test for error stack display (BZ2048)
- ADD_H5ERR_MASK_ENV_TEST (filter_fail 1 "HDF5_PLUGIN_PRELOAD" "::" --enable-error-stack filter_fail.h5)
-
- # test for -o -y for dataset with attributes
- ADD_H5_TEST_EXPORT (tall-6 tall.h5 0 --enable-error-stack -d /g1/g1.1/dset1.1.1 -y -o)
-
- ####### test for dataset packed bits ######
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5DUMP_PACKED_BITS-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- tnofilename-with-packed-bits.out
- tnofilename-with-packed-bits.out.err
- tpbitsArray.out
- tpbitsArray.out.err
- tpbitsCompound.out
- tpbitsCompound.out.err
- tpbitsIncomplete.out
- tpbitsIncomplete.out.err
- tpbitsLengthExceeded.out
- tpbitsLengthExceeded.out.err
- tpbitsCharLengthExceeded.out
- tpbitsCharLengthExceeded.out.err
- tpbitsIntLengthExceeded.out
- tpbitsIntLengthExceeded.out.err
- tpbitsLongLengthExceeded.out
- tpbitsLongLengthExceeded.out.err
- tpbitsLengthPositive.out
- tpbitsLengthPositive.out.err
- tpbitsMax.out
- tpbitsMax.out.err
- tpbitsMaxExceeded.out
- tpbitsMaxExceeded.out.err
- tpbitsOffsetExceeded.out
- tpbitsOffsetExceeded.out.err
- tpbitsCharOffsetExceeded.out
- tpbitsCharOffsetExceeded.out.err
- tpbitsIntOffsetExceeded.out
- tpbitsIntOffsetExceeded.out.err
- tpbitsLongOffsetExceeded.out
- tpbitsLongOffsetExceeded.out.err
- tpbitsOffsetNegative.out
- tpbitsOffsetNegative.out.err
- tpbitsOverlapped.out
- tpbitsOverlapped.out.err
- tpbitsSigned.out
- tpbitsSigned.out.err
- tpbitsUnsigned.out
- tpbitsUnsigned.out.err
- tpbitsSignedInt.out
- tpbitsSignedInt.out.err
- tpbitsUnsignedInt.out
- tpbitsUnsignedInt.out.err
- tpbitsSignedLong.out
- tpbitsSignedLong.out.err
- tpbitsUnsignedLong.out
- tpbitsUnsignedLong.out.err
- tpbitsSignedLongLong.out
- tpbitsSignedLongLong.out.err
- tpbitsUnsignedLongLong.out
- tpbitsUnsignedLongLong.out.err
- tpbitsSignedWhole.out
- tpbitsSignedWhole.out.err
- tpbitsUnsignedWhole.out
- tpbitsUnsignedWhole.out.err
- tpbitsSignedIntWhole.out
- tpbitsSignedIntWhole.out.err
- tpbitsUnsignedIntWhole.out
- tpbitsUnsignedIntWhole.out.err
- tpbitsSignedLongWhole.out
- tpbitsSignedLongWhole.out.err
- tpbitsUnsignedLongWhole.out
- tpbitsUnsignedLongWhole.out.err
- tpbitsSignedLongLongWhole.out
- tpbitsSignedLongLongWhole.out.err
- tpbitsUnsignedLongLongWhole.out
- tpbitsUnsignedLongLongWhole.out.err
- tpbitsSignedLongLongWhole1.out
- tpbitsSignedLongLongWhole1.out.err
- tpbitsUnsignedLongLongWhole1.out
- tpbitsUnsignedLongLongWhole1.out.err
- tpbitsSignedLongLongWhole63.out
- tpbitsSignedLongLongWhole63.out.err
- tpbitsUnsignedLongLongWhole63.out
- tpbitsUnsignedLongLongWhole63.out.err
- tpbitsSigned4.out
- tpbitsSigned4.out.err
- tpbitsUnsigned4.out
- tpbitsUnsigned4.out.err
- tpbitsSignedInt8.out
- tpbitsSignedInt8.out.err
- tpbitsUnsignedInt8.out
- tpbitsUnsignedInt8.out.err
- tpbitsSignedLong16.out
- tpbitsSignedLong16.out.err
- tpbitsUnsignedLong16.out
- tpbitsUnsignedLong16.out.err
- tpbitsSignedLongLong32.out
- tpbitsSignedLongLong32.out.err
- tpbitsUnsignedLongLong32.out
- tpbitsUnsignedLongLong32.out.err
- tpbitsSigned2.out
- tpbitsSigned2.out.err
- tpbitsUnsigned2.out
- tpbitsUnsigned2.out.err
- tpbitsSignedInt4.out
- tpbitsSignedInt4.out.err
- tpbitsUnsignedInt4.out
- tpbitsUnsignedInt4.out.err
- tpbitsSignedLong8.out
- tpbitsSignedLong8.out.err
- tpbitsUnsignedLong8.out
- tpbitsUnsignedLong8.out.err
- tpbitsSignedLongLong16.out
- tpbitsSignedLongLong16.out.err
- tpbitsUnsignedLongLong16.out
- tpbitsUnsignedLongLong16.out.err
- )
- SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
- IF (NOT "${last_pbits_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_pbits_test})
- ENDIF (NOT "${last_pbits_test}" STREQUAL "")
- SET (last_pbits_test "H5DUMP_PACKED_BITS-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
- # test failure handling
- # Missing file name
- ADD_H5_PBITS_TEST (tnofilename-with-packed-bits 1 --enable-error-stack)
- # Limits:
- # Maximum number of packed bits is 8 (for now).
- # Maximum integer size is 8*sizeof(long long).
- # Maximun Offset is Maximum size - 1.
- # Maximum Offset+Length is Maximum size.
- # Tests:
- # Normal operation on both signed and unsigned int datasets.
- # Sanity check
- # Their rawdata output should be the same.
- ADD_H5_PBITS_TEST (tpbitsSignedWhole 0 --enable-error-stack -d /DS08BITS -M 0,8 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsignedWhole 0 --enable-error-stack -d /DU08BITS -M 0,8 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsSignedIntWhole 0 --enable-error-stack -d /DS16BITS -M 0,16 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsignedIntWhole 0 --enable-error-stack -d /DU16BITS -M 0,16 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsSignedLongWhole 0 --enable-error-stack -d /DS32BITS -M 0,32 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsignedLongWhole 0 --enable-error-stack -d /DU32BITS -M 0,32 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsSignedLongLongWhole 0 --enable-error-stack -d /DS64BITS -M 0,64 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsignedLongLongWhole 0 --enable-error-stack -d /DU64BITS -M 0,64 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsSignedLongLongWhole63 0 --enable-error-stack -d /DS64BITS -M 0,63 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsignedLongLongWhole63 0 --enable-error-stack -d /DU64BITS -M 0,63 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsSignedLongLongWhole1 0 --enable-error-stack -d /DS64BITS -M 1,63 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsignedLongLongWhole1 0 --enable-error-stack -d /DU64BITS -M 1,63 packedbits.h5)
- # Half sections
- ADD_H5_PBITS_TEST (tpbitsSigned4 0 --enable-error-stack -d /DS08BITS -M 0,4,4,4 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsigned4 0 --enable-error-stack -d /DU08BITS -M 0,4,4,4 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsSignedInt8 0 --enable-error-stack -d /DS16BITS -M 0,8,8,8 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsignedInt8 0 --enable-error-stack -d /DU16BITS -M 0,8,8,8 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsSignedLong16 0 --enable-error-stack -d /DS32BITS -M 0,16,16,16 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsignedLong16 0 --enable-error-stack -d /DU32BITS -M 0,16,16,16 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsSignedLongLong32 0 --enable-error-stack -d /DS64BITS -M 0,32,32,32 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsignedLongLong32 0 --enable-error-stack -d /DU64BITS -M 0,32,32,32 packedbits.h5)
- # Quarter sections
- ADD_H5_PBITS_TEST (tpbitsSigned2 0 --enable-error-stack -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsigned2 0 --enable-error-stack -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsSignedInt4 0 --enable-error-stack -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsignedInt4 0 --enable-error-stack -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsSignedLong8 0 --enable-error-stack -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsignedLong8 0 --enable-error-stack -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsSignedLongLong16 0 --enable-error-stack -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsignedLongLong16 0 --enable-error-stack -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5)
- # Begin and End
- ADD_H5_PBITS_TEST (tpbitsSigned 0 --enable-error-stack -d /DS08BITS -M 0,2,2,6 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsigned 0 --enable-error-stack -d /DU08BITS -M 0,2,2,6 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsSignedInt 0 --enable-error-stack -d /DS16BITS -M 0,2,10,6 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsignedInt 0 --enable-error-stack -d /DU16BITS -M 0,2,10,6 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsSignedLong 0 --enable-error-stack -d /DS32BITS -M 0,2,26,6 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsignedLong 0 --enable-error-stack -d /DU32BITS -M 0,2,26,6 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsSignedLongLong 0 --enable-error-stack -d /DS64BITS -M 0,2,58,6 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsUnsignedLongLong 0 --enable-error-stack -d /DU64BITS -M 0,2,58,6 packedbits.h5)
- # Overlapped packed bits.
- ADD_H5_PBITS_TEST (tpbitsOverlapped 0 --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5)
- # Maximum number of packed bits.
- ADD_H5_PBITS_TEST (tpbitsMax 0 --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5)
- # Compound type.
- ADD_H5_PBITS_TEST (tpbitsCompound 0 --enable-error-stack -d /dset1 -M 0,1,1,1 tcompound.h5)
- # Array type.
- ADD_H5_PBITS_TEST (tpbitsArray 0 --enable-error-stack -d /Dataset1 -M 0,1,1,1 tarray1.h5)
- # Test Error handling.
- # Too many packed bits requested. Max is 8 for now.
- ADD_H5_PBITS_TEST (tpbitsMaxExceeded 1 --enable-error-stack -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5)
- # Offset too large. Max is 8*sizeof(long long.
- ADD_H5_PBITS_TEST (tpbitsOffsetExceeded 1 --enable-error-stack -d /DS08BITS -M 64,1 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsCharOffsetExceeded 0 --enable-error-stack -d /DS08BITS -M 8,1 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsIntOffsetExceeded 0 --enable-error-stack -d /DS16BITS -M 16,1 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsLongOffsetExceeded 0 --enable-error-stack -d /DS32BITS -M 32,1 packedbits.h5)
- # Bad offset, must not be negative.
- ADD_H5_PBITS_TEST (tpbitsOffsetNegative 1 --enable-error-stack -d /DS08BITS -M -1,1 packedbits.h5)
- # Bad length, must not be positive.
- ADD_H5_PBITS_TEST (tpbitsLengthPositive 1 --enable-error-stack -d /DS08BITS -M 4,0 packedbits.h5)
- # Offset+Length is too large. Max is 8*sizeof(long long).
- ADD_H5_PBITS_TEST (tpbitsLengthExceeded 1 --enable-error-stack -d /DS08BITS -M 37,28 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsCharLengthExceeded 0 --enable-error-stack -d /DS08BITS -M 2,7 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsIntLengthExceeded 0 --enable-error-stack -d /DS16BITS -M 10,7 packedbits.h5)
- ADD_H5_PBITS_TEST (tpbitsLongLengthExceeded 0 --enable-error-stack -d /DS32BITS -M 26,7 packedbits.h5)
- # Incomplete pair of packed bits request.
- ADD_H5_PBITS_TEST (tpbitsIncomplete 1 --enable-error-stack -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5)
-
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- # 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
- )
- SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
- IF (NOT "${last_xml_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_xml_test})
- ENDIF (NOT "${last_xml_test}" STREQUAL "")
- SET (last_test "H5DUMP-XML-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
- ########## test XML
- 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)
- ADD_XML_H5_TEST (tcompound.h5 0 tcompound.h5)
- ADD_XML_H5_TEST (tcompound2.h5 0 tcompound2.h5)
- ADD_XML_H5_TEST (tdatareg.h5 0 tdatareg.h5)
- ADD_XML_H5_TEST (tdset.h5 0 tdset.h5)
- ADD_XML_H5_TEST (tdset2.h5 0 tdset2.h5)
- ADD_XML_H5_TEST (tenum.h5 0 tenum.h5)
- ADD_XML_H5_TEST (tgroup.h5 0 tgroup.h5)
- ADD_XML_H5_TEST (thlink.h5 0 thlink.h5)
- ADD_XML_H5_TEST (tloop.h5 0 tloop.h5)
- ADD_XML_H5_TEST (tloop2.h5 0 tloop2.h5)
- ADD_XML_H5_TEST (tmany.h5 0 tmany.h5)
- ADD_XML_H5_TEST (tnestedcomp.h5 0 tnestedcomp.h5)
- ADD_XML_H5_TEST (tcompound_complex.h5 0 tcompound_complex.h5)
- ADD_XML_H5_TEST (tobjref.h5 0 tobjref.h5)
- ADD_XML_H5_TEST (topaque.h5 0 topaque.h5)
- ADD_XML_H5_TEST (tslink.h5 0 tslink.h5)
- ADD_XML_H5_TEST (tudlink.h5 0 tudlink.h5)
- ADD_XML_H5_TEST (textlink.h5 0 textlink.h5)
- ADD_XML_H5_TEST (tstr.h5 0 tstr.h5)
- ADD_XML_H5_TEST (tstr2.h5 0 tstr2.h5)
- ADD_XML_H5_TEST (tref.h5 0 tref.h5)
- ADD_XML_H5_TEST (tname-amp.h5 0 tname-amp.h5)
- ADD_XML_H5_TEST (tname-apos.h5 0 tname-apos.h5)
- ADD_XML_H5_TEST (tname-gt.h5 0 tname-gt.h5)
- ADD_XML_H5_TEST (tname-lt.h5 0 tname-lt.h5)
- ADD_XML_H5_TEST (tname-quot.h5 0 tname-quot.h5)
- ADD_XML_H5_TEST (tname-sp.h5 0 tname-sp.h5)
- ADD_XML_H5_TEST (tstring.h5 0 tstring.h5)
- ADD_XML_H5_TEST (tstring-at.h5 0 tstring-at.h5)
- ADD_XML_H5_TEST (tref-escapes.h5 0 tref-escapes.h5)
- ADD_XML_H5_TEST (tref-escapes-at.h5 0 tref-escapes-at.h5)
- ADD_XML_H5_TEST (tnodata.h5 0 tnodata.h5)
- ADD_XML_H5_TEST (tarray1.h5 0 tarray1.h5)
- ADD_XML_H5_TEST (tarray2.h5 0 tarray2.h5)
- ADD_XML_H5_TEST (tarray3.h5 0 tarray3.h5)
- ADD_XML_H5_TEST (tarray6.h5 0 tarray6.h5)
- ADD_XML_H5_TEST (tarray7.h5 0 tarray7.h5)
- ADD_XML_H5_TEST (tvldtypes1.h5 0 tvldtypes1.h5)
- ADD_XML_H5_TEST (tvldtypes2.h5 0 tvldtypes2.h5)
- ADD_XML_H5_TEST (tvldtypes3.h5 0 tvldtypes3.h5)
- ADD_XML_H5_TEST (tvldtypes4.h5 0 tvldtypes4.h5)
- ADD_XML_H5_TEST (tvldtypes5.h5 0 tvldtypes5.h5)
- ADD_XML_H5_TEST (tvlstr.h5 0 tvlstr.h5)
- ADD_XML_H5_TEST (tsaf.h5 0 tsaf.h5)
- ADD_XML_H5_TEST (tempty.h5 0 tempty.h5)
- ADD_XML_H5_TEST (tnamed_dtype_attr.h5 0 tnamed_dtype_attr.h5)
- ##Test dataset and attribute of null space. Commented out:
- ## wait until the XML schema is updated for null space.
- ## ADD_XML_H5_TEST (tnullspace.h5 0 tnulspace.h5)
- ## So is dataspace with 0 dimension size.
- ## ADD_XML_H5_TEST (zerodim.h5 0 zerodim.h5)
-
- # other options for xml
-
- ADD_XML_H5_TEST (tempty-dtd.h5 0 --use-dtd tempty.h5)
- ADD_XML_H5_TEST (tempty-dtd-2.h5 0 -u tempty.h5)
-
- # The lone colon here confuses some systems (Cray X1). Skip
- # it if configure detects that this is a problem.
- SET (TESTTYPE "TEST")
- IF (NOT "H5_LONE_COLON")
- SET (TESTTYPE "SKIP")
- ENDIF (NOT "H5_LONE_COLON")
- ADD_XML_SKIP_H5_TEST (tempty-nons.h5 0 ${TESTTYPE} -X : tempty.h5)
-
- ADD_XML_H5_TEST (tempty-nons-2.h5 0 --xml-ns=: tempty.h5)
-
- ## Some of these combinations are syntactically correct but
- ## the URLs are dummies
- ADD_XML_H5_TEST (tempty-ns.h5 0 -X thing: tempty.h5)
- ADD_XML_H5_TEST (tempty-ns-2.h5 0 --xml-ns=thing: tempty.h5)
- ADD_XML_H5_TEST (tempty-nons-uri.h5 0 --xml-ns=: --xml-dtd=http://somewhere.net tempty.h5)
- ADD_XML_H5_TEST (tempty-dtd-uri.h5 0 --use-dtd --xml-dtd=http://somewhere.net tempty.h5)
-
- ADD_XML_H5_TEST (tall-2A.h5 0 -A tall.h5)
+ INCLUDE (CMakeTests.cmake)
- # tests for attribute order
- ADD_XML_H5_TEST (torderattr1.h5 0 -H --sort_by=name --sort_order=ascending torderattr.h5)
- ADD_XML_H5_TEST (torderattr2.h5 0 -H --sort_by=name --sort_order=descending torderattr.h5)
- ADD_XML_H5_TEST (torderattr3.h5 0 -H --sort_by=creation_order --sort_order=ascending torderattr.h5)
- ADD_XML_H5_TEST (torderattr4.h5 0 -H --sort_by=creation_order --sort_order=descending torderattr.h5)
+ INCLUDE (CMakeTestsPBITS.cmake)
- # tests for floating point user defined printf format
- ADD_XML_H5_TEST (tfpformat.h5 0 -u -m %.7f tfpformat.h5)
-
+ INCLUDE (CMakeTestsXML.cmake)
ENDIF (BUILD_TESTING)
##############################################################################
diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake
new file mode 100644
index 0000000..026b6b2
--- /dev/null
+++ b/tools/h5dump/CMakeTests.cmake
@@ -0,0 +1,1367 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ # --------------------------------------------------------------------
+ # Copy all the HDF5 files from the test directory into the source directory
+ # --------------------------------------------------------------------
+ SET (HDF5_REFERENCE_FILES
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A0.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2B.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-4s.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-5s.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-6.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-7.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-7N.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tallfilters.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1_big.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray5.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray8.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr-4_be.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrcontents1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrcontents2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrintsize.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrregR.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbin4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbigdims.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tboot1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tboot2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tchunked.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompact.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcontents.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcontiguos.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdataregR.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdeflate.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-3s.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubstart.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubcount.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubstride.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/texceedsubblock.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/texternal.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinkfar.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfill.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfletcher32.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-5.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thyperslab.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicesno.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicessub4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tindicesyes.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tlarge_objname.ddl
+ #${HDF5_TOOLS_SRC_DIR}/testfiles/tldouble.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tlonglinks.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmultifile.ddl
+ #${HDF5_TOOLS_SRC_DIR}/testfiles/tqmarkfile.ddl
+ #${HDF5_TOOLS_SRC_DIR}/testfiles/tstarfile.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcmpddt.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnbit.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoattrdata.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoattrddl.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoddl.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnoddlfile.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/trawdatafile.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/trawssetfile.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr5.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordercontents2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderlinks1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderlinks2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tperror.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/treference.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarintsize.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarattrintsize.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarstring.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tscaleoffset.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tshuffle.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-D.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstringe.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tszip.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tuserfilter.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/twidedisplay.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/twithddlfile.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/h5dump-help.txt
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/out3.h5import
+ )
+ SET (HDF5_REFERENCE_EXP_FILES
+ tall-6.exp
+ tnoddlfile.exp
+ trawdatafile.exp
+ trawssetfile.exp
+ tstr2bin2.exp
+ tstr2bin6.exp
+ twithddl.exp
+ twithddlfile.exp
+ )
+ SET (HDF5_REFERENCE_TEST_FILES
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/charsets.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/file_space.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/filter_fail.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/taindices.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1_big.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray4.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray5.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray8.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr4_be.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrintsize.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbigdims.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinary.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tchar.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdattrintsize.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcmpdintsize.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinkfar.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinktar.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00000.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00001.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00002.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00003.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00004.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00005.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00006.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00007.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00008.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00009.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00010.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfcontents1.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfcontents2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfilters.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfvalues.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thyperslab.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tlarge_objname.h5
+ #${HDF5_TOOLS_SRC_DIR}/testfiles/tldouble.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tlonglinks.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-b.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-g.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-l.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-o.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-r.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmulti-s.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcmpddt.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tno-subset.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnullspace.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/zerodim.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tordergr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarintsize.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarattrintsize.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tscalarstring.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file-m.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsplit_file-r.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr3.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvms.h5
+ )
+ SET (HDF5_ERROR_REFERENCE_TEST_FILES
+ ${PROJECT_SOURCE_DIR}/errfiles/filter_fail.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tall-1.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tall-2A.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tall-2A0.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tall-2B.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tarray1_big.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tattrregR.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tattr-3.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tcomp-3.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tdataregR.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tdset-2.err
+ ${PROJECT_SOURCE_DIR}/errfiles/texceedsubblock.err
+ ${PROJECT_SOURCE_DIR}/errfiles/texceedsubcount.err
+ ${PROJECT_SOURCE_DIR}/errfiles/texceedsubstart.err
+ ${PROJECT_SOURCE_DIR}/errfiles/texceedsubstride.err
+ ${PROJECT_SOURCE_DIR}/errfiles/textlink.err
+ ${PROJECT_SOURCE_DIR}/errfiles/textlinkfar.err
+ ${PROJECT_SOURCE_DIR}/errfiles/textlinksrc.err
+ ${PROJECT_SOURCE_DIR}/errfiles/torderlinks1.err
+ ${PROJECT_SOURCE_DIR}/errfiles/torderlinks2.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tgroup-2.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tperror.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tslink-D.err
+ )
+
+ # make test dir
+ FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+
+ #
+ # copy test files from source dir to test dir
+ #
+ FOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
+ GET_FILENAME_COMPONENT(fname "${tst_h5_file}" NAME)
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
+ #MESSAGE (STATUS " Copying ${tst_h5_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${tst_h5_file} ${dest}
+ )
+ ENDFOREACH (tst_h5_file ${HDF5_REFERENCE_TEST_FILES})
+
+ FOREACH (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
+ IF (WIN32 AND NOT CYGWIN)
+ FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} TEST_STREAM)
+ FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}")
+ ELSE (WIN32 AND NOT CYGWIN)
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file}
+ )
+ ENDIF (WIN32 AND NOT CYGWIN)
+ ENDFOREACH (tst_exp_file ${HDF5_REFERENCE_EXP_FILES})
+
+ FOREACH (tst_other_file ${HDF5_REFERENCE_FILES})
+ GET_FILENAME_COMPONENT(fname "${tst_other_file}" NAME)
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
+ #MESSAGE (STATUS " Copying ${tst_other_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${tst_other_file} ${dest}
+ )
+ ENDFOREACH (tst_other_file ${HDF5_REFERENCE_FILES})
+
+ FOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
+ GET_FILENAME_COMPONENT(fname "${tst_error_file}" NAME)
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}")
+ #MESSAGE (STATUS " Copying ${tst_error_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${tst_error_file} ${dest}
+ )
+ ENDFOREACH (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES})
+
+ # --------------------------------------------------------------------
+ # Special file handling
+ # --------------------------------------------------------------------
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl
+ )
+
+ IF (WIN32 AND NOT CYGWIN)
+ FILE (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM)
+ FILE (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}")
+ ELSE (WIN32 AND NOT CYGWIN)
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp
+ )
+ ENDIF (WIN32 AND NOT CYGWIN)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ MACRO (ADD_HELP_TEST testname resultcode)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5DUMP-${testname} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
+ SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DUMP-${testname}")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-h5dump-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove h5dump-${testname}.out h5dump-${testname}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-h5dump-${testname}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-h5dump-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
+ -D "TEST_OUTPUT=h5dump-${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=h5dump-${testname}.txt"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-h5dump-${testname} PROPERTIES DEPENDS "H5DUMP-h5dump-${testname}-clear-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_HELP_TEST)
+
+ MACRO (ADD_SKIP_H5_TEST skipresultfile skipresultcode testtype)
+ IF (${testtype} STREQUAL "SKIP")
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-${skipresultfile}-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${skipresultfile} ${ARGN}"
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ELSE (${testtype} STREQUAL "SKIP")
+ ADD_H5_TEST (${skipresultfile} ${skipresultcode} ${ARGN})
+ ENDIF (${testtype} STREQUAL "SKIP")
+ ENDMACRO (ADD_SKIP_H5_TEST)
+
+ MACRO (ADD_H5_TEST resultfile resultcode)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ IF (NOT ${resultcode} STREQUAL "0")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT ${resultcode} STREQUAL "0")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.bin ${resultfile}.out ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_TEST file)
+
+ MACRO (ADD_H5_TEST_N resultfile resultcode)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5DUMP-N-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
+ SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ IF (NOT ${resultcode} STREQUAL "0")
+ SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT ${resultcode} STREQUAL "0")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-N-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}-N.bin ${resultfile}-N.out ${resultfile}-N.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-N-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
+ -D "TEST_OUTPUT=${resultfile}-N.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-N-${resultfile} PROPERTIES DEPENDS "H5DUMP-N-${resultfile}-clear-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_TEST_N file)
+
+ MACRO (ADD_H5_TEST_EXPORT resultfile targetfile resultcode)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${resultfile}.txt ${targetfile})
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ IF (NOT ${resultcode} STREQUAL "0")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT ${resultcode} STREQUAL "0")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.txt ${resultfile}.out ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN};${resultfile}.txt;${targetfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}-output-cmp
+ COMMAND ${CMAKE_COMMAND}
+ -E compare_files ${resultfile}.txt ${resultfile}.exp
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_TEST_EXPORT file)
+
+ MACRO (ADD_H5_TEST_EXPORT_DDL resultfile targetfile resultcode ddlfile)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> --ddl=${ddlfile}.txt ${ARGN} ${resultfile}.txt ${targetfile})
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ IF (NOT ${resultcode} STREQUAL "0")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT ${resultcode} STREQUAL "0")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${ddlfile}.txt ${resultfile}.txt ${resultfile}.out ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=--ddl=${ddlfile}.txt;${ARGN};${resultfile}.txt;${targetfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}-output-cmp
+ COMMAND ${CMAKE_COMMAND}
+ -E compare_files ${resultfile}.txt ${resultfile}.exp
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp PROPERTIES DEPENDS H5DUMP-${resultfile})
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}-output-cmp-ddl
+ COMMAND ${CMAKE_COMMAND}
+ -E compare_files ${ddlfile}.txt ${ddlfile}.exp
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-output-cmp-ddl PROPERTIES DEPENDS H5DUMP-${resultfile}-output-cmp)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_TEST_EXPORT_DDL file)
+
+ MACRO (ADD_H5_EXPORT_TEST resultfile targetfile resultcode)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-output-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.txt
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-output-${resultfile}
+ COMMAND $<TARGET_FILE:h5dump> ${ARGN} ${resultfile}.txt ${targetfile}
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-output-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile}-clear-objects)
+ ADD_TEST (
+ NAME H5DUMP-output-cmp-${resultfile}
+ COMMAND ${CMAKE_COMMAND}
+ -E compare_files ${resultfile}.txt ${resultfile}.exp
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-output-cmp-${resultfile} PROPERTIES DEPENDS H5DUMP-output-${resultfile})
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_EXPORT_TEST file)
+
+ MACRO (ADD_H5_MASK_TEST resultfile resultcode)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.out ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -D "TEST_MASK_ERROR=true"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_MASK_TEST file)
+
+ MACRO (ADD_H5ERR_MASK_TEST resultfile resultcode)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.out ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -D "TEST_ERRREF=${resultfile}.err"
+ -D "TEST_MASK_ERROR=true"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5ERR_MASK_TEST file)
+
+ MACRO (ADD_H5ERR_MASK_ENV_TEST resultfile resultcode envvar envval)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.out ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -D "TEST_ERRREF=${resultfile}.err"
+ -D "TEST_MASK_ERROR=true"
+ -D "TEST_ENV_VAR:STRING=${envvar}"
+ -D "TEST_ENV_VALUE:STRING=${envval}"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5ERR_MASK_ENV_TEST)
+
+ MACRO (ADD_H5_TEST_IMPORT conffile resultfile testfile resultcode)
+ # If using memchecker add tests without using scripts
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-IMPORT-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${conffile}.out ${conffile}.out.err ${resultfile}.bin ${resultfile}.h5
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-IMPORT-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ ADD_TEST (
+ NAME H5DUMP-IMPORT-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN};-o;${resultfile}.bin;${testfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/std"
+ -D "TEST_OUTPUT=${conffile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${conffile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-IMPORT-${resultfile} PROPERTIES DEPENDS "H5DUMP-IMPORT-${resultfile}-clear-objects")
+ ADD_TEST (NAME H5DUMP-IMPORT-h5import-${resultfile} COMMAND h5import ${resultfile}.bin -c ${conffile}.out -o ${resultfile}.h5)
+ SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5import-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-${resultfile})
+ ADD_TEST (NAME H5DUMP-IMPORT-h5diff-${resultfile} COMMAND h5diff ${testfile} ${resultfile}.h5 /integer /integer)
+ SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ SET_TESTS_PROPERTIES (H5DUMP-IMPORT-h5diff-${resultfile} PROPERTIES DEPENDS H5DUMP-IMPORT-h5import-${resultfile})
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_TEST_IMPORT file)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S HDF5_ENABLE_USING_MEMCHECKER ###
+##############################################################################
+##############################################################################
+
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5DUMP-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ h5dump-help.out
+ charsets.out
+ charsets.out.err
+ file_space.out
+ file_space.out.err
+ filter_fail.out
+ filter_fail.out.err
+ 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-2A0.out
+ tall-2A0.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
+ tall-6.txt
+ tall-6.out
+ tall-6.out.err
+ tall-7.out
+ tall-7.out.err
+ tall-7N.out
+ tall-7N.out.err
+ tallfilters.out
+ tallfilters.out.err
+ tarray1.out
+ tarray1.out.err
+ tarray1_big.out
+ tarray1_big.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
+ tattr-4_be.out
+ tattr-4_be.out.err
+ tattrcontents1.out
+ tattrcontents1.out.err
+ tattrcontents2.out
+ tattrcontents2.out.err
+ tattrintsize.out
+ tattrintsize.out.err
+ tattrreg.out
+ tattrreg.out.err
+ tattrregR.out
+ tattrregR.out.err
+ tbin1LE.bin
+ tbinregR.txt
+ 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
+ tcmpdattrintsize.out
+ tcmpdattrintsize.out.err
+ tcmpdintsize.out
+ tcmpdintsize.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
+ texceedsubstart.out
+ texceedsubstart.out.err
+ texceedsubcount.out
+ texceedsubcount.out.err
+ texceedsubstride.out
+ texceedsubstride.out.err
+ texceedsubblock.out
+ texceedsubblock.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
+ tmultifile.out
+ tmultifile.out.err
+# tqmarkfile.out
+# tqmarkfile.out.err
+# tstarfile.out
+# tstarfile.out.err
+ tnamed_dtype_attr.out
+ tnamed_dtype_attr.out.err
+ tnestcomp-1.out
+ tnestcomp-1.out.err
+ tnestedcmpddt.out
+ tnestedcmpddt.out.err
+ tnbit.out
+ tnbit.out.err
+ tnoattrdata.out
+ tnoattrdata.out.err
+ tnoattrddl.out
+ tnoattrddl.out.err
+ tnodata.out
+ tnodata.out.err
+ tnoddl.out
+ tnoddl.out.err
+ tnoddlfile.out
+ tnoddlfile.out.err
+ trawdatafile.out
+ trawdatafile.out.err
+ trawdatafile.txt
+ trawssetfile.out
+ trawssetfile.out.err
+ trawssetfile.txt
+ tno-subset.out
+ tno-subset.out.err
+ tnullspace.out
+ tnullspace.out.err
+ zerodim.out
+ zerodim.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
+ tordercontents1.out
+ tordercontents1.out.err
+ tordercontents2.out
+ tordercontents2.out.err
+ torderlinks1.out
+ torderlinks1.out.err
+ torderlinks2.out
+ torderlinks2.out.err
+ tperror.out
+ tperror.out.err
+ treference.out
+ treference.out.err
+ tsaf.out
+ tsaf.out.err
+ tscalarintsize.out
+ tscalarintsize.out.err
+ tscalarattrintsize.out
+ tscalarattrintsize.out.err
+ tscalarstring.out
+ tscalarstring.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
+ tslink-D.out
+ tslink-D.out.err
+ tsplit_file.out
+ tsplit_file.out.err
+ tstr-1.out
+ tstr-1.out.err
+ tstr-2.out
+ tstr-2.out.err
+ tstr2bin2.txt
+ tstr2bin6.txt
+ 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
+ twidedisplay.out
+ twidedisplay.out.err
+ twithddl.txt
+ twithddlfile.out
+ twithddlfile.out.err
+ twithddlfile.txt
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/std")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-clearall-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5DUMP-clearall-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_HELP_TEST(help 0 -h)
+
+ # test data output redirection
+ #ADD_H5_TEST (tnoddl 0 --enable-error-stack -O -y packedbits.h5)
+ ADD_H5_TEST (tnoddl 0 --enable-error-stack --ddl -y packedbits.h5)
+ #ADD_H5_TEST (tnodata 0 --enable-error-stack -o packedbits.h5)
+ ADD_H5_TEST (tnodata 0 --enable-error-stack --output packedbits.h5)
+ ADD_H5_TEST (tnoattrddl 0 --enable-error-stack -O -y tattr.h5)
+ ADD_H5_TEST (tnoattrdata 0 --enable-error-stack -A -o tattr.h5)
+ ADD_H5_TEST_EXPORT (trawdatafile packedbits.h5 0 --enable-error-stack -y -o)
+ ADD_H5_TEST_EXPORT (tnoddlfile packedbits.h5 0 --enable-error-stack -O -y -o)
+ ADD_H5_TEST_EXPORT (trawssetfile tdset.h5 0 --enable-error-stack -d "/dset1[1,1;;;]" -y -o)
+
+ ADD_H5_TEST_EXPORT_DDL (twithddlfile packedbits.h5 0 twithddl --enable-error-stack --ddl=twithddl.txt -y -o)
+
+ # test for maximum display datasets
+ ADD_H5_TEST (twidedisplay 0 --enable-error-stack -w0 packedbits.h5)
+
+ # test for signed/unsigned datasets
+ ADD_H5_TEST (packedbits 0 --enable-error-stack packedbits.h5)
+ # test for compound signed/unsigned datasets
+ ADD_H5_TEST (tcmpdintsize 0 --enable-error-stack tcmpdintsize.h5)
+ # test for signed/unsigned scalar datasets
+ ADD_H5_TEST (tscalarintsize 0 --enable-error-stack tscalarintsize.h5)
+ # test for signed/unsigned attributes
+ ADD_H5_TEST (tattrintsize 0 --enable-error-stack tattrintsize.h5)
+ # test for compound signed/unsigned attributes
+ ADD_H5_TEST (tcmpdattrintsize 0 --enable-error-stack tcmpdattrintsize.h5)
+ # test for signed/unsigned scalar attributes
+ ADD_H5_TEST (tscalarattrintsize 0 --enable-error-stack tscalarattrintsize.h5)
+ # test for string scalar dataset and attribute
+ ADD_H5_TEST (tscalarstring 0 --enable-error-stack tscalarstring.h5)
+ # test for displaying groups
+ ADD_H5_TEST (tgroup-1 0 --enable-error-stack tgroup.h5)
+ # test for displaying the selected groups
+ ADD_H5ERR_MASK_TEST (tgroup-2 1 --enable-error-stack --group=/g2 --group / -g /y tgroup.h5)
+
+ # test for displaying simple space datasets
+ ADD_H5_TEST (tdset-1 0 --enable-error-stack tdset.h5)
+ # test for displaying selected datasets
+ ADD_H5ERR_MASK_TEST (tdset-2 1 --enable-error-stack -H -d dset1 -d /dset2 --dataset=dset3 tdset.h5)
+
+ # test for displaying attributes
+ ADD_H5_TEST (tattr-1 0 --enable-error-stack tattr.h5)
+ # test for displaying the selected attributes of string type and scalar space
+ ADD_H5_TEST (tattr-2 0 --enable-error-stack -a /\\\\/attr1 --attribute /attr4 --attribute=/attr5 tattr.h5)
+ ADD_H5_TEST_N (tattr-2 0 --enable-error-stack -N /\\\\/attr1 --any_path /attr4 --any_path=/attr5 tattr.h5)
+ # test for header and error messages
+ ADD_H5ERR_MASK_TEST (tattr-3 1 --enable-error-stack --header -a /attr2 --attribute=/attr tattr.h5)
+ # test for displaying attributes in shared datatype (also in group and dataset)
+ ADD_H5_TEST (tnamed_dtype_attr 0 --enable-error-stack tnamed_dtype_attr.h5)
+ # test for displaying at least 9 attributes on root from a be machine
+ ADD_H5_TEST (tattr-4_be 0 --enable-error-stack tattr4_be.h5)
+
+ # test for displaying soft links and user-defined links
+ ADD_H5_TEST (tslink-1 0 --enable-error-stack tslink.h5)
+ ADD_H5_TEST (tudlink-1 0 --enable-error-stack tudlink.h5)
+ # test for displaying the selected link
+ ADD_H5_TEST (tslink-2 0 --enable-error-stack -l slink2 tslink.h5)
+ ADD_H5_TEST_N (tslink-2 0 --enable-error-stack -N slink2 tslink.h5)
+ ADD_H5_TEST (tudlink-2 0 --enable-error-stack -l udlink2 tudlink.h5)
+ # test for displaying dangling soft links
+ ADD_H5ERR_MASK_TEST (tslink-D 0 --enable-error-stack -d /slink1 tslink.h5)
+
+ # tests for hard links
+ ADD_H5_TEST (thlink-1 0 --enable-error-stack thlink.h5)
+ ADD_H5_TEST (thlink-2 0 --enable-error-stack -d /g1/dset2 --dataset /dset1 --dataset=/g1/g1.1/dset3 thlink.h5)
+ ADD_H5_TEST (thlink-3 0 --enable-error-stack -d /g1/g1.1/dset3 --dataset /g1/dset2 --dataset=/dset1 thlink.h5)
+ ADD_H5_TEST (thlink-4 0 --enable-error-stack -g /g1 thlink.h5)
+ ADD_H5_TEST_N (thlink-4 0 --enable-error-stack -N /g1 thlink.h5)
+ ADD_H5_TEST (thlink-5 0 --enable-error-stack -d /dset1 -g /g2 -d /g1/dset2 thlink.h5)
+ ADD_H5_TEST_N (thlink-5 0 --enable-error-stack -N /dset1 -N /g2 -N /g1/dset2 thlink.h5)
+
+ # tests for compound data types
+ ADD_H5_TEST (tcomp-1 0 --enable-error-stack tcompound.h5)
+ # test for named data types
+ ADD_H5_TEST (tcomp-2 0 --enable-error-stack -t /type1 --datatype /type2 --datatype=/group1/type3 tcompound.h5)
+ ADD_H5_TEST_N (tcomp-2 0 --enable-error-stack -N /type1 --any_path /type2 --any_path=/group1/type3 tcompound.h5)
+ # test for unamed type
+ ADD_H5ERR_MASK_TEST (tcomp-3 0 "--enable-error-stack;-t;/#6632;-g;/group2;tcompound.h5")
+ # test complicated compound datatype
+ ADD_H5_TEST (tcomp-4 0 --enable-error-stack tcompound_complex.h5)
+
+ #test for the nested compound type
+ ADD_H5_TEST (tnestcomp-1 0 --enable-error-stack tnestedcomp.h5)
+ ADD_H5_TEST (tnestedcmpddt 0 --enable-error-stack tnestedcmpddt.h5)
+
+ # test for options
+ ADD_H5ERR_MASK_TEST (tall-1 0 --enable-error-stack tall.h5)
+ ADD_H5_TEST (tall-2 0 --enable-error-stack --header -g /g1/g1.1 -a attr2 tall.h5)
+ ADD_H5_TEST (tall-3 0 --enable-error-stack -d /g2/dset2.1 -l /g1/g1.2/g1.2.1/slink tall.h5)
+ ADD_H5_TEST_N (tall-3 0 --enable-error-stack -N /g2/dset2.1 -N /g1/g1.2/g1.2.1/slink tall.h5)
+ ADD_H5_TEST (tall-7 0 --enable-error-stack -a attr1 tall.h5)
+ ADD_H5_TEST (tall-7N 0 --enable-error-stack -N attr1 tall.h5)
+
+ # test for loop detection
+ ADD_H5_TEST (tloop-1 0 --enable-error-stack tloop.h5)
+
+ # test for string
+ ADD_H5_TEST (tstr-1 0 --enable-error-stack tstr.h5)
+ ADD_H5_TEST (tstr-2 0 --enable-error-stack tstr2.h5)
+
+ # test for file created by Lib SAF team
+ ADD_H5_TEST (tsaf 0 --enable-error-stack tsaf.h5)
+
+ # test for file with variable length data
+ ADD_H5_TEST (tvldtypes1 0 --enable-error-stack tvldtypes1.h5)
+ ADD_H5_TEST (tvldtypes2 0 --enable-error-stack tvldtypes2.h5)
+ ADD_H5_TEST (tvldtypes3 0 --enable-error-stack tvldtypes3.h5)
+ ADD_H5_TEST (tvldtypes4 0 --enable-error-stack tvldtypes4.h5)
+ ADD_H5_TEST (tvldtypes5 0 --enable-error-stack tvldtypes5.h5)
+
+ #test for file with variable length string data
+ ADD_H5_TEST (tvlstr 0 --enable-error-stack tvlstr.h5)
+
+ # test for files with array data
+ ADD_H5_TEST (tarray1 0 --enable-error-stack tarray1.h5)
+ # # added for bug# 2092 - tarray1_big.h5
+ ADD_H5ERR_MASK_TEST (tarray1_big 0 --enable-error-stack -R tarray1_big.h5)
+ ADD_H5_TEST (tarray2 0 --enable-error-stack tarray2.h5)
+ ADD_H5_TEST (tarray3 0 --enable-error-stack tarray3.h5)
+ ADD_H5_TEST (tarray4 0 --enable-error-stack tarray4.h5)
+ ADD_H5_TEST (tarray5 0 --enable-error-stack tarray5.h5)
+ ADD_H5_TEST (tarray6 0 --enable-error-stack tarray6.h5)
+ ADD_H5_TEST (tarray7 0 --enable-error-stack tarray7.h5)
+ ADD_H5_TEST (tarray8 0 --enable-error-stack tarray8.h5)
+
+ # test for wildcards in filename (does not work with cmake)
+ #ADD_H5_MASK_TEST (tstarfile 0 --enable-error-stack -H -d Dataset1 tarr*.h5)
+ #ADD_H5_MASK_TEST (tqmarkfile 0 --enable-error-stack -H -d Dataset1 tarray?.h5)
+ ADD_H5_TEST (tmultifile 0 --enable-error-stack -H -d Dataset1 tarray2.h5 tarray3.h5 tarray4.h5 tarray5.h5 tarray6.h5 tarray7.h5)
+
+ # test for files with empty data
+ ADD_H5_TEST (tempty 0 --enable-error-stack tempty.h5)
+
+ # test for files with groups that have comments
+ ADD_H5_TEST (tgrp_comments 0 --enable-error-stack tgrp_comments.h5)
+
+ # test the --filedriver flag
+ ADD_H5_TEST (tsplit_file 0 --enable-error-stack --filedriver=split tsplit_file)
+ ADD_H5_TEST (tfamily 0 --enable-error-stack --filedriver=family tfamily%05d.h5)
+ ADD_H5_TEST (tmulti 0 --enable-error-stack --filedriver=multi tmulti)
+
+ # test for files with group names which reach > 1024 bytes in size
+ ADD_H5_TEST (tlarge_objname 0 --enable-error-stack -w157 tlarge_objname.h5)
+
+ # test '-A' to suppress data but print attr's
+ ADD_H5ERR_MASK_TEST (tall-2A 0 --enable-error-stack -A tall.h5)
+
+ # test '-A' to suppress attr's but print data
+ ADD_H5ERR_MASK_TEST (tall-2A0 0 --enable-error-stack -A 0 tall.h5)
+
+ # test '-r' to print attributes in ASCII instead of decimal
+ ADD_H5ERR_MASK_TEST (tall-2B 0 --enable-error-stack -A -r tall.h5)
+
+ # test Subsetting
+ ADD_H5_TEST (tall-4s 0 --enable-error-stack --dataset=/g1/g1.1/dset1.1.1 --start=1,1 --stride=2,3 --count=3,2 --block=1,1 tall.h5)
+ ADD_H5_TEST (tall-5s 0 --enable-error-stack -d "/g1/g1.1/dset1.1.2[0;2;10;]" tall.h5)
+ ADD_H5_TEST (tdset-3s 0 --enable-error-stack -d "/dset1[1,1;;;]" tdset.h5)
+ ADD_H5_TEST (tno-subset 0 --enable-error-stack --no-compact-subset -d "AHFINDERDIRECT::ah_centroid_t[0] it=0 tl=0" tno-subset.h5)
+
+ # test printing characters in ASCII instead of decimal
+ ADD_H5_TEST (tchar1 0 --enable-error-stack -r tchar.h5)
+
+ # test datatypes in ASCII and UTF8
+ ADD_H5_TEST (charsets 0 --enable-error-stack charsets.h5)
+
+ # rev. 2004
+ # tests for super block
+ ADD_H5_TEST (tboot1 0 --enable-error-stack -H -B -d dset tfcontents1.h5)
+ ADD_H5_TEST (tboot2 0 --enable-error-stack -B tfcontents2.h5)
+ ADD_H5_TEST (file_space 0 --enable-error-stack -B file_space.h5)
+
+ # test -p with a non existing dataset
+ ADD_H5ERR_MASK_TEST (tperror 1 --enable-error-stack -p -d bogus tfcontents1.h5)
+
+ # test for file contents
+ ADD_H5_TEST (tcontents 0 --enable-error-stack -n tfcontents1.h5)
+ ADD_H5_TEST (tordercontents1 0 --enable-error-stack -n --sort_by=name --sort_order=ascending tfcontents1.h5)
+ ADD_H5_TEST (tordercontents2 0 --enable-error-stack -n --sort_by=name --sort_order=descending tfcontents1.h5)
+ ADD_H5_TEST (tattrcontents1 0 --enable-error-stack -n 1 --sort_order=ascending tall.h5)
+ ADD_H5_TEST (tattrcontents2 0 --enable-error-stack -n 1 --sort_order=descending tall.h5)
+
+ # tests for storage layout
+ # compact
+ ADD_H5_TEST (tcompact 0 --enable-error-stack -H -p -d compact tfilters.h5)
+ # contiguous
+ ADD_H5_TEST (tcontiguos 0 --enable-error-stack -H -p -d contiguous tfilters.h5)
+ # chunked
+ ADD_H5_TEST (tchunked 0 --enable-error-stack -H -p -d chunked tfilters.h5)
+ # external
+ ADD_H5_TEST (texternal 0 --enable-error-stack -H -p -d external tfilters.h5)
+
+ # fill values
+ ADD_H5_TEST (tfill 0 --enable-error-stack -p tfvalues.h5)
+
+ # several datatype, with references , print path
+ ADD_H5_TEST (treference 0 --enable-error-stack tattr2.h5)
+
+ # escape/not escape non printable characters
+ ADD_H5_TEST (tstringe 0 --enable-error-stack -e tstr3.h5)
+ ADD_H5_TEST (tstring 0 --enable-error-stack tstr3.h5)
+ # char data as ASCII with non escape
+ ADD_H5_TEST (tstring2 0 --enable-error-stack -r -d str4 tstr3.h5)
+
+ # array indices print/not print
+ ADD_H5_TEST (tindicesyes 0 --enable-error-stack taindices.h5)
+ ADD_H5_TEST (tindicesno 0 --enable-error-stack -y taindices.h5)
+
+ ########## array indices with subsetting
+ # 1D case
+ ADD_H5_TEST (tindicessub1 0 --enable-error-stack -d 1d -s 1 -S 10 -c 2 -k 3 taindices.h5)
+
+ # 2D case
+ ADD_H5_TEST (tindicessub2 0 --enable-error-stack -d 2d -s 1,2 -S 3,3 -c 3,2 -k 2,2 taindices.h5)
+
+ # 3D case
+ ADD_H5_TEST (tindicessub3 0 --enable-error-stack -d 3d -s 0,1,2 -S 1,3,3 -c 2,2,2 -k 1,2,2 taindices.h5)
+
+ # 4D case
+ ADD_H5_TEST (tindicessub4 0 --enable-error-stack -d 4d -s 0,0,1,2 -c 2,2,3,2 -S 1,1,3,3 -k 1,1,2,2 taindices.h5)
+
+ # Exceed the dimensions for subsetting
+ ADD_H5_TEST (texceedsubstart 1 --enable-error-stack -d 1d -s 1,3 taindices.h5)
+ ADD_H5_TEST (texceedsubcount 1 --enable-error-stack -d 1d -c 1,3 taindices.h5)
+ ADD_H5_TEST (texceedsubstride 1 --enable-error-stack -d 1d -S 1,3 taindices.h5)
+ ADD_H5_TEST (texceedsubblock 1 --enable-error-stack -d 1d -k 1,3 taindices.h5)
+
+ # tests for filters
+ # SZIP
+ ADD_H5_TEST (tszip 0 --enable-error-stack -H -p -d szip tfilters.h5)
+
+ # deflate
+ ADD_H5_TEST (tdeflate 0 --enable-error-stack -H -p -d deflate tfilters.h5)
+
+ # shuffle
+ ADD_H5_TEST (tshuffle 0 --enable-error-stack -H -p -d shuffle tfilters.h5)
+
+ # fletcher32
+ ADD_H5_TEST (tfletcher32 0 --enable-error-stack -H -p -d fletcher32 tfilters.h5)
+
+ # nbit
+ ADD_H5_TEST (tnbit 0 --enable-error-stack -H -p -d nbit tfilters.h5)
+
+ # scaleoffset
+ ADD_H5_TEST (tscaleoffset 0 --enable-error-stack -H -p -d scaleoffset tfilters.h5)
+
+ # all
+ ADD_H5_TEST (tallfilters 0 --enable-error-stack -H -p -d all tfilters.h5)
+
+ # user defined
+ ADD_H5_TEST (tuserfilter 0 --enable-error-stack -H -p -d myfilter tfilters.h5)
+
+ # test for displaying objects with very long names
+ ADD_H5_TEST (tlonglinks 0 --enable-error-stack tlonglinks.h5)
+
+ # dimensions over 4GB, print boundary
+ ADD_H5_TEST (tbigdims 0 --enable-error-stack -d dset4gb -s 4294967284 -c 22 tbigdims.h5)
+
+ # hyperslab read
+ ADD_H5_TEST (thyperslab 0 --enable-error-stack thyperslab.h5)
+
+ # test for displaying dataset and attribute of null space
+ ADD_H5_TEST (tnullspace 0 --enable-error-stack tnullspace.h5)
+
+ # test for displaying dataset and attribute of space with 0 dimension size
+ ADD_H5_TEST (zerodim 0 --enable-error-stack zerodim.h5)
+
+ # test for long double (some systems do not have long double)
+ #ADD_H5_TEST (tldouble 0 --enable-error-stack tldouble.h5)
+
+ # test for vms
+ ADD_H5_TEST (tvms 0 --enable-error-stack tvms.h5)
+
+ # test for binary output
+ ADD_H5_TEST (tbin1LE 0 --enable-error-stack -d integer -o tbin1LE.bin -b LE tbinary.h5)
+
+ # test for string binary output
+ ADD_H5_EXPORT_TEST (tstr2bin2 tstr2.h5 0 --enable-error-stack -d /g2/dset2 -b -o)
+ ADD_H5_EXPORT_TEST (tstr2bin6 tstr2.h5 0 --enable-error-stack -d /g6/dset6 -b -o)
+
+ # NATIVE default. the NATIVE test can be validated with h5import/h5diff
+ ADD_H5_TEST_IMPORT (tbin1 out1D tbinary.h5 0 --enable-error-stack -d integer -b)
+
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_H5_TEST (tbin2 0 --enable-error-stack -b BE -d float -o tbin2.bin tbinary.h5)
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+
+ # the NATIVE test can be validated with h5import/h5diff
+ ADD_H5_TEST_IMPORT (tbin3 out3D tbinary.h5 0 --enable-error-stack -d integer -b NATIVE)
+
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_H5_TEST (tbin4 0 --enable-error-stack -d double -b FILE -o tbin4.bin tbinary.h5)
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+
+ # test for dataset region references
+ ADD_H5_TEST (tdatareg 0 --enable-error-stack tdatareg.h5)
+ ADD_H5ERR_MASK_TEST (tdataregR 0 --enable-error-stack -R tdatareg.h5)
+ ADD_H5ERR_MASK_TEST (tattrregR 0 -R --enable-error-stack tattrreg.h5)
+ ADD_H5_EXPORT_TEST (tbinregR tdatareg.h5 0 --enable-error-stack -d /Dataset1 -s 0 -R -y -o)
+
+ # tests for group creation order
+ # "1" tracked, "2" name, root tracked
+ ADD_H5_TEST (tordergr1 0 --enable-error-stack --group=1 --sort_by=creation_order --sort_order=ascending tordergr.h5)
+ ADD_H5_TEST (tordergr2 0 --enable-error-stack --group=1 --sort_by=creation_order --sort_order=descending tordergr.h5)
+ ADD_H5_TEST (tordergr3 0 --enable-error-stack -g 2 -q name -z ascending tordergr.h5)
+ ADD_H5_TEST (tordergr4 0 --enable-error-stack -g 2 -q name -z descending tordergr.h5)
+ ADD_H5_TEST (tordergr5 0 --enable-error-stack -q creation_order tordergr.h5)
+
+ # tests for attribute order
+ ADD_H5_TEST (torderattr1 0 --enable-error-stack -H --sort_by=name --sort_order=ascending torderattr.h5)
+ ADD_H5_TEST (torderattr2 0 --enable-error-stack -H --sort_by=name --sort_order=descending torderattr.h5)
+ ADD_H5_TEST (torderattr3 0 --enable-error-stack -H --sort_by=creation_order --sort_order=ascending torderattr.h5)
+ ADD_H5_TEST (torderattr4 0 --enable-error-stack -H --sort_by=creation_order --sort_order=descending torderattr.h5)
+
+ # tests for link references and order
+ ADD_H5ERR_MASK_TEST (torderlinks1 0 --enable-error-stack --sort_by=name --sort_order=ascending tfcontents1.h5)
+ ADD_H5ERR_MASK_TEST (torderlinks2 0 --enable-error-stack --sort_by=name --sort_order=descending tfcontents1.h5)
+
+ # tests for floating point user defined printf format
+ ADD_H5_TEST (tfpformat 0 --enable-error-stack -m %.7f tfpformat.h5)
+
+ # tests for traversal of external links
+ ADD_H5ERR_MASK_TEST (textlinksrc 0 --enable-error-stack textlinksrc.h5)
+ ADD_H5ERR_MASK_TEST (textlinkfar 0 --enable-error-stack textlinkfar.h5)
+
+ # test for dangling external links
+ ADD_H5ERR_MASK_TEST (textlink 0 --enable-error-stack textlink.h5)
+
+ # test for error stack display (BZ2048)
+ ADD_H5ERR_MASK_ENV_TEST (filter_fail 1 "HDF5_PLUGIN_PRELOAD" "::" --enable-error-stack filter_fail.h5)
+
+ # test for -o -y for dataset with attributes
+ ADD_H5_TEST_EXPORT (tall-6 tall.h5 0 --enable-error-stack -d /g1/g1.1/dset1.1.1 -y -o)
diff --git a/tools/h5dump/CMakeTestsPBITS.cmake b/tools/h5dump/CMakeTestsPBITS.cmake
new file mode 100644
index 0000000..baa1705
--- /dev/null
+++ b/tools/h5dump/CMakeTestsPBITS.cmake
@@ -0,0 +1,367 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ # --------------------------------------------------------------------
+ # Packed Bits
+ # --------------------------------------------------------------------
+ #-- Copy all the HDF5 files from the test directory into the source directory
+ SET (HDF5_REFERENCE_PBITS
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnofilename-with-packed-bits.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsArray.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCompound.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIncomplete.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharLengthExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntLengthExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongLengthExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLengthPositive.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMax.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsMaxExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsCharOffsetExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsIntOffsetExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsLongOffsetExceeded.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOffsetNegative.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsOverlapped.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedIntWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedIntWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole1.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLongWhole63.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLongWhole63.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt8.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt8.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong16.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong16.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong32.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong32.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSigned2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsigned2.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedInt4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedInt4.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLong8.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLong8.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsSignedLongLong16.ddl
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tpbitsUnsignedLongLong16.ddl
+ )
+ SET (HDF5_REFERENCE_TEST_PBITS
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/packedbits.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5
+ )
+ SET (HDF5_ERROR_REFERENCE_PBITS
+ ${PROJECT_SOURCE_DIR}/errfiles/tnofilename-with-packed-bits.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharLengthExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsCharOffsetExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIncomplete.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntLengthExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsIntOffsetExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLengthPositive.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongLengthExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsLongOffsetExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsMaxExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetExceeded.err
+ ${PROJECT_SOURCE_DIR}/errfiles/tpbitsOffsetNegative.err
+ )
+
+ FOREACH (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
+ GET_FILENAME_COMPONENT(fname "${pbits_h5_file}" NAME)
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
+ #MESSAGE (STATUS " Copying ${pbits_h5_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${pbits_h5_file} ${dest}
+ )
+ ENDFOREACH (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS})
+
+
+ FOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
+ GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
+ SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
+ #MESSAGE (STATUS " Copying ${ddl_pbits}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${ddl_pbits} ${ddldest}
+ )
+ ENDFOREACH (ddl_pbits ${HDF5_REFERENCE_PBITS})
+
+ FOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
+ GET_FILENAME_COMPONENT(fname "${ddl_pbits}" NAME)
+ SET (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}")
+ #MESSAGE (STATUS " Copying ${ddl_pbits}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${ddl_pbits} ${ddldest}
+ )
+ ENDFOREACH (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS})
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ MACRO (ADD_H5_PBITS_TEST resultfile resultcode)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5DUMP-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
+ IF (NOT ${resultcode} STREQUAL "0")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT ${resultcode} STREQUAL "0")
+ IF (NOT "${last_pbits_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test})
+ ENDIF (NOT "${last_pbits_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.out ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
+ ADD_TEST (
+ NAME H5DUMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/pbits"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-${resultfile} PROPERTIES DEPENDS "H5DUMP-${resultfile}-clear-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_PBITS_TEST file)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S HDF5_ENABLE_USING_MEMCHECKER ###
+##############################################################################
+##############################################################################
+
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5DUMP_PACKED_BITS-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ tnofilename-with-packed-bits.out
+ tnofilename-with-packed-bits.out.err
+ tpbitsArray.out
+ tpbitsArray.out.err
+ tpbitsCompound.out
+ tpbitsCompound.out.err
+ tpbitsIncomplete.out
+ tpbitsIncomplete.out.err
+ tpbitsLengthExceeded.out
+ tpbitsLengthExceeded.out.err
+ tpbitsCharLengthExceeded.out
+ tpbitsCharLengthExceeded.out.err
+ tpbitsIntLengthExceeded.out
+ tpbitsIntLengthExceeded.out.err
+ tpbitsLongLengthExceeded.out
+ tpbitsLongLengthExceeded.out.err
+ tpbitsLengthPositive.out
+ tpbitsLengthPositive.out.err
+ tpbitsMax.out
+ tpbitsMax.out.err
+ tpbitsMaxExceeded.out
+ tpbitsMaxExceeded.out.err
+ tpbitsOffsetExceeded.out
+ tpbitsOffsetExceeded.out.err
+ tpbitsCharOffsetExceeded.out
+ tpbitsCharOffsetExceeded.out.err
+ tpbitsIntOffsetExceeded.out
+ tpbitsIntOffsetExceeded.out.err
+ tpbitsLongOffsetExceeded.out
+ tpbitsLongOffsetExceeded.out.err
+ tpbitsOffsetNegative.out
+ tpbitsOffsetNegative.out.err
+ tpbitsOverlapped.out
+ tpbitsOverlapped.out.err
+ tpbitsSigned.out
+ tpbitsSigned.out.err
+ tpbitsUnsigned.out
+ tpbitsUnsigned.out.err
+ tpbitsSignedInt.out
+ tpbitsSignedInt.out.err
+ tpbitsUnsignedInt.out
+ tpbitsUnsignedInt.out.err
+ tpbitsSignedLong.out
+ tpbitsSignedLong.out.err
+ tpbitsUnsignedLong.out
+ tpbitsUnsignedLong.out.err
+ tpbitsSignedLongLong.out
+ tpbitsSignedLongLong.out.err
+ tpbitsUnsignedLongLong.out
+ tpbitsUnsignedLongLong.out.err
+ tpbitsSignedWhole.out
+ tpbitsSignedWhole.out.err
+ tpbitsUnsignedWhole.out
+ tpbitsUnsignedWhole.out.err
+ tpbitsSignedIntWhole.out
+ tpbitsSignedIntWhole.out.err
+ tpbitsUnsignedIntWhole.out
+ tpbitsUnsignedIntWhole.out.err
+ tpbitsSignedLongWhole.out
+ tpbitsSignedLongWhole.out.err
+ tpbitsUnsignedLongWhole.out
+ tpbitsUnsignedLongWhole.out.err
+ tpbitsSignedLongLongWhole.out
+ tpbitsSignedLongLongWhole.out.err
+ tpbitsUnsignedLongLongWhole.out
+ tpbitsUnsignedLongLongWhole.out.err
+ tpbitsSignedLongLongWhole1.out
+ tpbitsSignedLongLongWhole1.out.err
+ tpbitsUnsignedLongLongWhole1.out
+ tpbitsUnsignedLongLongWhole1.out.err
+ tpbitsSignedLongLongWhole63.out
+ tpbitsSignedLongLongWhole63.out.err
+ tpbitsUnsignedLongLongWhole63.out
+ tpbitsUnsignedLongLongWhole63.out.err
+ tpbitsSigned4.out
+ tpbitsSigned4.out.err
+ tpbitsUnsigned4.out
+ tpbitsUnsigned4.out.err
+ tpbitsSignedInt8.out
+ tpbitsSignedInt8.out.err
+ tpbitsUnsignedInt8.out
+ tpbitsUnsignedInt8.out.err
+ tpbitsSignedLong16.out
+ tpbitsSignedLong16.out.err
+ tpbitsUnsignedLong16.out
+ tpbitsUnsignedLong16.out.err
+ tpbitsSignedLongLong32.out
+ tpbitsSignedLongLong32.out.err
+ tpbitsUnsignedLongLong32.out
+ tpbitsUnsignedLongLong32.out.err
+ tpbitsSigned2.out
+ tpbitsSigned2.out.err
+ tpbitsUnsigned2.out
+ tpbitsUnsigned2.out.err
+ tpbitsSignedInt4.out
+ tpbitsSignedInt4.out.err
+ tpbitsUnsignedInt4.out
+ tpbitsUnsignedInt4.out.err
+ tpbitsSignedLong8.out
+ tpbitsSignedLong8.out.err
+ tpbitsUnsignedLong8.out
+ tpbitsUnsignedLong8.out.err
+ tpbitsSignedLongLong16.out
+ tpbitsSignedLongLong16.out.err
+ tpbitsUnsignedLongLong16.out
+ tpbitsUnsignedLongLong16.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits")
+ IF (NOT "${last_pbits_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP_PACKED_BITS-clearall-objects PROPERTIES DEPENDS ${last_pbits_test})
+ ENDIF (NOT "${last_pbits_test}" STREQUAL "")
+ SET (last_pbits_test "H5DUMP_PACKED_BITS-clearall-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ # test failure handling
+ # Missing file name
+ ADD_H5_PBITS_TEST (tnofilename-with-packed-bits 1 --enable-error-stack)
+ # Limits:
+ # Maximum number of packed bits is 8 (for now).
+ # Maximum integer size is 8*sizeof(long long).
+ # Maximun Offset is Maximum size - 1.
+ # Maximum Offset+Length is Maximum size.
+ # Tests:
+ # Normal operation on both signed and unsigned int datasets.
+ # Sanity check
+ # Their rawdata output should be the same.
+ ADD_H5_PBITS_TEST (tpbitsSignedWhole 0 --enable-error-stack -d /DS08BITS -M 0,8 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedWhole 0 --enable-error-stack -d /DU08BITS -M 0,8 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedIntWhole 0 --enable-error-stack -d /DS16BITS -M 0,16 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedIntWhole 0 --enable-error-stack -d /DU16BITS -M 0,16 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLongWhole 0 --enable-error-stack -d /DS32BITS -M 0,32 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLongWhole 0 --enable-error-stack -d /DU32BITS -M 0,32 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLongLongWhole 0 --enable-error-stack -d /DS64BITS -M 0,64 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLongLongWhole 0 --enable-error-stack -d /DU64BITS -M 0,64 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLongLongWhole63 0 --enable-error-stack -d /DS64BITS -M 0,63 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLongLongWhole63 0 --enable-error-stack -d /DU64BITS -M 0,63 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLongLongWhole1 0 --enable-error-stack -d /DS64BITS -M 1,63 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLongLongWhole1 0 --enable-error-stack -d /DU64BITS -M 1,63 packedbits.h5)
+ # Half sections
+ ADD_H5_PBITS_TEST (tpbitsSigned4 0 --enable-error-stack -d /DS08BITS -M 0,4,4,4 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsigned4 0 --enable-error-stack -d /DU08BITS -M 0,4,4,4 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedInt8 0 --enable-error-stack -d /DS16BITS -M 0,8,8,8 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedInt8 0 --enable-error-stack -d /DU16BITS -M 0,8,8,8 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLong16 0 --enable-error-stack -d /DS32BITS -M 0,16,16,16 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLong16 0 --enable-error-stack -d /DU32BITS -M 0,16,16,16 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLongLong32 0 --enable-error-stack -d /DS64BITS -M 0,32,32,32 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLongLong32 0 --enable-error-stack -d /DU64BITS -M 0,32,32,32 packedbits.h5)
+ # Quarter sections
+ ADD_H5_PBITS_TEST (tpbitsSigned2 0 --enable-error-stack -d /DS08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsigned2 0 --enable-error-stack -d /DU08BITS -M 0,2,2,2,4,2,6,2 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedInt4 0 --enable-error-stack -d /DS16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedInt4 0 --enable-error-stack -d /DU16BITS -M 0,4,4,4,8,4,12,4 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLong8 0 --enable-error-stack -d /DS32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLong8 0 --enable-error-stack -d /DU32BITS -M 0,8,8,8,16,8,24,8 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLongLong16 0 --enable-error-stack -d /DS64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLongLong16 0 --enable-error-stack -d /DU64BITS -M 0,16,16,16,32,16,48,16 packedbits.h5)
+ # Begin and End
+ ADD_H5_PBITS_TEST (tpbitsSigned 0 --enable-error-stack -d /DS08BITS -M 0,2,2,6 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsigned 0 --enable-error-stack -d /DU08BITS -M 0,2,2,6 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedInt 0 --enable-error-stack -d /DS16BITS -M 0,2,10,6 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedInt 0 --enable-error-stack -d /DU16BITS -M 0,2,10,6 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLong 0 --enable-error-stack -d /DS32BITS -M 0,2,26,6 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLong 0 --enable-error-stack -d /DU32BITS -M 0,2,26,6 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsSignedLongLong 0 --enable-error-stack -d /DS64BITS -M 0,2,58,6 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsUnsignedLongLong 0 --enable-error-stack -d /DU64BITS -M 0,2,58,6 packedbits.h5)
+ # Overlapped packed bits.
+ ADD_H5_PBITS_TEST (tpbitsOverlapped 0 --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,0,3 packedbits.h5)
+ # Maximum number of packed bits.
+ ADD_H5_PBITS_TEST (tpbitsMax 0 --enable-error-stack -d /DS08BITS -M 0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5)
+ # Compound type.
+ ADD_H5_PBITS_TEST (tpbitsCompound 0 --enable-error-stack -d /dset1 -M 0,1,1,1 tcompound.h5)
+ # Array type.
+ ADD_H5_PBITS_TEST (tpbitsArray 0 --enable-error-stack -d /Dataset1 -M 0,1,1,1 tarray1.h5)
+ # Test Error handling.
+ # Too many packed bits requested. Max is 8 for now.
+ ADD_H5_PBITS_TEST (tpbitsMaxExceeded 1 --enable-error-stack -d /DS08BITS -M 0,1,0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1 packedbits.h5)
+ # Offset too large. Max is 8*sizeof(long long.
+ ADD_H5_PBITS_TEST (tpbitsOffsetExceeded 1 --enable-error-stack -d /DS08BITS -M 64,1 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsCharOffsetExceeded 0 --enable-error-stack -d /DS08BITS -M 8,1 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsIntOffsetExceeded 0 --enable-error-stack -d /DS16BITS -M 16,1 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsLongOffsetExceeded 0 --enable-error-stack -d /DS32BITS -M 32,1 packedbits.h5)
+ # Bad offset, must not be negative.
+ ADD_H5_PBITS_TEST (tpbitsOffsetNegative 1 --enable-error-stack -d /DS08BITS -M -1,1 packedbits.h5)
+ # Bad length, must not be positive.
+ ADD_H5_PBITS_TEST (tpbitsLengthPositive 1 --enable-error-stack -d /DS08BITS -M 4,0 packedbits.h5)
+ # Offset+Length is too large. Max is 8*sizeof(long long).
+ ADD_H5_PBITS_TEST (tpbitsLengthExceeded 1 --enable-error-stack -d /DS08BITS -M 37,28 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsCharLengthExceeded 0 --enable-error-stack -d /DS08BITS -M 2,7 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsIntLengthExceeded 0 --enable-error-stack -d /DS16BITS -M 10,7 packedbits.h5)
+ ADD_H5_PBITS_TEST (tpbitsLongLengthExceeded 0 --enable-error-stack -d /DS32BITS -M 26,7 packedbits.h5)
+ # Incomplete pair of packed bits request.
+ ADD_H5_PBITS_TEST (tpbitsIncomplete 1 --enable-error-stack -d /DS08BITS -M 0,2,2,1,0,2,2, packedbits.h5)
diff --git a/tools/h5dump/CMakeTestsXML.cmake b/tools/h5dump/CMakeTestsXML.cmake
new file mode 100644
index 0000000..6c9cae1
--- /dev/null
+++ b/tools/h5dump/CMakeTestsXML.cmake
@@ -0,0 +1,442 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ #
+ # copy XML test files from source dir to test dir
+ #
+ SET (HDF5_XML_REFERENCE_TEST_FILES
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5
+ )
+ SET (HDF5_XML_REFERENCE_FILES
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2A.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray3.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray6.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray7.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbitfields.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound_complex.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-dtd-uri.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-nons-uri.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty-ns-2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tenum.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfpformat.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmany.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-amp.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-apos.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnamed_dtype_attr.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-gt.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-lt.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-quot.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tname-sp.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnodata.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tobjref.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/topaque.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr1.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr3.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/torderattr4.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tref.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tref-escapes-at.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstring-at.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes3.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes4.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes5.h5.xml
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvlstr.h5.xml
+ )
+
+ FOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
+ GET_FILENAME_COMPONENT(fname "${tst_xml_h5_file}" NAME)
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
+ #MESSAGE (STATUS " Copying ${tst_xml_h5_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${tst_xml_h5_file} ${dest}
+ )
+ ENDFOREACH (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES})
+
+ FOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
+ GET_FILENAME_COMPONENT(fname "${tst_xml_other_file}" NAME)
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}")
+ #MESSAGE (STATUS " Copying ${tst_xml_other_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5dump
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${tst_xml_other_file} ${dest}
+ )
+ ENDFOREACH (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES})
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ MACRO (ADD_XML_SKIP_H5_TEST skipresultfile skipresultcode testtype)
+ IF (${testtype} STREQUAL "SKIP")
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-XML-${skipresultfile}-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${skipresultfile}.xml --xml ${ARGN}"
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ELSE (${testtype} STREQUAL "SKIP")
+ ADD_XML_H5_TEST (${skipresultfile} ${skipresultcode} ${ARGN})
+ ENDIF (${testtype} STREQUAL "SKIP")
+ ENDMACRO (ADD_XML_SKIP_H5_TEST)
+
+ MACRO (ADD_XML_H5_TEST resultfile resultcode)
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5DUMP-XML-${resultfile} COMMAND $<TARGET_FILE:h5dump> --xml ${ARGN})
+ SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
+ IF (NOT ${resultcode} STREQUAL "0")
+ SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT ${resultcode} STREQUAL "0")
+ IF (NOT "${last_xml_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test})
+ ENDIF (NOT "${last_xml_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5DUMP-XML-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.out ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
+ ADD_TEST (
+ NAME H5DUMP-XML-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=--xml;${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/xml"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.xml"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS "H5DUMP-XML-${resultfile}-clear-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_XML_H5_TEST file)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S HDF5_ENABLE_USING_MEMCHECKER ###
+##############################################################################
+##############################################################################
+
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ # 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
+ )
+ SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml")
+ IF (NOT "${last_xml_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5DUMP-XML-clearall-objects PROPERTIES DEPENDS ${last_xml_test})
+ ENDIF (NOT "${last_xml_test}" STREQUAL "")
+ SET (last_test "H5DUMP-XML-clearall-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ ########## test XML
+ 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)
+ ADD_XML_H5_TEST (tcompound.h5 0 tcompound.h5)
+ ADD_XML_H5_TEST (tcompound2.h5 0 tcompound2.h5)
+ ADD_XML_H5_TEST (tdatareg.h5 0 tdatareg.h5)
+ ADD_XML_H5_TEST (tdset.h5 0 tdset.h5)
+ ADD_XML_H5_TEST (tdset2.h5 0 tdset2.h5)
+ ADD_XML_H5_TEST (tenum.h5 0 tenum.h5)
+ ADD_XML_H5_TEST (tgroup.h5 0 tgroup.h5)
+ ADD_XML_H5_TEST (thlink.h5 0 thlink.h5)
+ ADD_XML_H5_TEST (tloop.h5 0 tloop.h5)
+ ADD_XML_H5_TEST (tloop2.h5 0 tloop2.h5)
+ ADD_XML_H5_TEST (tmany.h5 0 tmany.h5)
+ ADD_XML_H5_TEST (tnestedcomp.h5 0 tnestedcomp.h5)
+ ADD_XML_H5_TEST (tcompound_complex.h5 0 tcompound_complex.h5)
+ ADD_XML_H5_TEST (tobjref.h5 0 tobjref.h5)
+ ADD_XML_H5_TEST (topaque.h5 0 topaque.h5)
+ ADD_XML_H5_TEST (tslink.h5 0 tslink.h5)
+ ADD_XML_H5_TEST (tudlink.h5 0 tudlink.h5)
+ ADD_XML_H5_TEST (textlink.h5 0 textlink.h5)
+ ADD_XML_H5_TEST (tstr.h5 0 tstr.h5)
+ ADD_XML_H5_TEST (tstr2.h5 0 tstr2.h5)
+ ADD_XML_H5_TEST (tref.h5 0 tref.h5)
+ ADD_XML_H5_TEST (tname-amp.h5 0 tname-amp.h5)
+ ADD_XML_H5_TEST (tname-apos.h5 0 tname-apos.h5)
+ ADD_XML_H5_TEST (tname-gt.h5 0 tname-gt.h5)
+ ADD_XML_H5_TEST (tname-lt.h5 0 tname-lt.h5)
+ ADD_XML_H5_TEST (tname-quot.h5 0 tname-quot.h5)
+ ADD_XML_H5_TEST (tname-sp.h5 0 tname-sp.h5)
+ ADD_XML_H5_TEST (tstring.h5 0 tstring.h5)
+ ADD_XML_H5_TEST (tstring-at.h5 0 tstring-at.h5)
+ ADD_XML_H5_TEST (tref-escapes.h5 0 tref-escapes.h5)
+ ADD_XML_H5_TEST (tref-escapes-at.h5 0 tref-escapes-at.h5)
+ ADD_XML_H5_TEST (tnodata.h5 0 tnodata.h5)
+ ADD_XML_H5_TEST (tarray1.h5 0 tarray1.h5)
+ ADD_XML_H5_TEST (tarray2.h5 0 tarray2.h5)
+ ADD_XML_H5_TEST (tarray3.h5 0 tarray3.h5)
+ ADD_XML_H5_TEST (tarray6.h5 0 tarray6.h5)
+ ADD_XML_H5_TEST (tarray7.h5 0 tarray7.h5)
+ ADD_XML_H5_TEST (tvldtypes1.h5 0 tvldtypes1.h5)
+ ADD_XML_H5_TEST (tvldtypes2.h5 0 tvldtypes2.h5)
+ ADD_XML_H5_TEST (tvldtypes3.h5 0 tvldtypes3.h5)
+ ADD_XML_H5_TEST (tvldtypes4.h5 0 tvldtypes4.h5)
+ ADD_XML_H5_TEST (tvldtypes5.h5 0 tvldtypes5.h5)
+ ADD_XML_H5_TEST (tvlstr.h5 0 tvlstr.h5)
+ ADD_XML_H5_TEST (tsaf.h5 0 tsaf.h5)
+ ADD_XML_H5_TEST (tempty.h5 0 tempty.h5)
+ ADD_XML_H5_TEST (tnamed_dtype_attr.h5 0 tnamed_dtype_attr.h5)
+ ##Test dataset and attribute of null space. Commented out:
+ ## wait until the XML schema is updated for null space.
+ ## ADD_XML_H5_TEST (tnullspace.h5 0 tnulspace.h5)
+ ## So is dataspace with 0 dimension size.
+ ## ADD_XML_H5_TEST (zerodim.h5 0 zerodim.h5)
+
+ # other options for xml
+
+ ADD_XML_H5_TEST (tempty-dtd.h5 0 --use-dtd tempty.h5)
+ ADD_XML_H5_TEST (tempty-dtd-2.h5 0 -u tempty.h5)
+
+ # The lone colon here confuses some systems (Cray X1). Skip
+ # it if configure detects that this is a problem.
+ SET (TESTTYPE "TEST")
+ IF (NOT "H5_LONE_COLON")
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT "H5_LONE_COLON")
+ ADD_XML_SKIP_H5_TEST (tempty-nons.h5 0 ${TESTTYPE} -X : tempty.h5)
+
+ ADD_XML_H5_TEST (tempty-nons-2.h5 0 --xml-ns=: tempty.h5)
+
+ ## Some of these combinations are syntactically correct but
+ ## the URLs are dummies
+ ADD_XML_H5_TEST (tempty-ns.h5 0 -X thing: tempty.h5)
+ ADD_XML_H5_TEST (tempty-ns-2.h5 0 --xml-ns=thing: tempty.h5)
+ ADD_XML_H5_TEST (tempty-nons-uri.h5 0 --xml-ns=: --xml-dtd=http://somewhere.net tempty.h5)
+ ADD_XML_H5_TEST (tempty-dtd-uri.h5 0 --use-dtd --xml-dtd=http://somewhere.net tempty.h5)
+
+ ADD_XML_H5_TEST (tall-2A.h5 0 -A tall.h5)
+
+
+ # tests for attribute order
+ ADD_XML_H5_TEST (torderattr1.h5 0 -H --sort_by=name --sort_order=ascending torderattr.h5)
+ ADD_XML_H5_TEST (torderattr2.h5 0 -H --sort_by=name --sort_order=descending torderattr.h5)
+ ADD_XML_H5_TEST (torderattr3.h5 0 -H --sort_by=creation_order --sort_order=ascending torderattr.h5)
+ ADD_XML_H5_TEST (torderattr4.h5 0 -H --sort_by=creation_order --sort_order=descending torderattr.h5)
+
+ # tests for floating point user defined printf format
+ ADD_XML_H5_TEST (tfpformat.h5 0 -u -m %.7f tfpformat.h5)
+
diff --git a/tools/h5import/CMakeLists.txt b/tools/h5import/CMakeLists.txt
index 94dd69c..7caf44a 100644
--- a/tools/h5import/CMakeLists.txt
+++ b/tools/h5import/CMakeLists.txt
@@ -18,12 +18,6 @@ SET_TARGET_PROPERTIES (h5import PROPERTIES FOLDER tools)
SET (H5_DEP_EXECUTABLES h5import)
-##############################################################################
-##############################################################################
-### T E S T I N G ###
-##############################################################################
-##############################################################################
-
IF (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5import executables
@@ -34,476 +28,7 @@ IF (BUILD_TESTING)
TARGET_LINK_LIBRARIES (h5importtest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
SET_TARGET_PROPERTIES (h5importtest PROPERTIES FOLDER tools)
- SET (HDF5_REFERENCE_CONF_FILES
- binfp64.conf
- binin8.conf
- binin8w.conf
- binin16.conf
- binin32.conf
- binuin16.conf
- binuin32.conf
- txtfp32.conf
- txtfp64.conf
- txtin8.conf
- txtin16.conf
- txtin32.conf
- txtuin16.conf
- txtuin32.conf
- textpfe.conf
- txtstr.conf
- )
- SET (HDF5_REFERENCE_TXT_FILES
- txtfp32.txt
- txtfp64.txt
- txtuin16.txt
- txtuin32.txt
- txtin8.txt
- txtin16.txt
- txtin32.txt
- textpfe64.txt
- txtstr.txt
- dbinfp64.h5.txt
- dbinin8.h5.txt
- dbinin8w.h5.txt
- dbinin16.h5.txt
- dbinin32.h5.txt
- dbinuin16.h5.txt
- dbinuin32.h5.txt
- dtxtstr.h5.txt
- )
- SET (HDF5_REFERENCE_TEST_FILES
- binfp64.h5
- binin8.h5
- binin8w.h5
- binin16.h5
- binin32.h5
- binuin16.h5
- binuin32.h5
- txtfp32.h5
- txtfp64.h5
- txtin8.h5
- txtin16.h5
- txtin32.h5
- txtuin16.h5
- txtuin32.h5
- txtstr.h5
- textpfe.h5
- )
-
- FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- FOREACH (conf_file ${HDF5_REFERENCE_CONF_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${conf_file}")
- #MESSAGE (STATUS " Copying ${conf_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5import
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${conf_file} ${dest}
- )
- ENDFOREACH (conf_file ${HDF5_REFERENCE_CONF_FILES})
-
- FOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
- #MESSAGE (STATUS " Copying ${txt_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5import
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${txt_file} ${dest}
- )
- ENDFOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
-
- FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5import
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${h5_file} ${dest}
- )
- ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
-
-##############################################################################
-##############################################################################
-### T H E T E S T S M A C R O S ###
-##############################################################################
-##############################################################################
- MACRO (ADD_H5_TEST testname importfile conffile testfile)
- # If using memchecker skip macro based tests
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5IMPORT-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${testfile}
- ${testfile}.new
- ${testfile}.new.err
- ${testfile}.out
- ${testfile}.out.err
- )
-
- ADD_TEST (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
- SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-${testname}-clear-objects)
-
- ADD_TEST (
- NAME H5IMPORT-${testname}-H5DMP
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=${testfile}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${testfile}.new"
- -D "TEST_EXPECT=0"
- -D "TEST_FILTER=(^(HDF5)[^\n]*)"
- -D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5IMPORT-${testname}-H5DMP PROPERTIES DEPENDS H5IMPORT-${testname})
- ADD_TEST (
- NAME H5IMPORT-${testname}-H5DMP_CMP
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=testfiles/${testfile}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${testfile}.out"
- -D "TEST_EXPECT=0"
- -D "TEST_FILTER=(^(HDF5)[^\n]*)"
- -D "TEST_REFERENCE=${testfile}.new"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5IMPORT-${testname}-H5DMP_CMP PROPERTIES DEPENDS H5IMPORT-${testname}-H5DMP)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_TEST testname importfile conffile testfile)
-
- MACRO (ADD_H5_DUMPTEST testname datasetname testfile)
- # If using memchecker skip tests
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5IMPORT-DUMP-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- d${testfile}
- d${testfile}.bin
- d${testfile}.imp
- d${testfile}.imp.err
- d${testfile}.dmp
- d${testfile}.dmp.err
- d${testfile}.dff
- d${testfile}.dff.err
- )
-
- IF ("${ARGN}" STREQUAL "BINARY")
- ADD_TEST (
- NAME H5IMPORT-DUMP-${testname}-H5DMP
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-b;testfiles/${testfile}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=d${testfile}.dmp"
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- ELSE ("${ARGN}" STREQUAL "BINARY")
- ADD_TEST (
- NAME H5IMPORT-DUMP-${testname}-H5DMP
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-y;--width=1;testfiles/${testfile}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=d${testfile}.dmp"
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- ENDIF ("${ARGN}" STREQUAL "BINARY")
- SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects")
-
- ADD_TEST (
- NAME H5IMPORT-DUMP-${testname}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5import>"
- -D "TEST_ARGS:STRING=d${testfile}.bin;-c;d${testfile}.dmp;-o;d${testfile}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=d${testfile}.imp"
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname} PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-H5DMP")
-
- ADD_TEST (
- NAME H5IMPORT-DUMP-${testname}-H5DFF
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5diff>"
- -D "TEST_ARGS:STRING=-v;d${testfile};testfiles/${testfile};${datasetname};${datasetname}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=d${testfile}.dff"
- -D "TEST_EXPECT=0"
- -D "TEST_FILTER=(^(Warning)[^\n]*)"
- -D "TEST_REFERENCE=testfiles/d${testfile}.txt"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DFF PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_DUMPTEST testname datasetname testfile)
-
- MACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5IMPORT-DUMP-${testname}-SKIPPED
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${testname} ${datasetname} ${testfile} --- DEFLATE filter not available"
- )
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile)
-
- # --------------------------------------------------------------------
- # Determine if filter is available for h5diff
- # --------------------------------------------------------------------
- IF (H5_HAVE_FILTER_DEFLATE)
- SET (USE_FILTER_DEFLATE "true")
- ENDIF (H5_HAVE_FILTER_DEFLATE)
-
-##############################################################################
-##############################################################################
-### T H E T E S T S ###
-##############################################################################
-##############################################################################
-
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5IMPORT-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- binfp64.bin
- binin8.bin
- binin8w.bin
- binin16.bin
- binin32.bin
- binuin16.bin
- binuin32.bin
- txtin32.h5
- txtin32.h5.new
- txtin32.h5.new.err
- txtin32.h5.out
- txtin32.h5.out.err
- txtin16.h5
- txtin16.h5.new
- txtin16.h5.new.err
- txtin16.h5.out
- txtin16.h5.out.err
- txtin8.h5
- txtin8.h5.new
- txtin8.h5.new.err
- txtin8.h5.out
- txtin8.h5.out.err
- txtuin16.h5
- txtuin16.h5.new
- txtuin16.h5.new.err
- txtuin16.h5.out
- txtuin16.h5.out.err
- txtuin32.h5
- txtuin32.h5.new
- txtuin32.h5.new.err
- txtuin32.h5.out
- txtuin32.h5.out.err
- txtfp32.h5
- txtfp32.h5.new
- txtfp32.h5.new.err
- txtfp32.h5.out
- txtfp32.h5.out.err
- txtfp64.h5
- txtfp64.h5.new
- txtfp64.h5.new.err
- txtfp64.h5.out
- txtfp64.h5.out.err
- binfp64.h5
- binfp64.h5.new
- binfp64.h5.new.err
- binfp64.h5.out
- binfp64.h5.out.err
- binin8.h5
- binin8.h5.new
- binin8.h5.new.err
- binin8.h5.out
- binin8.h5.out.err
- binin8w.h5
- binin8w.h5.new
- binin8w.h5.new.err
- binin8w.h5.out
- binin8w.h5.out.err
- binin16.h5
- binin16.h5.new
- binin16.h5.new.err
- binin16.h5.out
- binin16.h5.out.err
- binin32.h5
- binin32.h5.new
- binin32.h5.new.err
- binin32.h5.out
- binin32.h5.out.err
- binuin16.h5
- binuin16.h5.new
- binuin16.h5.new.err
- binuin16.h5.out
- binuin16.h5.out.err
- binuin32.h5
- binuin32.h5.new
- binuin32.h5.new.err
- binuin32.h5.out
- binuin32.h5.out.err
- txtstr.h5
- txtstr.h5.new
- txtstr.h5.new.err
- txtstr.h5.out
- txtstr.h5.out.err
- textpfe.h5
- textpfe.h5.new
- textpfe.h5.new.err
- textpfe.h5.out
- textpfe.h5.out.err
- dbinfp64.h5
- dbinfp64.h5.bin
- dbinfp64.h5.imp
- dbinfp64.h5.imp.err
- dbinfp64.h5.dmp
- dbinfp64.h5.dmp.err
- dbinfp64.h5.dff
- dbinfp64.h5.dff.err
- dbinin8.h5
- dbinin8.h5.bin
- dbinin8.h5.imp
- dbinin8.h5.imp.err
- dbinin8.h5.dmp
- dbinin8.h5.dmp.err
- dbinin8.h5.dff
- dbinin8.h5.dff.err
- dbinin8w.h5
- dbinin8w.h5.bin
- dbinin8w.h5.imp
- dbinin8w.h5.imp.err
- dbinin8w.h5.dmp
- dbinin8w.h5.dmp.err
- dbinin8w.h5.dff
- dbinin8w.h5.dff.err
- dbinin16.h5
- dbinin16.h5.bin
- dbinin16.h5.imp
- dbinin16.h5.imp.err
- dbinin16.h5.dmp
- dbinin16.h5.dmp.err
- dbinin16.h5.dff
- dbinin16.h5.dff.err
- dbinin32.h5
- dbinin32.h5.bin
- dbinin32.h5.imp
- dbinin32.h5.imp.err
- dbinin32.h5.dmp
- dbinin32.h5.dmp.err
- dbinin32.h5.dff
- dbinin32.h5.dff.err
- dbinuin16.h5
- dbinuin16.h5.bin
- dbinuin16.h5.imp
- dbinuin16.h5.imp.err
- dbinuin16.h5.dmp
- dbinuin16.h5.dmp.err
- dbinuin16.h5.dff
- dbinuin16.h5.dff.err
- dbinuin32.h5
- dbinuin32.h5.bin
- dbinuin32.h5.imp
- dbinuin32.h5.imp.err
- dbinuin32.h5.dmp
- dbinuin32.h5.dmp.err
- dbinuin32.h5.dff
- dbinuin32.h5.dff.err
- dtxtstr.h5
- dtxtstr.h5.bin
- dtxtstr.h5.imp
- dtxtstr.h5.imp.err
- dtxtstr.h5.dmp
- dtxtstr.h5.dmp.err
- dtxtstr.h5.dff
- dtxtstr.h5.dff.err
- )
- SET (last_test "H5IMPORT-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
- ADD_TEST (NAME H5IMPORT-h5importtest COMMAND $<TARGET_FILE:h5importtest>)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5IMPORT-h5importtest PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
-
- # ----- TESTING "ASCII I32 rank 3 - Output BE " ;
- ADD_H5_TEST (ASCII_I32 testfiles/txtin32.txt testfiles/txtin32.conf txtin32.h5)
-
- # ----- TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended"
- ADD_H5_TEST (ASCII_I16 testfiles/txtin16.txt testfiles/txtin16.conf txtin16.h5)
-
- # ----- TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed "
- ADD_H5_TEST (ASCII_I8 testfiles/txtin8.txt testfiles/txtin8.conf txtin8.h5)
-
- # ----- TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed "
- ADD_H5_TEST (ASCII_UI16 testfiles/txtuin16.txt testfiles/txtuin16.conf txtuin16.h5)
-
- # ----- TESTING "ASCII UI32 - rank 3 - Output BE"
- ADD_H5_TEST (ASCII_UI32 testfiles/txtuin32.txt testfiles/txtuin32.conf txtuin32.h5)
-
- # ----- TESTING "ASCII F32 - rank 3 - Output LE "
- ADD_H5_TEST (ASCII_F32 testfiles/txtfp32.txt testfiles/txtfp32.conf txtfp32.h5)
-
- # ----- TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed "
- ADD_H5_TEST (ASCII_F64 testfiles/txtfp64.txt testfiles/txtfp64.conf txtfp64.h5)
-
- # ----- TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed "
- ADD_H5_TEST (BINARY_F64 binfp64.bin testfiles/binfp64.conf binfp64.h5)
- IF (NOT USE_FILTER_DEFLATE)
- ADD_H5_SKIP_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY)
- ELSE (NOT USE_FILTER_DEFLATE)
- ADD_H5_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY)
- ENDIF (NOT USE_FILTER_DEFLATE)
-
- # ----- TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed "
- ADD_H5_TEST (BINARY_I8 binin8.bin testfiles/binin8.conf binin8.h5)
- IF (NOT USE_FILTER_DEFLATE)
- ADD_H5_SKIP_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY)
- ELSE (NOT USE_FILTER_DEFLATE)
- ADD_H5_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY)
- ENDIF (NOT USE_FILTER_DEFLATE)
-
- # ----- TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended "
- ADD_H5_TEST (BINARY_I16 binin16.bin testfiles/binin16.conf binin16.h5)
- ADD_H5_DUMPTEST (BINARY_I16 "/int/bin/16-bit" binin16.h5 BINARY)
-
- # ----- TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED "
- ADD_H5_TEST (BINARY_I32 binin32.bin testfiles/binin32.conf binin32.h5)
- ADD_H5_DUMPTEST (BINARY_I32 "/int/bin/32-bit" binin32.h5 BINARY)
-
- # ----- TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED "
- ADD_H5_TEST (BINARY_UI16 binuin16.bin testfiles/binuin16.conf binuin16.h5)
- ADD_H5_DUMPTEST (BINARY_UI16 "/int/buin/16-bit" binuin16.h5 BINARY)
-
- # ----- TESTING "BINARY UI32 - rank 3 - Output LE "
- ADD_H5_TEST (BINARY_UI32 binuin32.bin testfiles/binuin32.conf binuin32.h5)
- ADD_H5_DUMPTEST (BINARY_UI32 "/int/buin/32-bit" binuin32.h5 BINARY)
-
- # ----- TESTING "STR"
- ADD_H5_TEST (STR testfiles/txtstr.txt testfiles/txtstr.conf txtstr.h5)
- ADD_H5_DUMPTEST (STR "/mytext/data" txtstr.h5)
-
- # ----- TESTING "BINARY I8 CR LF EOF"
- ADD_H5_TEST (BINARY_I8_EOF binin8w.bin testfiles/binin8w.conf binin8w.h5)
- ADD_H5_DUMPTEST (BINARY_I8_EOF "/dataset0" binin8w.h5 BINARY)
-
- # ----- TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE "
- ADD_H5_TEST (ASCII_F64_R1 testfiles/textpfe64.txt testfiles/textpfe.conf textpfe.h5)
+ INCLUDE (CMakeTests.cmake)
ENDIF (BUILD_TESTING)
diff --git a/tools/h5import/CMakeTests.cmake b/tools/h5import/CMakeTests.cmake
new file mode 100644
index 0000000..cb76204
--- /dev/null
+++ b/tools/h5import/CMakeTests.cmake
@@ -0,0 +1,478 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ SET (HDF5_REFERENCE_CONF_FILES
+ binfp64.conf
+ binin8.conf
+ binin8w.conf
+ binin16.conf
+ binin32.conf
+ binuin16.conf
+ binuin32.conf
+ txtfp32.conf
+ txtfp64.conf
+ txtin8.conf
+ txtin16.conf
+ txtin32.conf
+ txtuin16.conf
+ txtuin32.conf
+ textpfe.conf
+ txtstr.conf
+ )
+ SET (HDF5_REFERENCE_TXT_FILES
+ txtfp32.txt
+ txtfp64.txt
+ txtuin16.txt
+ txtuin32.txt
+ txtin8.txt
+ txtin16.txt
+ txtin32.txt
+ textpfe64.txt
+ txtstr.txt
+ dbinfp64.h5.txt
+ dbinin8.h5.txt
+ dbinin8w.h5.txt
+ dbinin16.h5.txt
+ dbinin32.h5.txt
+ dbinuin16.h5.txt
+ dbinuin32.h5.txt
+ dtxtstr.h5.txt
+ )
+ SET (HDF5_REFERENCE_TEST_FILES
+ binfp64.h5
+ binin8.h5
+ binin8w.h5
+ binin16.h5
+ binin32.h5
+ binuin16.h5
+ binuin32.h5
+ txtfp32.h5
+ txtfp64.h5
+ txtin8.h5
+ txtin16.h5
+ txtin32.h5
+ txtuin16.h5
+ txtuin32.h5
+ txtstr.h5
+ textpfe.h5
+ )
+
+ FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ FOREACH (conf_file ${HDF5_REFERENCE_CONF_FILES})
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/${conf_file}")
+ #MESSAGE (STATUS " Copying ${conf_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5import
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${conf_file} ${dest}
+ )
+ ENDFOREACH (conf_file ${HDF5_REFERENCE_CONF_FILES})
+
+ FOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
+ #MESSAGE (STATUS " Copying ${txt_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5import
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${txt_file} ${dest}
+ )
+ ENDFOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
+
+ FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
+ #MESSAGE (STATUS " Copying ${h5_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5import
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_H5IMPORT_SOURCE_DIR}/testfiles/${h5_file} ${dest}
+ )
+ ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+ MACRO (ADD_H5_TEST testname importfile conffile testfile)
+ # If using memchecker skip macro based tests
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5IMPORT-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${testfile}
+ ${testfile}.new
+ ${testfile}.new.err
+ ${testfile}.out
+ ${testfile}.out.err
+ )
+
+ ADD_TEST (NAME H5IMPORT-${testname} COMMAND $<TARGET_FILE:h5import> ${importfile} -c ${conffile} -o ${testfile})
+ SET_TESTS_PROPERTIES (H5IMPORT-${testname} PROPERTIES DEPENDS H5IMPORT-${testname}-clear-objects)
+
+ ADD_TEST (
+ NAME H5IMPORT-${testname}-H5DMP
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${testfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${testfile}.new"
+ -D "TEST_EXPECT=0"
+ -D "TEST_FILTER=(^(HDF5)[^\n]*)"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5IMPORT-${testname}-H5DMP PROPERTIES DEPENDS H5IMPORT-${testname})
+ ADD_TEST (
+ NAME H5IMPORT-${testname}-H5DMP_CMP
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=testfiles/${testfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${testfile}.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_FILTER=(^(HDF5)[^\n]*)"
+ -D "TEST_REFERENCE=${testfile}.new"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5IMPORT-${testname}-H5DMP_CMP PROPERTIES DEPENDS H5IMPORT-${testname}-H5DMP)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_TEST testname importfile conffile testfile)
+
+ MACRO (ADD_H5_DUMPTEST testname datasetname testfile)
+ # If using memchecker skip tests
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5IMPORT-DUMP-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ d${testfile}
+ d${testfile}.bin
+ d${testfile}.imp
+ d${testfile}.imp.err
+ d${testfile}.dmp
+ d${testfile}.dmp.err
+ d${testfile}.dff
+ d${testfile}.dff.err
+ )
+
+ IF ("${ARGN}" STREQUAL "BINARY")
+ ADD_TEST (
+ NAME H5IMPORT-DUMP-${testname}-H5DMP
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-b;testfiles/${testfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=d${testfile}.dmp"
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ ELSE ("${ARGN}" STREQUAL "BINARY")
+ ADD_TEST (
+ NAME H5IMPORT-DUMP-${testname}-H5DMP
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=-p;-d;${datasetname};-o;d${testfile}.bin;-y;--width=1;testfiles/${testfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=d${testfile}.dmp"
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ ENDIF ("${ARGN}" STREQUAL "BINARY")
+ SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DMP PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-clear-objects")
+
+ ADD_TEST (
+ NAME H5IMPORT-DUMP-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5import>"
+ -D "TEST_ARGS:STRING=d${testfile}.bin;-c;d${testfile}.dmp;-o;d${testfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=d${testfile}.imp"
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname} PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}-H5DMP")
+
+ ADD_TEST (
+ NAME H5IMPORT-DUMP-${testname}-H5DFF
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5diff>"
+ -D "TEST_ARGS:STRING=-v;d${testfile};testfiles/${testfile};${datasetname};${datasetname}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=d${testfile}.dff"
+ -D "TEST_EXPECT=0"
+ -D "TEST_FILTER=(^(Warning)[^\n]*)"
+ -D "TEST_REFERENCE=testfiles/d${testfile}.txt"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5IMPORT-DUMP-${testname}-H5DFF PROPERTIES DEPENDS "H5IMPORT-DUMP-${testname}")
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_DUMPTEST testname datasetname testfile)
+
+ MACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5IMPORT-DUMP-${testname}-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${testname} ${datasetname} ${testfile} --- DEFLATE filter not available"
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_SKIP_DUMPTEST testname datasetname testfile)
+
+ # --------------------------------------------------------------------
+ # Determine if filter is available for h5diff
+ # --------------------------------------------------------------------
+ IF (H5_HAVE_FILTER_DEFLATE)
+ SET (USE_FILTER_DEFLATE "true")
+ ENDIF (H5_HAVE_FILTER_DEFLATE)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5IMPORT-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ binfp64.bin
+ binin8.bin
+ binin8w.bin
+ binin16.bin
+ binin32.bin
+ binuin16.bin
+ binuin32.bin
+ txtin32.h5
+ txtin32.h5.new
+ txtin32.h5.new.err
+ txtin32.h5.out
+ txtin32.h5.out.err
+ txtin16.h5
+ txtin16.h5.new
+ txtin16.h5.new.err
+ txtin16.h5.out
+ txtin16.h5.out.err
+ txtin8.h5
+ txtin8.h5.new
+ txtin8.h5.new.err
+ txtin8.h5.out
+ txtin8.h5.out.err
+ txtuin16.h5
+ txtuin16.h5.new
+ txtuin16.h5.new.err
+ txtuin16.h5.out
+ txtuin16.h5.out.err
+ txtuin32.h5
+ txtuin32.h5.new
+ txtuin32.h5.new.err
+ txtuin32.h5.out
+ txtuin32.h5.out.err
+ txtfp32.h5
+ txtfp32.h5.new
+ txtfp32.h5.new.err
+ txtfp32.h5.out
+ txtfp32.h5.out.err
+ txtfp64.h5
+ txtfp64.h5.new
+ txtfp64.h5.new.err
+ txtfp64.h5.out
+ txtfp64.h5.out.err
+ binfp64.h5
+ binfp64.h5.new
+ binfp64.h5.new.err
+ binfp64.h5.out
+ binfp64.h5.out.err
+ binin8.h5
+ binin8.h5.new
+ binin8.h5.new.err
+ binin8.h5.out
+ binin8.h5.out.err
+ binin8w.h5
+ binin8w.h5.new
+ binin8w.h5.new.err
+ binin8w.h5.out
+ binin8w.h5.out.err
+ binin16.h5
+ binin16.h5.new
+ binin16.h5.new.err
+ binin16.h5.out
+ binin16.h5.out.err
+ binin32.h5
+ binin32.h5.new
+ binin32.h5.new.err
+ binin32.h5.out
+ binin32.h5.out.err
+ binuin16.h5
+ binuin16.h5.new
+ binuin16.h5.new.err
+ binuin16.h5.out
+ binuin16.h5.out.err
+ binuin32.h5
+ binuin32.h5.new
+ binuin32.h5.new.err
+ binuin32.h5.out
+ binuin32.h5.out.err
+ txtstr.h5
+ txtstr.h5.new
+ txtstr.h5.new.err
+ txtstr.h5.out
+ txtstr.h5.out.err
+ textpfe.h5
+ textpfe.h5.new
+ textpfe.h5.new.err
+ textpfe.h5.out
+ textpfe.h5.out.err
+ dbinfp64.h5
+ dbinfp64.h5.bin
+ dbinfp64.h5.imp
+ dbinfp64.h5.imp.err
+ dbinfp64.h5.dmp
+ dbinfp64.h5.dmp.err
+ dbinfp64.h5.dff
+ dbinfp64.h5.dff.err
+ dbinin8.h5
+ dbinin8.h5.bin
+ dbinin8.h5.imp
+ dbinin8.h5.imp.err
+ dbinin8.h5.dmp
+ dbinin8.h5.dmp.err
+ dbinin8.h5.dff
+ dbinin8.h5.dff.err
+ dbinin8w.h5
+ dbinin8w.h5.bin
+ dbinin8w.h5.imp
+ dbinin8w.h5.imp.err
+ dbinin8w.h5.dmp
+ dbinin8w.h5.dmp.err
+ dbinin8w.h5.dff
+ dbinin8w.h5.dff.err
+ dbinin16.h5
+ dbinin16.h5.bin
+ dbinin16.h5.imp
+ dbinin16.h5.imp.err
+ dbinin16.h5.dmp
+ dbinin16.h5.dmp.err
+ dbinin16.h5.dff
+ dbinin16.h5.dff.err
+ dbinin32.h5
+ dbinin32.h5.bin
+ dbinin32.h5.imp
+ dbinin32.h5.imp.err
+ dbinin32.h5.dmp
+ dbinin32.h5.dmp.err
+ dbinin32.h5.dff
+ dbinin32.h5.dff.err
+ dbinuin16.h5
+ dbinuin16.h5.bin
+ dbinuin16.h5.imp
+ dbinuin16.h5.imp.err
+ dbinuin16.h5.dmp
+ dbinuin16.h5.dmp.err
+ dbinuin16.h5.dff
+ dbinuin16.h5.dff.err
+ dbinuin32.h5
+ dbinuin32.h5.bin
+ dbinuin32.h5.imp
+ dbinuin32.h5.imp.err
+ dbinuin32.h5.dmp
+ dbinuin32.h5.dmp.err
+ dbinuin32.h5.dff
+ dbinuin32.h5.dff.err
+ dtxtstr.h5
+ dtxtstr.h5.bin
+ dtxtstr.h5.imp
+ dtxtstr.h5.imp.err
+ dtxtstr.h5.dmp
+ dtxtstr.h5.dmp.err
+ dtxtstr.h5.dff
+ dtxtstr.h5.dff.err
+ )
+ SET (last_test "H5IMPORT-clear-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_TEST (NAME H5IMPORT-h5importtest COMMAND $<TARGET_FILE:h5importtest>)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5IMPORT-h5importtest PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+
+ # ----- TESTING "ASCII I32 rank 3 - Output BE " ;
+ ADD_H5_TEST (ASCII_I32 testfiles/txtin32.txt testfiles/txtin32.conf txtin32.h5)
+
+ # ----- TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended"
+ ADD_H5_TEST (ASCII_I16 testfiles/txtin16.txt testfiles/txtin16.conf txtin16.h5)
+
+ # ----- TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed "
+ ADD_H5_TEST (ASCII_I8 testfiles/txtin8.txt testfiles/txtin8.conf txtin8.h5)
+
+ # ----- TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed "
+ ADD_H5_TEST (ASCII_UI16 testfiles/txtuin16.txt testfiles/txtuin16.conf txtuin16.h5)
+
+ # ----- TESTING "ASCII UI32 - rank 3 - Output BE"
+ ADD_H5_TEST (ASCII_UI32 testfiles/txtuin32.txt testfiles/txtuin32.conf txtuin32.h5)
+
+ # ----- TESTING "ASCII F32 - rank 3 - Output LE "
+ ADD_H5_TEST (ASCII_F32 testfiles/txtfp32.txt testfiles/txtfp32.conf txtfp32.h5)
+
+ # ----- TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed "
+ ADD_H5_TEST (ASCII_F64 testfiles/txtfp64.txt testfiles/txtfp64.conf txtfp64.h5)
+
+ # ----- TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed "
+ ADD_H5_TEST (BINARY_F64 binfp64.bin testfiles/binfp64.conf binfp64.h5)
+ IF (NOT USE_FILTER_DEFLATE)
+ ADD_H5_SKIP_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY)
+ ELSE (NOT USE_FILTER_DEFLATE)
+ ADD_H5_DUMPTEST (BINARY_F64 "/fp/bin/64-bit" binfp64.h5 BINARY)
+ ENDIF (NOT USE_FILTER_DEFLATE)
+
+ # ----- TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed "
+ ADD_H5_TEST (BINARY_I8 binin8.bin testfiles/binin8.conf binin8.h5)
+ IF (NOT USE_FILTER_DEFLATE)
+ ADD_H5_SKIP_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY)
+ ELSE (NOT USE_FILTER_DEFLATE)
+ ADD_H5_DUMPTEST (BINARY_I8 "/int/bin/8-bit" binin8.h5 BINARY)
+ ENDIF (NOT USE_FILTER_DEFLATE)
+
+ # ----- TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended "
+ ADD_H5_TEST (BINARY_I16 binin16.bin testfiles/binin16.conf binin16.h5)
+ ADD_H5_DUMPTEST (BINARY_I16 "/int/bin/16-bit" binin16.h5 BINARY)
+
+ # ----- TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED "
+ ADD_H5_TEST (BINARY_I32 binin32.bin testfiles/binin32.conf binin32.h5)
+ ADD_H5_DUMPTEST (BINARY_I32 "/int/bin/32-bit" binin32.h5 BINARY)
+
+ # ----- TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED "
+ ADD_H5_TEST (BINARY_UI16 binuin16.bin testfiles/binuin16.conf binuin16.h5)
+ ADD_H5_DUMPTEST (BINARY_UI16 "/int/buin/16-bit" binuin16.h5 BINARY)
+
+ # ----- TESTING "BINARY UI32 - rank 3 - Output LE "
+ ADD_H5_TEST (BINARY_UI32 binuin32.bin testfiles/binuin32.conf binuin32.h5)
+ ADD_H5_DUMPTEST (BINARY_UI32 "/int/buin/32-bit" binuin32.h5 BINARY)
+
+ # ----- TESTING "STR"
+ ADD_H5_TEST (STR testfiles/txtstr.txt testfiles/txtstr.conf txtstr.h5)
+ ADD_H5_DUMPTEST (STR "/mytext/data" txtstr.h5)
+
+ # ----- TESTING "BINARY I8 CR LF EOF"
+ ADD_H5_TEST (BINARY_I8_EOF binin8w.bin testfiles/binin8w.conf binin8w.h5)
+ ADD_H5_DUMPTEST (BINARY_I8_EOF "/dataset0" binin8w.h5 BINARY)
+
+ # ----- TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE "
+ ADD_H5_TEST (ASCII_F64_R1 testfiles/textpfe64.txt testfiles/textpfe.conf textpfe.h5)
+
diff --git a/tools/h5jam/CMakeLists.txt b/tools/h5jam/CMakeLists.txt
index af9639d..49d1b0c 100644
--- a/tools/h5jam/CMakeLists.txt
+++ b/tools/h5jam/CMakeLists.txt
@@ -40,12 +40,6 @@ SET (H5_DEP_EXECUTABLES
h5unjam
)
-##############################################################################
-##############################################################################
-### T E S T I N G ###
-##############################################################################
-##############################################################################
-
IF (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5jam test executables
@@ -60,427 +54,7 @@ IF (BUILD_TESTING)
#ADD_TEST (NAME h5jamgentest COMMAND $<TARGET_FILE:h5jamgentest>)
ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
- SET (HDF5_REFERENCE_TXT_FILES
- u10.txt
- u511.txt
- u512.txt
- u513.txt
- h5jam-help.txt
- h5unjam-help.txt
- h5jam-ub-nohdf5.txt
- )
- SET (HDF5_REFERENCE_TEST_FILES
- tall.h5
- twithub.h5
- twithub513.h5
- )
-
- FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5jam
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${h5_file} ${dest}
- )
- ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
-
- FOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
- #MESSAGE (STATUS " Copying ${txt_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5jam
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${txt_file} ${dest}
- )
- ENDFOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
-
-##############################################################################
-##############################################################################
-### T H E T E S T S M A C R O S ###
-##############################################################################
-##############################################################################
-
- # ============================================================
- # TEST_H5JAM_OUTPUT
- # For the purpose to verify only output & exitcode from h5jam
- #
- MACRO (TEST_H5JAM_OUTPUT expectfile resultcode)
- # If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5JAM-${expectfile} COMMAND $<TARGET_FILE:h5jam> ${ARGN})
- IF (NOT "${resultcode}" STREQUAL "0")
- SET_TESTS_PROPERTIES (H5JAM-${expectfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT "${resultcode}" STREQUAL "0")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5JAM-${expectfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${expectfile}.out
- ${expectfile}.out.err
- )
- ADD_TEST (
- NAME H5JAM-${expectfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5jam>"
- -D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${expectfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=testfiles/${expectfile}.txt"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5JAM-${expectfile} PROPERTIES DEPENDS H5JAM-${expectfile}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (TEST_H5JAM_OUTPUT)
-
- # ============================================================
- # TEST_H5UNJAM_OUTPUT
- # For the purpose to verify only output & exitcode from h5unjam
- #
- MACRO (TEST_H5UNJAM_OUTPUT expectfile resultcode)
- # If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5JAM-UNJAM-${expectfile} COMMAND $<TARGET_FILE:h5unjam> ${ARGN})
- IF (NOT "${resultcode}" STREQUAL "0")
- SET_TESTS_PROPERTIES (H5JAM-UNJAM-${expectfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT "${resultcode}" STREQUAL "0")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5JAM-UNJAM-${expectfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${expectfile}.out
- ${expectfile}.out.err
- )
- ADD_TEST (
- NAME H5JAM-UNJAM-${expectfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam>"
- -D "TEST_ARGS=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${expectfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=testfiles/${expectfile}.txt"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5JAM-UNJAM-${expectfile} PROPERTIES DEPENDS H5JAM-UNJAM-${expectfile}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (TEST_H5UNJAM_OUTPUT)
-
- MACRO (CHECKFILE testname testdepends expected actual)
- # If using memchecker add tests without using scripts
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5JAM-${testname}-CHECKFILE-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${actual}.new
- ${actual}.new.err
- ${actual}.out
- ${actual}.out.err
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-clear-objects PROPERTIES DEPENDS ${testdepends})
- ADD_TEST (
- NAME H5JAM-${testname}-CHECKFILE-H5DMP
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=testfiles/${expected}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${actual}.new"
- -D "TEST_EXPECT=0"
- -D "TEST_FILTER=(^(HDF5)[^\n]*)"
- -D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-H5DMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-clear-objects)
- ADD_TEST (
- NAME H5JAM-${testname}-CHECKFILE-H5DMP_CMP
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=${actual}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${actual}.out"
- -D "TEST_EXPECT=0"
- -D "TEST_FILTER=(^(HDF5)[^\n]*)"
- -D "TEST_REFERENCE=${actual}.new"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-H5DMP_CMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-H5DMP)
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO(CHECKFILE testname testdepends expected actual)
-
- MACRO (UNJAMTEST testname setfile infile ufile chkfile outfile)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5JAM-${testname}-UNJAM-SETUP-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${infile}
- )
- ADD_TEST (
- NAME H5JAM-${testname}-UNJAM-SETUP
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${setfile} ${PROJECT_BINARY_DIR}/${infile}
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-SETUP PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP-clear-objects)
- ADD_TEST (
- NAME H5JAM-${testname}-UNJAM-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${outfile}
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP)
- IF (NOT "${ufile}" STREQUAL "NONE")
- ADD_TEST (
- NAME H5JAM-${testname}-UNJAM_D-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${ufile}
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
- ADD_TEST (NAME H5JAM-${testname}-UNJAM COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -u ${ufile} -o ${outfile})
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
- SET (compare_test ${ufile})
- ELSE (NOT "${ufile}" STREQUAL "NONE")
- IF (NOT "${ARGN}" STREQUAL "--delete")
- ADD_TEST (
- NAME H5JAM-${testname}-UNJAM_D-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${outfile}.ufile.txt ${outfile}.ufile.txt.err
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
- ADD_TEST (
- NAME H5JAM-${testname}-UNJAM
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam>"
- -D "TEST_ARGS:STRING=-i;${infile};-o;${outfile}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${outfile}.ufile.txt"
- -D "TEST_EXPECT=0"
- -D "TEST_SKIP_COMPARE=TRUE"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
- SET (compare_test "${outfile}.ufile.txt")
- ELSE (NOT "${ARGN}" STREQUAL "--delete")
- ADD_TEST (NAME H5JAM-${testname}-UNJAM COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -o ${outfile})
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
- SET (compare_test "")
- ENDIF (NOT "${ARGN}" STREQUAL "--delete")
- ENDIF (NOT "${ufile}" STREQUAL "NONE")
- IF (NOT "${compare_test}" STREQUAL "")
- ADD_TEST (
- NAME H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${infile}.len.txt
- ${infile}.cmp
- ${infile}-ub.cmp
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}-UNJAM")
- ADD_TEST (
- NAME H5JAM-${testname}-UNJAM-CHECK_UB_1
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
- -D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
- -D "TEST_CHECKUB=YES"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_HFILE=${infile}"
- -D "TEST_UFILE=${compare_test}"
- -D "TEST_EXPECT=0"
- -D "TEST_OFILE="
- -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects)
- ENDIF (NOT "${compare_test}" STREQUAL "")
-
- ADD_TEST (
- NAME H5JAM-${testname}-UNJAM-CHECK_NOUB
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
- -D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
- -D "TEST_CHECKUB=NO"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_HFILE=${outfile}"
- -D "TEST_EXPECT=0"
- -D "TEST_UFILE=NULL"
- -D "TEST_OFILE=NULL"
- -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
- )
- IF (NOT "${compare_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1)
- ELSE (NOT "${compare_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM)
- ENDIF (NOT "${compare_test}" STREQUAL "")
-
- CHECKFILE (${testname} "H5JAM-${testname}-UNJAM-CHECK_NOUB" ${chkfile} ${outfile})
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO(UNJAMTEST testname infile ufile outfile)
-
- MACRO (JAMTEST testname jamfile infile chkfile outfile)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5JAM-${testname}-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove ${outfile} ${infile}.cpy.h5
- )
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5JAM-${testname} COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i testfiles/${infile} -o ${outfile} ${ARGN})
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5JAM-${testname} PROPERTIES DEPENDS H5JAM-${testname}-clear-objects)
- SET (compare_test ${outfile})
- SET (compare_orig testfiles/${infile})
- IF ("${ARGN}" STREQUAL "--clobber")
- SET (compare_orig "")
- ENDIF ("${ARGN}" STREQUAL "--clobber")
-
- ADD_TEST (
- NAME H5JAM-${testname}-CHECK_UB_1-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${compare_test}.len.txt
- ${compare_test}.cmp
- ${compare_test}-ub.cmp
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}")
- ADD_TEST (
- NAME H5JAM-${testname}-CHECK_UB_1
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
- -D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
- -D "TEST_CHECKUB=YES"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_HFILE=${compare_test}"
- -D "TEST_UFILE=testfiles/${jamfile}"
- -D "TEST_EXPECT=0"
- -D "TEST_OFILE=${compare_orig}"
- -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-CHECK_UB_1-clear-objects)
- CHECKFILE (${testname} "H5JAM-${testname}-CHECK_UB_1" ${chkfile} ${outfile})
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (JAMTEST testname jamfile infile outfile)
-
- MACRO (JAMTEST_NONE testname jamfile infile setfile chkfile)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5JAM-${testname}_NONE-clear-objects
- COMMAND ${CMAKE_COMMAND} -E remove
- ${chkfile} ${chkfile}.cpy.h5
- )
- ADD_TEST (
- NAME H5JAM-${testname}_NONE-SETUP
- COMMAND ${CMAKE_COMMAND} -E copy_if_different testfiles/${setfile} ${chkfile}
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-SETUP PROPERTIES DEPENDS H5JAM-${testname}_NONE-clear-objects)
-
- ADD_TEST (
- NAME H5JAM-${testname}_NONE_COPY
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${chkfile} ${chkfile}.cpy.h5
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE_COPY PROPERTIES DEPENDS H5JAM-${testname}_NONE-SETUP)
-
- ADD_TEST (NAME H5JAM-${testname}_NONE COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i ${chkfile} ${ARGN})
- SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE PROPERTIES DEPENDS H5JAM-${testname}_NONE_COPY)
-
- SET (compare_test ${chkfile})
- SET (compare_orig ${chkfile}.cpy.h5)
- IF ("${ARGN}" STREQUAL "--clobber")
- SET (compare_orig "")
- ENDIF ("${ARGN}" STREQUAL "--clobber")
-
- ADD_TEST (
- NAME H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${compare_test}.len.txt
- ${compare_test}.cmp
- ${compare_test}-ub.cmp
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}_NONE")
- ADD_TEST (
- NAME H5JAM-${testname}_NONE-CHECK_UB_1
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
- -D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
- -D "TEST_CHECKUB=YES"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_HFILE=${compare_test}"
- -D "TEST_UFILE=testfiles/${jamfile}"
- -D "TEST_EXPECT=0"
- -D "TEST_OFILE=${compare_orig}"
- -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects)
- CHECKFILE (${testname} "H5JAM-${testname}_NONE-CHECK_UB_1" ${infile} ${chkfile})
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (JAMTEST_NONE testname jamfile infile setfile chkfile)
-
-##############################################################################
-##############################################################################
-### T H E T E S T S ###
-##############################################################################
-##############################################################################
-
-#-------------------------------
-# Testing h5jam
-#-------------------------------
- # help page
- TEST_H5JAM_OUTPUT(h5jam-help 0 -h)
-
- # don't allow HDF5 format file as an user block file
- TEST_H5JAM_OUTPUT(h5jam-ub-nohdf5 1 -i testfiles/tall.h5 -u testfiles/tall.h5 -o tall-tmp.h5)
-
- JAMTEST (tall_u10 u10.txt tall.h5 tall.h5 ta2.h5)
- JAMTEST (tall_u511 u511.txt tall.h5 tall.h5 ta3.h5)
- JAMTEST (tall_u512 u512.txt tall.h5 tall.h5 ta4.h5)
- JAMTEST (tall_u513 u513.txt tall.h5 tall.h5 ta5.h5)
-
- JAMTEST_NONE (N_ta_u10 u10.txt tall.h5 tall.h5 ta6.h5)
- JAMTEST_NONE (N_ta_u511 u511.txt tall.h5 tall.h5 ta7.h5)
- JAMTEST_NONE (N_ta_u512 u512.txt tall.h5 tall.h5 ta8.h5)
- JAMTEST_NONE (N_ta_u513 u513.txt tall.h5 tall.h5 ta9.h5)
-
- JAMTEST (twithub_u10 u10.txt twithub.h5 tall.h5 tax2.h5)
- JAMTEST (twithub_u511 u511.txt twithub.h5 tall.h5 tax3.h5)
- JAMTEST (twithub_u512 u512.txt twithub.h5 tall.h5 tax4.h5)
- JAMTEST (twithub_u513 u513.txt twithub.h5 tall.h5 tax5.h5)
-
- JAMTEST (twithub513_u10 u10.txt twithub513.h5 tall.h5 tax6.h5)
- JAMTEST (twithub513_u511 u511.txt twithub513.h5 tall.h5 tax7.h5)
- JAMTEST (twithub513_u512 u512.txt twithub513.h5 tall.h5 tax8.h5)
- JAMTEST (twithub513_u513 u513.txt twithub513.h5 tall.h5 tax9.h5)
-
- JAMTEST (twithub_u10_c u10.txt twithub.h5 tall.h5 taz2.h5 --clobber)
- JAMTEST (twithub_u511_c u511.txt twithub.h5 tall.h5 taz3.h5 --clobber)
- JAMTEST (twithub_u512_c u512.txt twithub.h5 tall.h5 taz4.h5 --clobber)
- JAMTEST (twithub_u513_c u513.txt twithub.h5 tall.h5 taz5.h5 --clobber)
-
- JAMTEST (twithub513_u10_c u10.txt twithub513.h5 tall.h5 taz6.h5 --clobber)
- JAMTEST (twithub513_u511_c u511.txt twithub513.h5 tall.h5 taz7.h5 --clobber)
- JAMTEST (twithub513_u512_c u512.txt twithub513.h5 tall.h5 taz8.h5 --clobber)
- JAMTEST (twithub513_u513_c u513.txt twithub513.h5 tall.h5 taz9.h5 --clobber)
-
- JAMTEST_NONE (N_twithub_u10_c u10.txt tall.h5 twithub.h5 tay2.h5 --clobber)
- JAMTEST_NONE (N_twithub_u511_c u511.txt tall.h5 twithub.h5 tay3.h5 --clobber)
- JAMTEST_NONE (N_twithub_u512_c u512.txt tall.h5 twithub.h5 tay4.h5 --clobber)
- JAMTEST_NONE (N_twithub_u513_c u513.txt tall.h5 twithub.h5 tay5.h5 --clobber)
-
- JAMTEST_NONE (N_twithub513_u10_c u10.txt tall.h5 twithub513.h5 tay6.h5 --clobber)
- JAMTEST_NONE (N_twithub513_u511_c u511.txt tall.h5 twithub513.h5 tay7.h5 --clobber)
- JAMTEST_NONE (N_twithub513_u512_c u512.txt tall.h5 twithub513.h5 tay8.h5 --clobber)
- JAMTEST_NONE (N_twithub513_u513_c u513.txt tall.h5 twithub513.h5 tay9.h5 --clobber)
-
-#-------------------------------
-# Testing h5unjam
-#-------------------------------
- # help page
- TEST_H5UNJAM_OUTPUT(h5unjam-help 0 -h)
-
- UNJAMTEST (twithub_tall twithub.h5 tai1.h5 o10.txt tall.h5 taa1.h5)
- UNJAMTEST (twithub513_tall twithub513.h5 tai2.h5 o512.txt tall.h5 taa2.h5)
-
- UNJAMTEST (N_twithub_tall twithub.h5 tai3.h5 NONE tall.h5 taa3.h5)
- UNJAMTEST (N_twithub513_tall twithub513.h5 tai4.h5 NONE tall.h5 taa4.h5)
-
- UNJAMTEST (D_twithub_tall twithub.h5 taj2.h5 NONE tall.h5 tac2.h5 --delete)
- UNJAMTEST (D_twithub513_tall twithub513.h5 taj3.h5 NONE tall.h5 tac3.h5 --delete)
+ INCLUDE (CMakeTests.cmake)
ENDIF (BUILD_TESTING)
diff --git a/tools/h5jam/CMakeTests.cmake b/tools/h5jam/CMakeTests.cmake
new file mode 100644
index 0000000..3816e85
--- /dev/null
+++ b/tools/h5jam/CMakeTests.cmake
@@ -0,0 +1,428 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ SET (HDF5_REFERENCE_TXT_FILES
+ u10.txt
+ u511.txt
+ u512.txt
+ u513.txt
+ h5jam-help.txt
+ h5unjam-help.txt
+ h5jam-ub-nohdf5.txt
+ )
+ SET (HDF5_REFERENCE_TEST_FILES
+ tall.h5
+ twithub.h5
+ twithub513.h5
+ )
+
+ FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_file}")
+ #MESSAGE (STATUS " Copying ${h5_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5jam
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${h5_file} ${dest}
+ )
+ ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+
+ FOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/${txt_file}")
+ #MESSAGE (STATUS " Copying ${txt_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5jam
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${txt_file} ${dest}
+ )
+ ENDFOREACH (txt_file ${HDF5_REFERENCE_TXT_FILES})
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ # ============================================================
+ # TEST_H5JAM_OUTPUT
+ # For the purpose to verify only output & exitcode from h5jam
+ #
+ MACRO (TEST_H5JAM_OUTPUT expectfile resultcode)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5JAM-${expectfile} COMMAND $<TARGET_FILE:h5jam> ${ARGN})
+ IF (NOT "${resultcode}" STREQUAL "0")
+ SET_TESTS_PROPERTIES (H5JAM-${expectfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT "${resultcode}" STREQUAL "0")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5JAM-${expectfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${expectfile}.out
+ ${expectfile}.out.err
+ )
+ ADD_TEST (
+ NAME H5JAM-${expectfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5jam>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${expectfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=testfiles/${expectfile}.txt"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${expectfile} PROPERTIES DEPENDS H5JAM-${expectfile}-clear-objects)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (TEST_H5JAM_OUTPUT)
+
+ # ============================================================
+ # TEST_H5UNJAM_OUTPUT
+ # For the purpose to verify only output & exitcode from h5unjam
+ #
+ MACRO (TEST_H5UNJAM_OUTPUT expectfile resultcode)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5JAM-UNJAM-${expectfile} COMMAND $<TARGET_FILE:h5unjam> ${ARGN})
+ IF (NOT "${resultcode}" STREQUAL "0")
+ SET_TESTS_PROPERTIES (H5JAM-UNJAM-${expectfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT "${resultcode}" STREQUAL "0")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5JAM-UNJAM-${expectfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${expectfile}.out
+ ${expectfile}.out.err
+ )
+ ADD_TEST (
+ NAME H5JAM-UNJAM-${expectfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam>"
+ -D "TEST_ARGS=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${expectfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=testfiles/${expectfile}.txt"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5JAM-UNJAM-${expectfile} PROPERTIES DEPENDS H5JAM-UNJAM-${expectfile}-clear-objects)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (TEST_H5UNJAM_OUTPUT)
+
+ MACRO (CHECKFILE testname testdepends expected actual)
+ # If using memchecker add tests without using scripts
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5JAM-${testname}-CHECKFILE-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${actual}.new
+ ${actual}.new.err
+ ${actual}.out
+ ${actual}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-clear-objects PROPERTIES DEPENDS ${testdepends})
+ ADD_TEST (
+ NAME H5JAM-${testname}-CHECKFILE-H5DMP
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=testfiles/${expected}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${actual}.new"
+ -D "TEST_EXPECT=0"
+ -D "TEST_FILTER=(^(HDF5)[^\n]*)"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-H5DMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-clear-objects)
+ ADD_TEST (
+ NAME H5JAM-${testname}-CHECKFILE-H5DMP_CMP
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${actual}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${actual}.out"
+ -D "TEST_EXPECT=0"
+ -D "TEST_FILTER=(^(HDF5)[^\n]*)"
+ -D "TEST_REFERENCE=${actual}.new"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECKFILE-H5DMP_CMP PROPERTIES DEPENDS H5JAM-${testname}-CHECKFILE-H5DMP)
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO(CHECKFILE testname testdepends expected actual)
+
+ MACRO (UNJAMTEST testname setfile infile ufile chkfile outfile)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM-SETUP-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${infile}
+ )
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM-SETUP
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${HDF5_TOOLS_H5JAM_SOURCE_DIR}/testfiles/${setfile} ${PROJECT_BINARY_DIR}/${infile}
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-SETUP PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP-clear-objects)
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${outfile}
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-SETUP)
+ IF (NOT "${ufile}" STREQUAL "NONE")
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM_D-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${ufile}
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
+ ADD_TEST (NAME H5JAM-${testname}-UNJAM COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -u ${ufile} -o ${outfile})
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
+ SET (compare_test ${ufile})
+ ELSE (NOT "${ufile}" STREQUAL "NONE")
+ IF (NOT "${ARGN}" STREQUAL "--delete")
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM_D-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${outfile}.ufile.txt ${outfile}.ufile.txt.err
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM_D-clear-objects PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5unjam>"
+ -D "TEST_ARGS:STRING=-i;${infile};-o;${outfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${outfile}.ufile.txt"
+ -D "TEST_EXPECT=0"
+ -D "TEST_SKIP_COMPARE=TRUE"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM_D-clear-objects)
+ SET (compare_test "${outfile}.ufile.txt")
+ ELSE (NOT "${ARGN}" STREQUAL "--delete")
+ ADD_TEST (NAME H5JAM-${testname}-UNJAM COMMAND $<TARGET_FILE:h5unjam> -i ${infile} -o ${outfile})
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-clear-objects)
+ SET (compare_test "")
+ ENDIF (NOT "${ARGN}" STREQUAL "--delete")
+ ENDIF (NOT "${ufile}" STREQUAL "NONE")
+ IF (NOT "${compare_test}" STREQUAL "")
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${infile}.len.txt
+ ${infile}.cmp
+ ${infile}-ub.cmp
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}-UNJAM")
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM-CHECK_UB_1
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
+ -D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
+ -D "TEST_CHECKUB=YES"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_HFILE=${infile}"
+ -D "TEST_UFILE=${compare_test}"
+ -D "TEST_EXPECT=0"
+ -D "TEST_OFILE="
+ -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1-clear-objects)
+ ENDIF (NOT "${compare_test}" STREQUAL "")
+
+ ADD_TEST (
+ NAME H5JAM-${testname}-UNJAM-CHECK_NOUB
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
+ -D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
+ -D "TEST_CHECKUB=NO"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_HFILE=${outfile}"
+ -D "TEST_EXPECT=0"
+ -D "TEST_UFILE=NULL"
+ -D "TEST_OFILE=NULL"
+ -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
+ )
+ IF (NOT "${compare_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM-CHECK_UB_1)
+ ELSE (NOT "${compare_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-UNJAM-CHECK_NOUB PROPERTIES DEPENDS H5JAM-${testname}-UNJAM)
+ ENDIF (NOT "${compare_test}" STREQUAL "")
+
+ CHECKFILE (${testname} "H5JAM-${testname}-UNJAM-CHECK_NOUB" ${chkfile} ${outfile})
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO(UNJAMTEST testname infile ufile outfile)
+
+ MACRO (JAMTEST testname jamfile infile chkfile outfile)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5JAM-${testname}-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove ${outfile} ${infile}.cpy.h5
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5JAM-${testname} COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i testfiles/${infile} -o ${outfile} ${ARGN})
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ SET_TESTS_PROPERTIES (H5JAM-${testname} PROPERTIES DEPENDS H5JAM-${testname}-clear-objects)
+ SET (compare_test ${outfile})
+ SET (compare_orig testfiles/${infile})
+ IF ("${ARGN}" STREQUAL "--clobber")
+ SET (compare_orig "")
+ ENDIF ("${ARGN}" STREQUAL "--clobber")
+
+ ADD_TEST (
+ NAME H5JAM-${testname}-CHECK_UB_1-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${compare_test}.len.txt
+ ${compare_test}.cmp
+ ${compare_test}-ub.cmp
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}")
+ ADD_TEST (
+ NAME H5JAM-${testname}-CHECK_UB_1
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
+ -D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
+ -D "TEST_CHECKUB=YES"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_HFILE=${compare_test}"
+ -D "TEST_UFILE=testfiles/${jamfile}"
+ -D "TEST_EXPECT=0"
+ -D "TEST_OFILE=${compare_orig}"
+ -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}-CHECK_UB_1-clear-objects)
+ CHECKFILE (${testname} "H5JAM-${testname}-CHECK_UB_1" ${chkfile} ${outfile})
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (JAMTEST testname jamfile infile outfile)
+
+ MACRO (JAMTEST_NONE testname jamfile infile setfile chkfile)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5JAM-${testname}_NONE-clear-objects
+ COMMAND ${CMAKE_COMMAND} -E remove
+ ${chkfile} ${chkfile}.cpy.h5
+ )
+ ADD_TEST (
+ NAME H5JAM-${testname}_NONE-SETUP
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different testfiles/${setfile} ${chkfile}
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-SETUP PROPERTIES DEPENDS H5JAM-${testname}_NONE-clear-objects)
+
+ ADD_TEST (
+ NAME H5JAM-${testname}_NONE_COPY
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${chkfile} ${chkfile}.cpy.h5
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE_COPY PROPERTIES DEPENDS H5JAM-${testname}_NONE-SETUP)
+
+ ADD_TEST (NAME H5JAM-${testname}_NONE COMMAND $<TARGET_FILE:h5jam> -u testfiles/${jamfile} -i ${chkfile} ${ARGN})
+ SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE PROPERTIES DEPENDS H5JAM-${testname}_NONE_COPY)
+
+ SET (compare_test ${chkfile})
+ SET (compare_orig ${chkfile}.cpy.h5)
+ IF ("${ARGN}" STREQUAL "--clobber")
+ SET (compare_orig "")
+ ENDIF ("${ARGN}" STREQUAL "--clobber")
+
+ ADD_TEST (
+ NAME H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${compare_test}.len.txt
+ ${compare_test}.cmp
+ ${compare_test}-ub.cmp
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects PROPERTIES DEPENDS "H5JAM-${testname}_NONE")
+ ADD_TEST (
+ NAME H5JAM-${testname}_NONE-CHECK_UB_1
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:tellub>"
+ -D "TEST_GET_PROGRAM=$<TARGET_FILE:getub>"
+ -D "TEST_CHECKUB=YES"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_HFILE=${compare_test}"
+ -D "TEST_UFILE=testfiles/${jamfile}"
+ -D "TEST_EXPECT=0"
+ -D "TEST_OFILE=${compare_orig}"
+ -P "${HDF5_RESOURCES_DIR}/userblockTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5JAM-${testname}_NONE-CHECK_UB_1 PROPERTIES DEPENDS H5JAM-${testname}_NONE-CHECK_UB_1-clear-objects)
+ CHECKFILE (${testname} "H5JAM-${testname}_NONE-CHECK_UB_1" ${infile} ${chkfile})
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (JAMTEST_NONE testname jamfile infile setfile chkfile)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+
+#-------------------------------
+# Testing h5jam
+#-------------------------------
+ # help page
+ TEST_H5JAM_OUTPUT(h5jam-help 0 -h)
+
+ # don't allow HDF5 format file as an user block file
+ TEST_H5JAM_OUTPUT(h5jam-ub-nohdf5 1 -i testfiles/tall.h5 -u testfiles/tall.h5 -o tall-tmp.h5)
+
+ JAMTEST (tall_u10 u10.txt tall.h5 tall.h5 ta2.h5)
+ JAMTEST (tall_u511 u511.txt tall.h5 tall.h5 ta3.h5)
+ JAMTEST (tall_u512 u512.txt tall.h5 tall.h5 ta4.h5)
+ JAMTEST (tall_u513 u513.txt tall.h5 tall.h5 ta5.h5)
+
+ JAMTEST_NONE (N_ta_u10 u10.txt tall.h5 tall.h5 ta6.h5)
+ JAMTEST_NONE (N_ta_u511 u511.txt tall.h5 tall.h5 ta7.h5)
+ JAMTEST_NONE (N_ta_u512 u512.txt tall.h5 tall.h5 ta8.h5)
+ JAMTEST_NONE (N_ta_u513 u513.txt tall.h5 tall.h5 ta9.h5)
+
+ JAMTEST (twithub_u10 u10.txt twithub.h5 tall.h5 tax2.h5)
+ JAMTEST (twithub_u511 u511.txt twithub.h5 tall.h5 tax3.h5)
+ JAMTEST (twithub_u512 u512.txt twithub.h5 tall.h5 tax4.h5)
+ JAMTEST (twithub_u513 u513.txt twithub.h5 tall.h5 tax5.h5)
+
+ JAMTEST (twithub513_u10 u10.txt twithub513.h5 tall.h5 tax6.h5)
+ JAMTEST (twithub513_u511 u511.txt twithub513.h5 tall.h5 tax7.h5)
+ JAMTEST (twithub513_u512 u512.txt twithub513.h5 tall.h5 tax8.h5)
+ JAMTEST (twithub513_u513 u513.txt twithub513.h5 tall.h5 tax9.h5)
+
+ JAMTEST (twithub_u10_c u10.txt twithub.h5 tall.h5 taz2.h5 --clobber)
+ JAMTEST (twithub_u511_c u511.txt twithub.h5 tall.h5 taz3.h5 --clobber)
+ JAMTEST (twithub_u512_c u512.txt twithub.h5 tall.h5 taz4.h5 --clobber)
+ JAMTEST (twithub_u513_c u513.txt twithub.h5 tall.h5 taz5.h5 --clobber)
+
+ JAMTEST (twithub513_u10_c u10.txt twithub513.h5 tall.h5 taz6.h5 --clobber)
+ JAMTEST (twithub513_u511_c u511.txt twithub513.h5 tall.h5 taz7.h5 --clobber)
+ JAMTEST (twithub513_u512_c u512.txt twithub513.h5 tall.h5 taz8.h5 --clobber)
+ JAMTEST (twithub513_u513_c u513.txt twithub513.h5 tall.h5 taz9.h5 --clobber)
+
+ JAMTEST_NONE (N_twithub_u10_c u10.txt tall.h5 twithub.h5 tay2.h5 --clobber)
+ JAMTEST_NONE (N_twithub_u511_c u511.txt tall.h5 twithub.h5 tay3.h5 --clobber)
+ JAMTEST_NONE (N_twithub_u512_c u512.txt tall.h5 twithub.h5 tay4.h5 --clobber)
+ JAMTEST_NONE (N_twithub_u513_c u513.txt tall.h5 twithub.h5 tay5.h5 --clobber)
+
+ JAMTEST_NONE (N_twithub513_u10_c u10.txt tall.h5 twithub513.h5 tay6.h5 --clobber)
+ JAMTEST_NONE (N_twithub513_u511_c u511.txt tall.h5 twithub513.h5 tay7.h5 --clobber)
+ JAMTEST_NONE (N_twithub513_u512_c u512.txt tall.h5 twithub513.h5 tay8.h5 --clobber)
+ JAMTEST_NONE (N_twithub513_u513_c u513.txt tall.h5 twithub513.h5 tay9.h5 --clobber)
+
+#-------------------------------
+# Testing h5unjam
+#-------------------------------
+ # help page
+ TEST_H5UNJAM_OUTPUT(h5unjam-help 0 -h)
+
+ UNJAMTEST (twithub_tall twithub.h5 tai1.h5 o10.txt tall.h5 taa1.h5)
+ UNJAMTEST (twithub513_tall twithub513.h5 tai2.h5 o512.txt tall.h5 taa2.h5)
+
+ UNJAMTEST (N_twithub_tall twithub.h5 tai3.h5 NONE tall.h5 taa3.h5)
+ UNJAMTEST (N_twithub513_tall twithub513.h5 tai4.h5 NONE tall.h5 taa4.h5)
+
+ UNJAMTEST (D_twithub_tall twithub.h5 taj2.h5 NONE tall.h5 tac2.h5 --delete)
+ UNJAMTEST (D_twithub513_tall twithub513.h5 taj3.h5 NONE tall.h5 tac3.h5 --delete)
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt
index 2d7bd97..eeaf1ea 100644
--- a/tools/h5ls/CMakeLists.txt
+++ b/tools/h5ls/CMakeLists.txt
@@ -19,408 +19,9 @@ SET (H5_DEP_EXECUTABLES
h5ls
)
-##############################################################################
-##############################################################################
-### T E S T I N G ###
-##############################################################################
-##############################################################################
-
IF (BUILD_TESTING)
- # --------------------------------------------------------------------
- # Copy all the test files from source directory to test directory
- # --------------------------------------------------------------------
- SET (LIST_HDF5_TEST_FILES
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinktar.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5
- )
-
- SET (LIST_OTHER_TEST_FILES
- ${HDF5_TOOLS_SRC_DIR}/testfiles/help-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/help-2.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/help-3.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/nosuchfile.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg_le.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg_be.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdataregbe.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdataregle.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-2.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-3.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-4.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-5.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-6.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-7.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-1-old.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-2-old.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-3-old.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-6-old.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-7-old.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-2.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-3.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-4.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-5.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-nodangle-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-nodangle-2.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-nodangle-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/thlinks-nodangle-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-2.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-3.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tmultifile.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-2.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-3.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-4.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2le.ls
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2be.ls
- )
-
- FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
-
- # copy the list of test files
- FOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${listfiles}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #MESSAGE (STATUS " Copying ${listfiles} to ${dest}")
- ADD_CUSTOM_COMMAND (
- TARGET h5ls
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${listfiles} ${dest}
- )
- ENDFOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
-
-
-##############################################################################
-##############################################################################
-### T H E T E S T S M A C R O S ###
-##############################################################################
-##############################################################################
-
- MACRO (ADD_H5_TEST resultfile resultcode)
- # If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN})
- SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (${resultcode} STREQUAL "1")
- SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (${resultcode} STREQUAL "1")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5LS-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err
- )
- ADD_TEST (
- NAME H5LS-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
- -D "TEST_ARGS=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.ls"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS "H5LS-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_TEST file)
-
-##############################################################################
-##############################################################################
-### T H E T E S T S ###
-##############################################################################
-##############################################################################
-
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5LS-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- help-1.out
- help-1.out.err
- help-2.out
- help-2.out.err
- help-3.out
- help-3.out.err
- nosuchfile.out
- nosuchfile.out.err
- tall-1.out
- tall-1.out.err
- tall-2.out
- tall-2.out.err
- tarray1.out
- tarray1.out.err
- tattr2.out
- tattr2.out.err
- tcomp-1.out
- tcomp-1.out.err
- tdataregbe.out
- tdataregbe.out.err
- tdataregle.out
- tdataregle.out.err
- tdset-1.out
- tdset-1.out.err
- tempty.out
- tempty.out.err
- textlink-1.out
- textlink-1.out.err
- textlinksrc-1.out
- textlinksrc-1.out.err
- textlinksrc-2.out
- textlinksrc-2.out.err
- textlinksrc-3.out
- textlinksrc-3.out.err
- textlinksrc-4.out
- textlinksrc-4.out.err
- textlinksrc-5.out
- textlinksrc-5.out.err
- textlinksrc-6.out
- textlinksrc-6.out.err
- textlinksrc-7.out
- textlinksrc-7.out.err
- textlinksrc-1-old.out
- textlinksrc-1-old.out.err
- textlinksrc-2-old.out
- textlinksrc-2-old.out.err
- textlinksrc-3-old.out
- textlinksrc-3-old.out.err
- textlinksrc-6-old.out
- textlinksrc-6-old.out.err
- textlinksrc-7-old.out
- textlinksrc-7-old.out.err
- tgrp_comments.out
- tgrp_comments.out.err
- tsoftlinks-1.out
- tsoftlinks-1.out.err
- tsoftlinks-2.out
- tsoftlinks-2.out.err
- tsoftlinks-3.out
- tsoftlinks-3.out.err
- tsoftlinks-4.out
- tsoftlinks-4.out.err
- tsoftlinks-5.out
- tsoftlinks-5.out.err
- textlinksrc-nodangle-1.out
- textlinksrc-nodangle-1.out.err
- textlinksrc-nodangle-2.out
- textlinksrc-nodangle-2.out.err
- tsoftlinks-nodangle-1.out
- tsoftlinks-nodangle-1.out.err
- thlinks-nodangle-1.out
- thlinks-nodangle-1.out.err
- tgroup.out
- tgroup.out.err
- tgroup-1.out
- tgroup-1.out.err
- tgroup-2.out
- tgroup-2.out.err
- tgroup-3.out
- tgroup-3.out.err
- thlink-1.out
- thlink-1.out.err
- tloop-1.out
- tloop-1.out.err
- tnestcomp-1.out
- tnestcomp-1.out.err
- tnestcomp-2.out
- tnestcomp-2.out.err
- tnestcomp-3.out
- tnestcomp-3.out.err
- tnestcomp-4.out
- tnestcomp-4.out.err
- tsaf.out
- tsaf.out.err
- tslink-1.out
- tslink-1.out.err
- tstr-1.out
- tstr-1.out.err
- tudlink-1.out
- tudlink-1.out.err
- tvldtypes1.out
- tvldtypes1.out.err
- tvldtypes2le.out
- tvldtypes2le.out.err
- tvldtypes2be.out
- tvldtypes2be.out.err
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5LS-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5LS-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
- # test the help syntax
- ADD_H5_TEST (help-1 0 -w80 -h)
- ADD_H5_TEST (help-2 0 -w80 --help)
- ADD_H5_TEST (help-3 0 -w80 -?)
-
- # test simple command
- ADD_H5_TEST (tall-1 0 -w80 tall.h5)
- ADD_H5_TEST (tall-2 0 -w80 -r -d tall.h5)
- ADD_H5_TEST (tgroup 0 -w80 tgroup.h5)
- ADD_H5_TEST (tgroup-3 0 -w80 tgroup.h5/g1)
-
- # test for displaying groups
- # The following combination of arguments is expected to return an error message
- # and return value 1
- ADD_H5_TEST (tgroup-1 1 -w80 -r -g tgroup.h5)
- ADD_H5_TEST (tgroup-2 0 -w80 -g tgroup.h5/g1)
-
- # test for files with groups that have long comments
- ADD_H5_TEST (tgrp_comments 0 -w80 -v -g tgrp_comments.h5/glongcomment)
-
- # test for displaying simple space datasets
- ADD_H5_TEST (tdset-1 0 -w80 -r -d tdset.h5)
-
- # test for displaying soft links (dangle)
- ADD_H5_TEST (tslink-1 0 -w80 -r tslink.h5)
-
- # test for displaying more soft links with --follow-symlinks
- ADD_H5_TEST (tsoftlinks-1 0 --follow-symlinks tsoftlinks.h5)
- ADD_H5_TEST (tsoftlinks-2 0 --follow-symlinks -r tsoftlinks.h5)
- ADD_H5_TEST (tsoftlinks-3 0 --follow-symlinks tsoftlinks.h5/group1)
- ADD_H5_TEST (tsoftlinks-4 0 --follow-symlinks -r tsoftlinks.h5/group1)
- ADD_H5_TEST (tsoftlinks-5 0 --follow-symlinks tsoftlinks.h5/soft_dset1)
-
- # test for displaying external and user-defined links with --follow-symlinks
- ADD_H5_TEST (textlink-1 0 -w80 -r textlink.h5)
- ADD_H5_TEST (textlinksrc-1 0 -w80 --follow-symlinks -r textlinksrc.h5)
- ADD_H5_TEST (textlinksrc-2 0 -w80 --follow-symlinks -rv textlinksrc.h5/ext_link5)
- ADD_H5_TEST (textlinksrc-3 0 -w80 --follow-symlinks -r textlinksrc.h5/ext_link1)
- ADD_H5_TEST (textlinksrc-4 0 -w80 -r textlinksrc.h5)
- ADD_H5_TEST (textlinksrc-5 0 -w80 -r textlinksrc.h5/ext_link1)
- ADD_H5_TEST (textlinksrc-6 0 -w80 --follow-symlinks textlinksrc.h5)
- ADD_H5_TEST (textlinksrc-7 0 -w80 --follow-symlinks textlinksrc.h5/ext_link1)
- ADD_H5_TEST (tudlink-1 0 -w80 -r tudlink.h5)
-
- # test for displaying external links with -E
- # the option -E will be depriciated but keep it for backward compatibility
- ADD_H5_TEST (textlinksrc-1-old 0 -w80 -Er textlinksrc.h5)
- ADD_H5_TEST (textlinksrc-2-old 0 -w80 -Erv textlinksrc.h5/ext_link5)
- ADD_H5_TEST (textlinksrc-3-old 0 -w80 -Er textlinksrc.h5/ext_link1)
- ADD_H5_TEST (textlinksrc-6-old 0 -w80 -E textlinksrc.h5)
- ADD_H5_TEST (textlinksrc-7-old 0 -w80 -E textlinksrc.h5/ext_link1)
-
- # tests for no-dangling-links
- # if this option is given on dangling link, h5ls should return exit code 1
- # when used alone , expect to print out help and return exit code 1
- ADD_H5_TEST (textlinksrc-nodangle-1 1 -w80 --no-dangling-links textlinksrc.h5)
- # external dangling link - expected exit code 1
- ADD_H5_TEST (textlinksrc-nodangle-2 1 -w80 --follow-symlinks --no-dangling-links textlinksrc.h5)
- # soft dangling link - expected exit code 1
- ADD_H5_TEST (tsoftlinks-nodangle-1 1 -w80 --follow-symlinks --no-dangling-links tsoftlinks.h5)
- # when used file with no dangling links - expected exit code 0
- ADD_H5_TEST (thlinks-nodangle-1 0 -w80 --follow-symlinks --no-dangling-links thlink.h5)
-
-# test for wildcards in filename (does not work with cmake)
-# ADD_H5_TEST (tstarfile 0 -w80 t*link.h5)
-# ADD_H5_TEST (tqmarkfile 0 -w80 t?link.h5)
- ADD_H5_TEST (tmultifile 0 -w80 thlink.h5 tslink.h5)
-
- # tests for hard links
- ADD_H5_TEST (thlink-1 0 -w80 thlink.h5)
-
- # tests for compound data types
- ADD_H5_TEST (tcomp-1 0 -w80 -r -d tcompound.h5)
-
- #test for the nested compound type
- ADD_H5_TEST (tnestcomp-1 0 -w80 -r -d tnestedcomp.h5)
-
- ADD_H5_TEST (tnestcomp-2 0 -w80 -r -d -S tnestedcomp.h5)
-
- ADD_H5_TEST (tnestcomp-3 0 -w80 -r -d -l tnestedcomp.h5)
-
- ADD_H5_TEST (tnestcomp-4 0 -w80 -r -d -l -S tnestedcomp.h5)
-
- # test for loop detection
- ADD_H5_TEST (tloop-1 0 -w80 -r -d tloop.h5)
-
- # test for string
- ADD_H5_TEST (tstr-1 0 -w80 -r -d tstr.h5)
-
- # test test file created from lib SAF team
- ADD_H5_TEST (tsaf 0 -w80 -r -d tsaf.h5)
-
- # test for variable length data types
- ADD_H5_TEST (tvldtypes1 0 -w80 -r -d tvldtypes1.h5)
-
- # test for array data types
- ADD_H5_TEST (tarray1 0 -w80 -r -d tarray1.h5)
-
- # test for empty data
- ADD_H5_TEST (tempty 0 -w80 -d tempty.h5)
-
- # test for all dataset types written to attributes
- # enable -S for avoiding printing NATIVE types
- ADD_H5_TEST (tattr2 0 -w80 -v -S tattr2.h5)
-
- # test for attribute with region references wo verbose mode
- # ( HDFFV-7838, )
- IF (H5_WORDS_BIGENDIAN)
- ADD_H5_TEST (tattrreg_be 0 -w80 -v -d tattrreg.h5)
- ELSE (H5_WORDS_BIGENDIAN)
- ADD_H5_TEST (tattrreg_le 0 -w80 -v -d tattrreg.h5)
- ENDIF (H5_WORDS_BIGENDIAN)
-
- # test for non-existing file
- ADD_H5_TEST (nosuchfile 1 nosuchfile.h5)
-
- # test for variable length data types in verbose mode
- IF (H5_WORDS_BIGENDIAN)
- ADD_H5_TEST (tvldtypes2be 0 -v tvldtypes1.h5)
- ELSE (H5_WORDS_BIGENDIAN)
- ADD_H5_TEST (tvldtypes2le 0 -v tvldtypes1.h5)
- ENDIF (H5_WORDS_BIGENDIAN)
- # test for dataset region references data types in verbose mode
- IF (H5_WORDS_BIGENDIAN)
- ADD_H5_TEST (tdataregbe 0 -v tdatareg.h5)
- ELSE (H5_WORDS_BIGENDIAN)
- ADD_H5_TEST (tdataregle 0 -v tdatareg.h5)
- ENDIF (H5_WORDS_BIGENDIAN)
+ INCLUDE (CMakeTests.cmake)
ENDIF (BUILD_TESTING)
diff --git a/tools/h5ls/CMakeTests.cmake b/tools/h5ls/CMakeTests.cmake
new file mode 100644
index 0000000..09f375d
--- /dev/null
+++ b/tools/h5ls/CMakeTests.cmake
@@ -0,0 +1,402 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ # --------------------------------------------------------------------
+ # Copy all the test files from source directory to test directory
+ # --------------------------------------------------------------------
+ SET (LIST_HDF5_TEST_FILES
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcompound.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdatareg.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinktar.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestedcomp.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.h5
+ )
+
+ SET (LIST_OTHER_TEST_FILES
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/help-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/help-2.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/help-3.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/nosuchfile.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tall-2.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tarray1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattr2.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg_le.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tattrreg_be.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tcomp-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdataregbe.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdataregle.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tdset-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tempty.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlink-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-2.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-3.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-4.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-5.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-6.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-7.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-1-old.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-2-old.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-3-old.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-6-old.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-7-old.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-2.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-3.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-4.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-5.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-nodangle-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/textlinksrc-nodangle-2.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgrp_comments.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsoftlinks-nodangle-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlinks-nodangle-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-2.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-3.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tloop-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmultifile.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-2.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-3.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-4.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tsaf.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tslink-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tstr-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tudlink-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2le.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tvldtypes2be.ls
+ )
+
+ FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+
+ # copy the list of test files
+ FOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ GET_FILENAME_COMPONENT(fname "${listfiles}" NAME)
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #MESSAGE (STATUS " Copying ${listfiles} to ${dest}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5ls
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${listfiles} ${dest}
+ )
+ ENDFOREACH (listfiles ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ MACRO (ADD_H5_TEST resultfile resultcode)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN})
+ SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ IF (${resultcode} STREQUAL "1")
+ SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (${resultcode} STREQUAL "1")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5LS-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ./testfiles/${resultfile}.out ./testfiles/${resultfile}.out.err
+ )
+ ADD_TEST (
+ NAME H5LS-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
+ -D "TEST_ARGS=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ls"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5LS-${resultfile} PROPERTIES DEPENDS "H5LS-${resultfile}-clear-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_TEST file)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5LS-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ help-1.out
+ help-1.out.err
+ help-2.out
+ help-2.out.err
+ help-3.out
+ help-3.out.err
+ nosuchfile.out
+ nosuchfile.out.err
+ tall-1.out
+ tall-1.out.err
+ tall-2.out
+ tall-2.out.err
+ tarray1.out
+ tarray1.out.err
+ tattr2.out
+ tattr2.out.err
+ tcomp-1.out
+ tcomp-1.out.err
+ tdataregbe.out
+ tdataregbe.out.err
+ tdataregle.out
+ tdataregle.out.err
+ tdset-1.out
+ tdset-1.out.err
+ tempty.out
+ tempty.out.err
+ textlink-1.out
+ textlink-1.out.err
+ textlinksrc-1.out
+ textlinksrc-1.out.err
+ textlinksrc-2.out
+ textlinksrc-2.out.err
+ textlinksrc-3.out
+ textlinksrc-3.out.err
+ textlinksrc-4.out
+ textlinksrc-4.out.err
+ textlinksrc-5.out
+ textlinksrc-5.out.err
+ textlinksrc-6.out
+ textlinksrc-6.out.err
+ textlinksrc-7.out
+ textlinksrc-7.out.err
+ textlinksrc-1-old.out
+ textlinksrc-1-old.out.err
+ textlinksrc-2-old.out
+ textlinksrc-2-old.out.err
+ textlinksrc-3-old.out
+ textlinksrc-3-old.out.err
+ textlinksrc-6-old.out
+ textlinksrc-6-old.out.err
+ textlinksrc-7-old.out
+ textlinksrc-7-old.out.err
+ tgrp_comments.out
+ tgrp_comments.out.err
+ tsoftlinks-1.out
+ tsoftlinks-1.out.err
+ tsoftlinks-2.out
+ tsoftlinks-2.out.err
+ tsoftlinks-3.out
+ tsoftlinks-3.out.err
+ tsoftlinks-4.out
+ tsoftlinks-4.out.err
+ tsoftlinks-5.out
+ tsoftlinks-5.out.err
+ textlinksrc-nodangle-1.out
+ textlinksrc-nodangle-1.out.err
+ textlinksrc-nodangle-2.out
+ textlinksrc-nodangle-2.out.err
+ tsoftlinks-nodangle-1.out
+ tsoftlinks-nodangle-1.out.err
+ thlinks-nodangle-1.out
+ thlinks-nodangle-1.out.err
+ tgroup.out
+ tgroup.out.err
+ tgroup-1.out
+ tgroup-1.out.err
+ tgroup-2.out
+ tgroup-2.out.err
+ tgroup-3.out
+ tgroup-3.out.err
+ thlink-1.out
+ thlink-1.out.err
+ tloop-1.out
+ tloop-1.out.err
+ tnestcomp-1.out
+ tnestcomp-1.out.err
+ tnestcomp-2.out
+ tnestcomp-2.out.err
+ tnestcomp-3.out
+ tnestcomp-3.out.err
+ tnestcomp-4.out
+ tnestcomp-4.out.err
+ tsaf.out
+ tsaf.out.err
+ tslink-1.out
+ tslink-1.out.err
+ tstr-1.out
+ tstr-1.out.err
+ tudlink-1.out
+ tudlink-1.out.err
+ tvldtypes1.out
+ tvldtypes1.out.err
+ tvldtypes2le.out
+ tvldtypes2le.out.err
+ tvldtypes2be.out
+ tvldtypes2be.out.err
+ )
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5LS-clearall-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5LS-clearall-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ # test the help syntax
+ ADD_H5_TEST (help-1 0 -w80 -h)
+ ADD_H5_TEST (help-2 0 -w80 --help)
+ ADD_H5_TEST (help-3 0 -w80 -?)
+
+ # test simple command
+ ADD_H5_TEST (tall-1 0 -w80 tall.h5)
+ ADD_H5_TEST (tall-2 0 -w80 -r -d tall.h5)
+ ADD_H5_TEST (tgroup 0 -w80 tgroup.h5)
+ ADD_H5_TEST (tgroup-3 0 -w80 tgroup.h5/g1)
+
+ # test for displaying groups
+ # The following combination of arguments is expected to return an error message
+ # and return value 1
+ ADD_H5_TEST (tgroup-1 1 -w80 -r -g tgroup.h5)
+ ADD_H5_TEST (tgroup-2 0 -w80 -g tgroup.h5/g1)
+
+ # test for files with groups that have long comments
+ ADD_H5_TEST (tgrp_comments 0 -w80 -v -g tgrp_comments.h5/glongcomment)
+
+ # test for displaying simple space datasets
+ ADD_H5_TEST (tdset-1 0 -w80 -r -d tdset.h5)
+
+ # test for displaying soft links (dangle)
+ ADD_H5_TEST (tslink-1 0 -w80 -r tslink.h5)
+
+ # test for displaying more soft links with --follow-symlinks
+ ADD_H5_TEST (tsoftlinks-1 0 --follow-symlinks tsoftlinks.h5)
+ ADD_H5_TEST (tsoftlinks-2 0 --follow-symlinks -r tsoftlinks.h5)
+ ADD_H5_TEST (tsoftlinks-3 0 --follow-symlinks tsoftlinks.h5/group1)
+ ADD_H5_TEST (tsoftlinks-4 0 --follow-symlinks -r tsoftlinks.h5/group1)
+ ADD_H5_TEST (tsoftlinks-5 0 --follow-symlinks tsoftlinks.h5/soft_dset1)
+
+ # test for displaying external and user-defined links with --follow-symlinks
+ ADD_H5_TEST (textlink-1 0 -w80 -r textlink.h5)
+ ADD_H5_TEST (textlinksrc-1 0 -w80 --follow-symlinks -r textlinksrc.h5)
+ ADD_H5_TEST (textlinksrc-2 0 -w80 --follow-symlinks -rv textlinksrc.h5/ext_link5)
+ ADD_H5_TEST (textlinksrc-3 0 -w80 --follow-symlinks -r textlinksrc.h5/ext_link1)
+ ADD_H5_TEST (textlinksrc-4 0 -w80 -r textlinksrc.h5)
+ ADD_H5_TEST (textlinksrc-5 0 -w80 -r textlinksrc.h5/ext_link1)
+ ADD_H5_TEST (textlinksrc-6 0 -w80 --follow-symlinks textlinksrc.h5)
+ ADD_H5_TEST (textlinksrc-7 0 -w80 --follow-symlinks textlinksrc.h5/ext_link1)
+ ADD_H5_TEST (tudlink-1 0 -w80 -r tudlink.h5)
+
+ # test for displaying external links with -E
+ # the option -E will be depriciated but keep it for backward compatibility
+ ADD_H5_TEST (textlinksrc-1-old 0 -w80 -Er textlinksrc.h5)
+ ADD_H5_TEST (textlinksrc-2-old 0 -w80 -Erv textlinksrc.h5/ext_link5)
+ ADD_H5_TEST (textlinksrc-3-old 0 -w80 -Er textlinksrc.h5/ext_link1)
+ ADD_H5_TEST (textlinksrc-6-old 0 -w80 -E textlinksrc.h5)
+ ADD_H5_TEST (textlinksrc-7-old 0 -w80 -E textlinksrc.h5/ext_link1)
+
+ # tests for no-dangling-links
+ # if this option is given on dangling link, h5ls should return exit code 1
+ # when used alone , expect to print out help and return exit code 1
+ ADD_H5_TEST (textlinksrc-nodangle-1 1 -w80 --no-dangling-links textlinksrc.h5)
+ # external dangling link - expected exit code 1
+ ADD_H5_TEST (textlinksrc-nodangle-2 1 -w80 --follow-symlinks --no-dangling-links textlinksrc.h5)
+ # soft dangling link - expected exit code 1
+ ADD_H5_TEST (tsoftlinks-nodangle-1 1 -w80 --follow-symlinks --no-dangling-links tsoftlinks.h5)
+ # when used file with no dangling links - expected exit code 0
+ ADD_H5_TEST (thlinks-nodangle-1 0 -w80 --follow-symlinks --no-dangling-links thlink.h5)
+
+# test for wildcards in filename (does not work with cmake)
+# ADD_H5_TEST (tstarfile 0 -w80 t*link.h5)
+# ADD_H5_TEST (tqmarkfile 0 -w80 t?link.h5)
+ ADD_H5_TEST (tmultifile 0 -w80 thlink.h5 tslink.h5)
+
+ # tests for hard links
+ ADD_H5_TEST (thlink-1 0 -w80 thlink.h5)
+
+ # tests for compound data types
+ ADD_H5_TEST (tcomp-1 0 -w80 -r -d tcompound.h5)
+
+ #test for the nested compound type
+ ADD_H5_TEST (tnestcomp-1 0 -w80 -r -d tnestedcomp.h5)
+
+ ADD_H5_TEST (tnestcomp-2 0 -w80 -r -d -S tnestedcomp.h5)
+
+ ADD_H5_TEST (tnestcomp-3 0 -w80 -r -d -l tnestedcomp.h5)
+
+ ADD_H5_TEST (tnestcomp-4 0 -w80 -r -d -l -S tnestedcomp.h5)
+
+ # test for loop detection
+ ADD_H5_TEST (tloop-1 0 -w80 -r -d tloop.h5)
+
+ # test for string
+ ADD_H5_TEST (tstr-1 0 -w80 -r -d tstr.h5)
+
+ # test test file created from lib SAF team
+ ADD_H5_TEST (tsaf 0 -w80 -r -d tsaf.h5)
+
+ # test for variable length data types
+ ADD_H5_TEST (tvldtypes1 0 -w80 -r -d tvldtypes1.h5)
+
+ # test for array data types
+ ADD_H5_TEST (tarray1 0 -w80 -r -d tarray1.h5)
+
+ # test for empty data
+ ADD_H5_TEST (tempty 0 -w80 -d tempty.h5)
+
+ # test for all dataset types written to attributes
+ # enable -S for avoiding printing NATIVE types
+ ADD_H5_TEST (tattr2 0 -w80 -v -S tattr2.h5)
+
+ # test for attribute with region references wo verbose mode
+ # ( HDFFV-7838, )
+ IF (H5_WORDS_BIGENDIAN)
+ ADD_H5_TEST (tattrreg_be 0 -w80 -v -d tattrreg.h5)
+ ELSE (H5_WORDS_BIGENDIAN)
+ ADD_H5_TEST (tattrreg_le 0 -w80 -v -d tattrreg.h5)
+ ENDIF (H5_WORDS_BIGENDIAN)
+
+ # test for non-existing file
+ ADD_H5_TEST (nosuchfile 1 nosuchfile.h5)
+
+ # test for variable length data types in verbose mode
+ IF (H5_WORDS_BIGENDIAN)
+ ADD_H5_TEST (tvldtypes2be 0 -v tvldtypes1.h5)
+ ELSE (H5_WORDS_BIGENDIAN)
+ ADD_H5_TEST (tvldtypes2le 0 -v tvldtypes1.h5)
+ ENDIF (H5_WORDS_BIGENDIAN)
+
+ # test for dataset region references data types in verbose mode
+ IF (H5_WORDS_BIGENDIAN)
+ ADD_H5_TEST (tdataregbe 0 -v tdatareg.h5)
+ ELSE (H5_WORDS_BIGENDIAN)
+ ADD_H5_TEST (tdataregle 0 -v tdatareg.h5)
+ ENDIF (H5_WORDS_BIGENDIAN)
diff --git a/tools/h5repack/CMakeLists.txt b/tools/h5repack/CMakeLists.txt
index 7d251ac..f03ad69 100644
--- a/tools/h5repack/CMakeLists.txt
+++ b/tools/h5repack/CMakeLists.txt
@@ -28,12 +28,6 @@ SET_TARGET_PROPERTIES (h5repack PROPERTIES FOLDER tools)
SET (H5_DEP_EXECUTABLES h5repack)
-##############################################################################
-##############################################################################
-### T E S T I N G ###
-##############################################################################
-##############################################################################
-
IF (BUILD_TESTING)
# --------------------------------------------------------------------
# Add h5Repack test executables
@@ -50,936 +44,7 @@ IF (BUILD_TESTING)
TARGET_LINK_LIBRARIES (h5repacktest ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
SET_TARGET_PROPERTIES (h5repacktest PROPERTIES FOLDER tools)
- IF (HDF5_TEST_VFD)
- SET (VFD_LIST
- sec2
- stdio
- core
- split
- multi
- family
- )
-
- IF (DIRECT_VFD)
- SET (VFD_LIST ${VFD_LIST} direct)
- ENDIF (DIRECT_VFD)
-
- MACRO (ADD_VFD_TEST vfdname resultcode)
- ADD_TEST (
- NAME H5REPACK-VFD-${vfdname}-h5repacktest
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5repacktest>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=h5repacktest"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5REPACK-VFD-${vfdname}-h5repacktest")
- ENDMACRO (ADD_VFD_TEST)
- ENDIF (HDF5_TEST_VFD)
-
- # --------------------------------------------------------------------
- # Copy all the HDF5 files from the source directory into the test directory
- # --------------------------------------------------------------------
- SET (LIST_HDF5_TEST_FILES
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr_refs.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_deflate.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_early.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_ext.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fill.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_filters.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fletcher.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_hlink.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layouto.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout2.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout3.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_named_dtypes.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_nbit.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_objs.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_refs.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_shuffle.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_soffset.h5
- ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_szip.h5
- # h5diff/testfile
- ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5
- # tools/testfiles
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00000.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00001.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00002.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00003.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00004.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00005.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00006.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00007.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00008.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00009.h5
- ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00010.h5
- )
-
- SET (LIST_OTHER_TEST_FILES
- ${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
- # tools/testfiles
- ${HDF5_TOOLS_SRC_DIR}/testfiles/h5repack_filters.h5.ddl
- )
-
- FOREACH (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
- GET_FILENAME_COMPONENT(fname "${h5_file}" NAME)
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5repack
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${h5_file} ${dest}
- )
- ENDFOREACH (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
-
-##############################################################################
-##############################################################################
-### T H E T E S T S M A C R O S ###
-##############################################################################
-##############################################################################
-
- MACRO (ADD_H5_TEST_OLD testname testtype testfile)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5REPACK_OLD-${testname}-SKIPPED
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}"
- )
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ELSE (${testtype} STREQUAL "SKIP")
- ADD_TEST (
- NAME H5REPACK_OLD-${testname}
- COMMAND $<TARGET_FILE:h5repack> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK_OLD-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ADD_TEST (
- NAME H5REPACK_OLD-${testname}_DFF
- COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
- )
- SET_TESTS_PROPERTIES (H5REPACK_OLD-${testname}_DFF PROPERTIES DEPENDS H5REPACK_OLD-${testname})
- ENDIF (${testtype} STREQUAL "SKIP")
- ENDMACRO (ADD_H5_TEST_OLD)
-
- MACRO (ADD_H5_TEST testname testtype testfile)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5REPACK-${testname}-SKIPPED
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}"
- )
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ELSE (${testtype} STREQUAL "SKIP")
- ADD_TEST (
- NAME H5REPACK-${testname}
- COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ADD_TEST (
- NAME H5REPACK-${testname}_DFF
- COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
- )
- SET_TESTS_PROPERTIES (H5REPACK-${testname}_DFF PROPERTIES DEPENDS H5REPACK-${testname})
- ENDIF (${testtype} STREQUAL "SKIP")
- ENDMACRO (ADD_H5_TEST)
-
- MACRO (ADD_H5_CMP_TEST testname testfilter testtype resultcode resultfile)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5REPACK_CMP-${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
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5REPACK_CMP-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN} testfiles/${resultfile} testfiles/out-${testname}.${resultfile})
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5REPACK_CMP-${testname}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5repack>"
- -D "TEST_ARGS:STRING=${ARGN};testfiles/${resultfile};testfiles/out-${testname}.${resultfile}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_FILTER:STRING=${testfilter}"
- -D "TEST_REFERENCE=testfiles/${resultfile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ENDIF (${testtype} STREQUAL "SKIP")
- ENDMACRO (ADD_H5_CMP_TEST)
-
- MACRO (ADD_H5_VERIFY_TEST testname testtype resultcode testfile testdset testfilter)
- IF (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5REPACK_VERIFY_LAYOUT-${testname}-SKIPPED
- COMMAND ${CMAKE_COMMAND} -E echo "SKIP -d ${testdset} -pH ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}"
- )
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ELSE (${testtype} STREQUAL "SKIP")
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5REPACK_VERIFY_LAYOUT-${testname}
- COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ADD_TEST (
- NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF
- COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
- )
- SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DFF PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname})
- IF (${resultcode} STREQUAL "0")
- ADD_TEST (
- NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=-d;${testdset};-pH;testfiles/out-${testname}.${testfile}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_FILTER:STRING=${testfilter}"
- -D "TEST_REFERENCE=${testfilter}"
- -P "${HDF5_RESOURCES_DIR}/grepTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
- ELSE (${resultcode} STREQUAL "0")
- IF (${testfilter} STREQUAL "CHUNKED")
- SET (nottestfilter "(CONTIGUOUS|COMPACT)")
- ENDIF (${testfilter} STREQUAL "CHUNKED")
- IF (${testfilter} STREQUAL "CONTIGUOUS")
- SET (nottestfilter "(CHUNK|COMPACT)")
- ENDIF (${testfilter} STREQUAL "CONTIGUOUS")
- IF (${testfilter} STREQUAL "COMPACT")
- SET (nottestfilter "(CONTIGUOUS|CHUNK)")
- ENDIF (${testfilter} STREQUAL "COMPACT")
- ADD_TEST (
- NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
- -D "TEST_ARGS:STRING=-pH;testfiles/out-${testname}.${testfile}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_FILTER:STRING=${nottestfilter}"
- -D "TEST_REFERENCE=${testfilter}"
- -P "${HDF5_RESOURCES_DIR}/grepTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
- ENDIF (${resultcode} STREQUAL "0")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ENDIF (${testtype} STREQUAL "SKIP")
- ENDMACRO (ADD_H5_VERIFY_TEST)
-
- MACRO (ADD_H5_TEST_META testname testfile)
- ADD_TEST (
- NAME H5REPACK_META-${testname}_N
- COMMAND $<TARGET_FILE:h5repack> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK_META-${testname}_N PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ADD_TEST (
- NAME H5REPACK_META-${testname}_M
- COMMAND $<TARGET_FILE:h5repack> ${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)
-
- ADD_TEST (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${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")
- SET_TESTS_PROPERTIES (H5REPACK_META-${testname} PROPERTIES DEPENDS H5REPACK_META-${testname}_M)
- ENDMACRO (ADD_H5_TEST_META)
-
-##############################################################################
-##############################################################################
-### T H E T E S T S ###
-##############################################################################
-##############################################################################
-
- # --------------------------------------------------------------------
- # test file names
- # --------------------------------------------------------------------
- SET (INFO_FILE testfiles/h5repack.info)
-
- SET (FILE0 h5repack_fill.h5)
- SET (FILE1 h5repack_objs.h5)
- SET (FILE2 h5repack_attr.h5)
- SET (FILE3 h5repack_hlink.h5)
- SET (FILE4 h5repack_layout.h5)
- SET (FILE5 h5repack_early.h5)
- SET (FILE7 h5repack_szip.h5)
- SET (FILE8 h5repack_deflate.h5)
- SET (FILE9 h5repack_shuffle.h5)
- SET (FILE10 h5repack_fletcher.h5)
- SET (FILE11 h5repack_filters.h5)
- SET (FILE12 h5repack_nbit.h5)
- SET (FILE13 h5repack_soffset.h5)
- SET (FILE14 h5repack_layouto.h5 ) # A file with an older version of the layout message (copy of test/tlayouto.h5)
- SET (FILE15 h5repack_named_dtypes.h5)
- SET (FILE16 tfamily%05d.h5) # located in common testfiles folder
- SET (FILE18 h5repack_layout2.h5)
- SET (FILE_REF h5repack_refs.h5)
- SET (FILE_ATTR_REF h5repack_attr_refs.h5)
-
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5REPACK-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out
- ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out.err
- ./testfiles/h5repack_layout.h5-chunk_18x13-v.out
- ./testfiles/h5repack_layout.h5-chunk_18x13-v.out.err
- ./testfiles/h5repack_layout.h5-chunk_20x10-v.out
- ./testfiles/h5repack_layout.h5-chunk_20x10-v.out.err
- ./testfiles/h5repack_layout.h5-chunk_compa-v.out
- ./testfiles/h5repack_layout.h5-chunk_compa-v.out.err
- ./testfiles/h5repack_layout.h5-chunk_conti-v.out
- ./testfiles/h5repack_layout.h5-chunk_conti-v.out.err
- ./testfiles/h5repack_layout.h5-compa-v.out
- ./testfiles/h5repack_layout.h5-compa-v.out.err
- ./testfiles/h5repack_layout.h5-conti-v.out
- ./testfiles/h5repack_layout.h5-conti-v.out.err
- ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out
- ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out.err
- ./testfiles/h5repack_layout.h5-dset2_compa-v.out
- ./testfiles/h5repack_layout.h5-dset2_compa-v.out.err
- ./testfiles/h5repack_layout.h5-dset2_conti-v.out
- ./testfiles/h5repack_layout.h5-dset2_conti-v.out.err
- ./testfiles/h5repack_layout.h5-dset_compa_chunk-v.out
- ./testfiles/h5repack_layout.h5-dset_compa_chunk-v.out.err
- ./testfiles/h5repack_layout.h5-dset_compa_compa-v.out
- ./testfiles/h5repack_layout.h5-dset_compa_compa-v.out.err
- ./testfiles/h5repack_layout.h5-dset_compa_conti-v.out
- ./testfiles/h5repack_layout.h5-dset_compa_conti-v.out.err
- ./testfiles/h5repack_layout.h5-dset_conti_chunk-v.out
- ./testfiles/h5repack_layout.h5-dset_conti_chunk-v.out.err
- ./testfiles/h5repack_layout.h5-dset_conti_compa-v.out
- ./testfiles/h5repack_layout.h5-dset_conti_compa-v.out.err
- ./testfiles/h5repack_layout.h5-dset_conti_conti-v.out
- ./testfiles/h5repack_layout.h5-dset_conti_conti-v.out.err
- ./testfiles/h5repack_layout.h5-layout_long_switches-v.out
- ./testfiles/h5repack_layout.h5-layout_long_switches-v.out.err
- ./testfiles/h5repack_layout.h5-layout_short_switches-v.out
- ./testfiles/h5repack_layout.h5-layout_short_switches-v.out.err
- ./testfiles/h5repack_layout2.h5-contig_small_compa-v.out
- ./testfiles/h5repack_layout2.h5-contig_small_compa-v.out.err
- ./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out
- ./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out.err
- ./testfiles/h5repack_layout3.h5-chunk2chunk-v.out
- ./testfiles/h5repack_layout3.h5-chunk2chunk-v.out.err
- ./testfiles/h5repack_layout3.h5-chunk2compa-v.out
- ./testfiles/h5repack_layout3.h5-chunk2compa-v.out.err
- ./testfiles/h5repack_layout3.h5-chunk2conti-v.out
- ./testfiles/h5repack_layout3.h5-chunk2conti-v.out.err
- ./testfiles/h5repack_layout3.h5-error1-v.out
- ./testfiles/h5repack_layout3.h5-error1-v.out.err
- ./testfiles/h5repack_layout3.h5-error2-v.out
- ./testfiles/h5repack_layout3.h5-error2-v.out.err
- ./testfiles/h5repack_layout3.h5-error3-v.out
- ./testfiles/h5repack_layout3.h5-error3-v.out.err
- ./testfiles/out-family.tfamily%05d.h5
- ./testfiles/out-HDFFV-7840.h5diff_attr1.h5
- ./testfiles/out-attr.h5repack_attr.h5
- ./testfiles/out-native_attr.h5repack_attr.h5
- ./testfiles/out-HDFFV-5932.h5repack_attr_refs.h5
- ./testfiles/out-deflate_copy.h5repack_deflate.h5
- ./testfiles/out-deflate_remove.h5repack_deflate.h5
- ./testfiles/out-early.h5repack_early.h5
- ./testfiles/out-fill.h5repack_fill.h5
- ./testfiles/out-native_fill.h5repack_fill.h5
- ./testfiles/out-gzip_verbose_filters.h5repack_filters.h5
- ./testfiles/out-fletcher_copy.h5repack_fletcher.h5
- ./testfiles/out-fletcher_remove.h5repack_fletcher.h5
- ./testfiles/out-hlink.h5repack_hlink.h5
- ./testfiles/out-chunk_18x13.h5repack_layout.h5
- ./testfiles/out-chunk_20x10.h5repack_layout.h5
- ./testfiles/out-chunk_compa.h5repack_layout.h5
- ./testfiles/out-chunk_conti.h5repack_layout.h5
- ./testfiles/out-compa.h5repack_layout.h5
- ./testfiles/out-conti.h5repack_layout.h5
- ./testfiles/out-deflate_file.h5repack_layout.h5
- ./testfiles/out-deflate_limit.h5repack_layout.h5
- ./testfiles/out-dset2_chunk_20x10.h5repack_layout.h5
- ./testfiles/out-dset2_compa.h5repack_layout.h5
- ./testfiles/out-dset2_conti.h5repack_layout.h5
- ./testfiles/out-dset_compa_chunk.h5repack_layout.h5
- ./testfiles/out-dset_compa_compa.h5repack_layout.h5
- ./testfiles/out-dset_compa_conti.h5repack_layout.h5
- ./testfiles/out-dset_conti_chunk.h5repack_layout.h5
- ./testfiles/out-dset_conti_compa.h5repack_layout.h5
- ./testfiles/out-dset_conti_conti.h5repack_layout.h5
- ./testfiles/out-fletcher_all.h5repack_layout.h5
- ./testfiles/out-fletcher_individual.h5repack_layout.h5
- ./testfiles/out-global_filters.h5repack_layout.h5
- ./testfiles/out-gzip_all.h5repack_layout.h5
- ./testfiles/out-gzip_individual.h5repack_layout.h5
- ./testfiles/out-layout.h5repack_layout.h5
- ./testfiles/out-layout_long_switches.h5repack_layout.h5
- ./testfiles/out-layout_short_switches.h5repack_layout.h5
- ./testfiles/out-old_style_layout_short_switches.h5repack_layout.h5
- ./testfiles/out-shuffle_all.h5repack_layout.h5
- ./testfiles/out-shuffle_individual.h5repack_layout.h5
- ./testfiles/out-upgrade_layout.h5repack_layouto.h5
- ./testfiles/out-contig_small_compa.h5repack_layout2.h5
- ./testfiles/out-contig_small_fixed_compa.h5repack_layout2.h5
- ./testfiles/out-chunk2chunk.h5repack_layout3.h5
- ./testfiles/out-chunk2compa.h5repack_layout3.h5
- ./testfiles/out-chunk2conti.h5repack_layout3.h5
- ./testfiles/out-error1.h5repack_layout3.h5
- ./testfiles/out-error2.h5repack_layout3.h5
- ./testfiles/out-error3.h5repack_layout3.h5
- ./testfiles/out-error4.h5repack_layout3.h5
- ./testfiles/out-committed_dt.h5repack_named_dtypes.h5
- ./testfiles/out-nbit_add.h5repack_nbit.h5
- ./testfiles/out-nbit_copy.h5repack_nbit.h5
- ./testfiles/out-nbit_remove.h5repack_nbit.h5
- ./testfiles/out-add_alignment.h5repack_objs.h5
- ./testfiles/out-add_userblock.h5repack_objs.h5
- ./testfiles/out-objs.h5repack_objs.h5
- ./testfiles/out-gt_mallocsize.h5repack_objs.h5
- ./testfiles/out-bug1814.h5repack_refs.h5
- ./testfiles/out-shuffle_copy.h5repack_shuffle.h5
- ./testfiles/out-shuffle_remove.h5repack_shuffle.h5
- ./testfiles/out-scale_add.h5repack_soffset.h5
- ./testfiles/out-scale_copy.h5repack_soffset.h5
- ./testfiles/out-scale_remove.h5repack_soffset.h5
- ./testfiles/out-meta_short_M.meta_short.h5
- ./testfiles/out-meta_short_N.meta_short.h5
- ./testfiles/out-meta_long_M.meta_long.h5
- ./testfiles/out-meta_long_N.meta_long.h5
- # from the h5repacktst
- h5repack_attr.h5
- h5repack_attr_out.h5
- h5repack_attr_refs.h5
- h5repack_big.h5
- h5repack_deflate.h5
- h5repack_deflate_out.h5
- h5repack_early2.h5
- h5repack_early.h5
- h5repack_early_out.h5
- h5repack_ext.h5
- h5repack_ext_out.h5
- h5repack_fill.h5
- h5repack_fill_out.h5
- h5repack_filters.h5
- h5repack_filters_out.h5
- h5repack_fletcher.h5
- h5repack_fletcher_out.h5
- h5repack_hlink.h5
- h5repack_hlink_out.h5
- h5repack_layout.h5
- h5repack_layout_out.h5
- h5repack_layout2.h5
- h5repack_layout3.h5
- h5repack_named_dtypes.h5
- h5repack_named_dtypes_out.h5
- h5repack_nbit.h5
- h5repack_nbit_out.h5
- h5repack_objs.h5
- h5repack_objs_out.h5
- h5repack_refs.h5
- h5repack_shuffle.h5
- h5repack_shuffle_out.h5
- h5repack_soffset.h5
- h5repack_soffset_out.h5
- h5repack_szip.h5
- h5repack_szip_out.h5
- h5repack_ub.h5
- h5repack_ub_out.h5
- h5repack_ext.bin
- ublock.bin
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
-
- ADD_TEST (NAME H5REPACK-testh5repack_detect_szip COMMAND $<TARGET_FILE:testh5repack_detect_szip>)
- IF (HDF5_ENABLE_SZIP_SUPPORT)
- IF (HDF5_ENABLE_SZIP_ENCODING)
- SET (passRegex "yes")
- SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "yes")
- ELSE (HDF5_ENABLE_SZIP_ENCODING)
- SET (passRegex "no")
- SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no")
- ENDIF (HDF5_ENABLE_SZIP_ENCODING)
- ELSE (HDF5_ENABLE_SZIP_SUPPORT)
- SET (passRegex "no")
- SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no")
- ENDIF (HDF5_ENABLE_SZIP_SUPPORT)
- SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS H5REPACK-clearall-objects)
-
- ADD_TEST (NAME H5REPACK-h5repacktest COMMAND $<TARGET_FILE:h5repacktest>)
- SET_TESTS_PROPERTIES (H5REPACK-h5repacktest PROPERTIES DEPENDS H5REPACK-testh5repack_detect_szip)
- SET (last_test "H5REPACK-h5repacktest")
-
-#
-# The tests
-# We use the files generated by h5repacktst
-# Each run generates "<file>.out.h5" and the tool h5diff is used to
-# compare the input and output files
-#
-# the tests are the same as the program h5repacktst, but run from the CLI
-#
-
-# See which filters are usable (and skip tests for filters we
-# don't have). Do this by searching H5pubconf.h to see which
-# filters are defined.
-
-# detect whether the encoder is present.
- SET (USE_FILTER_SZIP_ENCODER "no")
- IF (HDF5_ENABLE_SZIP_ENCODING)
- SET (USE_FILTER_SZIP_ENCODER ${testh5repack_detect_szip})
- ENDIF (HDF5_ENABLE_SZIP_ENCODING)
-
- IF (H5_HAVE_FILTER_DEFLATE)
- SET (USE_FILTER_DEFLATE "true")
- ENDIF (H5_HAVE_FILTER_DEFLATE)
-
- IF (H5_HAVE_FILTER_SZIP)
- SET (USE_FILTER_SZIP "true")
- ENDIF (H5_HAVE_FILTER_SZIP)
-
- IF (H5_HAVE_FILTER_SHUFFLE)
- SET (USE_FILTER_SHUFFLE "true")
- ENDIF (H5_HAVE_FILTER_SHUFFLE)
-
- IF (H5_HAVE_FILTER_FLETCHER32)
- SET (USE_FILTER_FLETCHER32 "true")
- ENDIF (H5_HAVE_FILTER_FLETCHER32)
-
- IF (H5_HAVE_FILTER_NBIT)
- SET (USE_FILTER_NBIT "true")
- ENDIF (H5_HAVE_FILTER_NBIT)
-
- IF (H5_HAVE_FILTER_SCALEOFFSET)
- SET (USE_FILTER_SCALEOFFSET "true")
- ENDIF (H5_HAVE_FILTER_SCALEOFFSET)
-
-# copy files (these files have no filters)
- ADD_H5_TEST (fill "TEST" ${FILE0})
- ADD_H5_TEST (objs "TEST" ${FILE1})
- ADD_H5_TEST (attr "TEST" ${FILE2})
- ADD_H5_TEST (hlink "TEST" ${FILE3})
- ADD_H5_TEST (layout "TEST" ${FILE4})
- ADD_H5_TEST (early "TEST" ${FILE5})
-
-# use $FILE4 to write some filters (this file has no filters)
-
-# gzip with individual object
- SET (arg ${FILE4} -f dset1:GZIP=1 -l dset1:CHUNK=20x10)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (gzip_individual ${TESTTYPE} ${arg})
-
-# gzip for all
- SET (arg ${FILE4} -f GZIP=1)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (gzip_all ${TESTTYPE} ${arg})
-
-# szip with individual object
- SET (arg ${FILE4} -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- ADD_H5_TEST (szip_individual ${TESTTYPE} ${arg})
-
-# szip for all
- SET (arg ${FILE4} -f SZIP=8,NN)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- ADD_H5_TEST (szip_all ${TESTTYPE} ${arg})
-
-# shuffle with individual object
- SET (arg ${FILE4} -f dset2:SHUF -l dset2:CHUNK=20x10)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SHUFFLE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SHUFFLE)
- ADD_H5_TEST (shuffle_individual ${TESTTYPE} ${arg})
-
-# shuffle for all
- SET (arg ${FILE4} -f SHUF)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SHUFFLE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SHUFFLE)
- ADD_H5_TEST (shuffle_all ${TESTTYPE} ${arg})
-
-# fletcher32 with individual object
- SET (arg ${FILE4} -f dset2:FLET -l dset2:CHUNK=20x10)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_FLETCHER32)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_FLETCHER32)
- ADD_H5_TEST (fletcher_individual ${TESTTYPE} ${arg})
-
-# fletcher32 for all
- SET (arg ${FILE4} -f FLET)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_FLETCHER32)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_FLETCHER32)
- ADD_H5_TEST (fletcher_all ${TESTTYPE} ${arg})
-
-# all filters
- SET (arg ${FILE4} -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10)
- SET (TESTTYPE "TEST")
- IF (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)
- 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
-###########################################################
-
-# szip copy
- SET (arg ${FILE7})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- ADD_H5_TEST (szip_copy ${TESTTYPE} ${arg})
-
-# szip remove
- SET (arg ${FILE7} --filter=dset_szip:NONE)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
- ADD_H5_TEST (szip_remove ${TESTTYPE} ${arg})
-
-# deflate copy
- SET (arg ${FILE8})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (deflate_copy ${TESTTYPE} ${arg})
-
-# deflate remove
- SET (arg ${FILE8} -f dset_deflate:NONE)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (deflate_remove ${TESTTYPE} ${arg})
-
-# shuffle copy
- SET (arg ${FILE9})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SHUFFLE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SHUFFLE)
- ADD_H5_TEST (shuffle_copy ${TESTTYPE} ${arg})
-
-# shuffle remove
- SET (arg ${FILE9} -f dset_shuffle:NONE)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SHUFFLE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SHUFFLE)
- ADD_H5_TEST (shuffle_remove ${TESTTYPE} ${arg})
-
-# fletcher32 copy
- SET (arg ${FILE10})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_FLETCHER32)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_FLETCHER32)
- ADD_H5_TEST (fletcher_copy ${TESTTYPE} ${arg})
-
-# fletcher32 remove
- SET (arg ${FILE10} -f dset_fletcher32:NONE)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_FLETCHER32)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_FLETCHER32)
- ADD_H5_TEST (fletcher_remove ${TESTTYPE} ${arg})
-
-# nbit copy
- SET (arg ${FILE12})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_NBIT)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_NBIT)
- ADD_H5_TEST (nbit_copy ${TESTTYPE} ${arg})
-
-# nbit remove
- SET (arg ${FILE12} -f dset_nbit:NONE)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_NBIT)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_NBIT)
- ADD_H5_TEST (nbit_remove ${TESTTYPE} ${arg})
-
-# nbit add
- SET (arg ${FILE12} -f dset_int31:NBIT)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_NBIT)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_NBIT)
- ADD_H5_TEST (nbit_add ${TESTTYPE} ${arg})
-
-# scaleoffset copy
- SET (arg ${FILE13})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SCALEOFFSET)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SCALEOFFSET)
- ADD_H5_TEST (scale_copy ${TESTTYPE} ${arg})
-
-# scaleoffset add
- SET (arg ${FILE13} -f dset_none:SOFF=31,IN)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SCALEOFFSET)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SCALEOFFSET)
- ADD_H5_TEST (scale_add ${TESTTYPE} ${arg})
-
-# scaleoffset remove
- SET (arg ${FILE13} -f dset_scaleoffset:NONE)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SCALEOFFSET)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SCALEOFFSET)
- ADD_H5_TEST (scale_remove ${TESTTYPE} ${arg})
-
-# remove all filters
- SET (arg ${FILE11} -f NONE)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_NBIT OR NOT USE_FILTER_SCALEOFFSET)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_NBIT OR NOT USE_FILTER_SCALEOFFSET)
- ADD_H5_TEST (remove_all ${TESTTYPE} ${arg})
-
-#filter conversions
- SET (arg ${FILE8} -f dset_deflate:SZIP=8,NN)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (deflate_convert ${TESTTYPE} ${arg})
-
- SET (arg ${FILE7} -f dset_szip:GZIP=1)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg})
-
-#limit
- SET (arg ${FILE4} -f GZIP=1 -m 1024)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (deflate_limit ${TESTTYPE} ${arg})
-
-#file
- SET (arg ${FILE4} -e ${INFO_FILE})
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg})
-
-#########################################################
-# layout options (these files have no filters)
-#########################################################
- ADD_H5_VERIFY_TEST (dset2_chunk_20x10 "TEST" 0 ${FILE4} dset2 CHUNKED --layout=dset2:CHUNK=20x10)
- ADD_H5_VERIFY_TEST (chunk_20x10 "TEST" 1 ${FILE4} null CHUNKED -l CHUNK=20x10)
- ADD_H5_VERIFY_TEST (dset2_conti "TEST" 0 ${FILE4} dset2 CONTIGUOUS -l dset2:CONTI)
- ADD_H5_VERIFY_TEST (conti "TEST" 1 ${FILE4} null CONTIGUOUS -l CONTI)
- ADD_H5_VERIFY_TEST (dset2_compa "TEST" 0 ${FILE4} dset2 COMPACT -l dset2:COMPA)
- ADD_H5_VERIFY_TEST (compa "TEST" 1 ${FILE4} null COMPACT -l COMPA)
-
-################################################################
-# layout conversions (file has no filters)
-###############################################################
- ADD_H5_VERIFY_TEST (dset_compa_conti "TEST" 0 ${FILE4} dset_compact CONTIGUOUS -l dset_compact:CONTI)
- ADD_H5_VERIFY_TEST (dset_compa_chunk "TEST" 0 ${FILE4} dset_compact CHUNKED -l dset_compact:CHUNK=2x5)
- ADD_H5_VERIFY_TEST (dset_compa_compa "TEST" 0 ${FILE4} dset_compact COMPACT -l dset_compact:COMPA)
- ADD_H5_VERIFY_TEST (dset_conti_compa "TEST" 0 ${FILE4} dset_contiguous COMPACT -l dset_contiguous:COMPA)
- ADD_H5_VERIFY_TEST (dset_conti_chunk "TEST" 0 ${FILE4} dset_contiguous CHUNKED -l dset_contiguous:CHUNK=3x6)
- ADD_H5_VERIFY_TEST (dset_conti_conti "TEST" 0 ${FILE4} dset_contiguous CONTIGUOUS -l dset_contiguous:CONTI)
- ADD_H5_VERIFY_TEST (chunk_compa "TEST" 0 ${FILE4} dset_chunk COMPACT -l dset_chunk:COMPA)
- ADD_H5_VERIFY_TEST (chunk_conti "TEST" 0 ${FILE4} dset_chunk CONTIGUOUS -l dset_chunk:CONTI)
- ADD_H5_VERIFY_TEST (chunk_18x13 "TEST" 0 ${FILE4} dset_chunk CHUNKED -l dset_chunk:CHUNK=18x13)
-
-# test convert small size dataset ( < 1k) to compact layout without -m
- ADD_H5_VERIFY_TEST (contig_small_compa "TEST" 0 ${FILE18} contig_small COMPACT -l contig_small:COMPA)
- ADD_H5_VERIFY_TEST (contig_small_fixed_compa "TEST" 0 ${FILE18} chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA)
-
-#---------------------------------------------------------------------------
-# Test file contains chunked datasets (need multiple dsets) with
-# unlimited max dims. (HDFFV-7933)
-# Use first dset to test.
-#---------------------------------------------------------------------------
-# chunk to chunk - specify chunk dim bigger than any current dim
-ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300)
-
-# chunk to contiguous
-ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI)
-
-# chunk to compact - convert big dataset (should be > 64k) for this purpose,
-# should remain as original layout (chunk)
-ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA)
-
-#--------------------------------------------------------------------------
-# Test -f for some specific cases. Chunked dataset with unlimited max dims.
-# (HDFFV-8012)
-#--------------------------------------------------------------------------
-# - should not fail
-# - should not change max dims from unlimit
-
-# chunk dim is bigger than dataset dim. ( dset size < 64k )
-ADD_H5_VERIFY_TEST (error1 "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE)
-
-# chunk dim is bigger than dataset dim. ( dset size > 64k )
-ADD_H5_VERIFY_TEST (error2 "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE)
-
-# chunk dims are smaller than dataset dims. ( dset size < 64k )
-ADD_H5_VERIFY_TEST (error3 "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f chunk_unlimit3:NONE)
-
-# file input - should not fail
-ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE)
-
-#--------------------------------------------------------------------------
-# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset
-# (dset size < 64K) and with unlimited max dims on a condition as follow.
-# (HDFFV-8214)
-#--------------------------------------------------------------------------
-# chunk dim is bigger than dataset dim. should succeed.
-ADD_H5_VERIFY_TEST (ckdim_biger "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI)
-# chunk dim is smaller than dataset dim. should succeed.
-ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI)
-
-
-
-# Native option
-# Do not use FILE1, as the named dtype will be converted to native, and h5diff will
-# report a difference.
- ADD_H5_TEST (native_fill "TEST" ${FILE0} -n)
- ADD_H5_TEST (native_attr "TEST" ${FILE2} -n)
-
-# latest file format with long switches. use FILE4=h5repack_layout.h5 (no filters)
- SET (arg --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype])
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
- ADD_H5_VERIFY_TEST (layout_long_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg})
-
-# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters)
- SET (arg -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype])
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
- ADD_H5_VERIFY_TEST (layout_short_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg})
-
-# several global filters
- SET (arg ${FILE4} --filter GZIP=1 --filter SHUF)
- SET (TESTTYPE "TEST")
- IF (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE)
- ADD_H5_TEST (global_filters ${TESTTYPE} ${arg})
-
-# syntax of -i infile -o outfile
-# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters)
- SET (arg ${FILE4} -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype])
- SET (TESTTYPE "LEGACY")
- IF (NOT USE_FILTER_DEFLATE)
- SET (TESTTYPE "SKIP")
- ENDIF (NOT USE_FILTER_DEFLATE)
- ADD_H5_TEST_OLD (old_style_layout_short_switches ${TESTTYPE} ${arg})
-
-# add a userblock to file
- SET (arg ${FILE1} -u ${PROJECT_BINARY_DIR}/testfiles/ublock.bin -b 2048)
- ADD_H5_TEST (add_userblock "TEST" ${arg})
-
-# add alignment
- SET (arg ${FILE1} -t 1 -a 1)
- ADD_H5_TEST (add_alignment "TEST" ${arg})
-
-# Check repacking file with old version of layout message (should get upgraded
-# to new version and be readable, etc.)
- ADD_H5_TEST (upgrade_layout "TEST" ${FILE14})
-
-# test for datum size > H5TOOLS_MALLOCSIZE
- ADD_H5_TEST (gt_mallocsize "TEST" ${FILE1} -f GZIP=1)
-
-# Check repacking file with committed datatypes in odd configurations
- ADD_H5_TEST (committed_dt "TEST" ${FILE15})
-
-# tests family driver (file is located in common testfiles folder, uses TOOLTEST1
- ADD_H5_TEST (family "TEST" ${FILE16})
-
-# test various references (bug 1814 and 1726)
- ADD_H5_TEST (bug1814 "TEST" ${FILE_REF})
-
-# test attribute with various references (bug1797 / HDFFV-5932)
-# the references in attribute of compund or vlen datatype
- ADD_H5_TEST (HDFFV-5932 "TEST" ${FILE_ATTR_REF})
-
-# Add test for memory leak in attirbute. This test is verified by CTEST.
-# 1. leak from vlen string
-# 2. leak from compound type without reference member
-# (HDFFV-7840, )
-# Note: this test is experimental for sharing test file among tools
- ADD_H5_TEST (HDFFV-7840 "TEST" h5diff_attr1.h5)
-
-# tests for metadata block size option ('-M')
- ADD_H5_TEST_META (meta_short h5repack_layout.h5 -M 8192)
- ADD_H5_TEST_META (meta_long h5repack_layout.h5 --metadata_block_size=8192)
-
- IF (HDF5_TEST_VFD)
- # Run test with different Virtual File Driver
- FOREACH (vfd ${VFD_LIST})
- ADD_VFD_TEST (${vfd} 0)
- ENDFOREACH (vfd ${VFD_LIST})
- ENDIF (HDF5_TEST_VFD)
+ INCLUDE (CMakeTests.cmake)
ENDIF (BUILD_TESTING)
diff --git a/tools/h5repack/CMakeTests.cmake b/tools/h5repack/CMakeTests.cmake
new file mode 100644
index 0000000..79d75a7
--- /dev/null
+++ b/tools/h5repack/CMakeTests.cmake
@@ -0,0 +1,937 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ IF (HDF5_TEST_VFD)
+ SET (VFD_LIST
+ sec2
+ stdio
+ core
+ split
+ multi
+ family
+ )
+
+ IF (DIRECT_VFD)
+ SET (VFD_LIST ${VFD_LIST} direct)
+ ENDIF (DIRECT_VFD)
+
+ MACRO (ADD_VFD_TEST vfdname resultcode)
+ ADD_TEST (
+ NAME H5REPACK-VFD-${vfdname}-h5repacktest
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5repacktest>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=h5repacktest"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF5_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5REPACK-VFD-${vfdname}-h5repacktest")
+ ENDMACRO (ADD_VFD_TEST)
+ ENDIF (HDF5_TEST_VFD)
+
+ # --------------------------------------------------------------------
+ # Copy all the HDF5 files from the source directory into the test directory
+ # --------------------------------------------------------------------
+ SET (LIST_HDF5_TEST_FILES
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_attr_refs.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_deflate.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_early.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_ext.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fill.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_filters.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fletcher.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_hlink.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layouto.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout2.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_layout3.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_named_dtypes.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_nbit.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_objs.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_refs.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_shuffle.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_soffset.h5
+ ${HDF5_TOOLS_H5REPACK_SOURCE_DIR}/testfiles/h5repack_szip.h5
+ # h5diff/testfile
+ ${HDF5_TOOLS_H5DIFF_SOURCE_DIR}/testfiles/h5diff_attr1.h5
+ # tools/testfiles
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00000.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00001.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00002.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00003.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00004.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00005.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00006.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00007.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00008.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00009.h5
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tfamily00010.h5
+ )
+
+ SET (LIST_OTHER_TEST_FILES
+ ${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
+ # tools/testfiles
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/h5repack_filters.h5.ddl
+ )
+
+ FOREACH (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+ GET_FILENAME_COMPONENT(fname "${h5_file}" NAME)
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/${fname}")
+ #MESSAGE (STATUS " Copying ${h5_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5repack
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${h5_file} ${dest}
+ )
+ ENDFOREACH (h5_file ${LIST_HDF5_TEST_FILES} ${LIST_OTHER_TEST_FILES})
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ MACRO (ADD_H5_TEST_OLD testname testtype testfile)
+ IF (${testtype} STREQUAL "SKIP")
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5REPACK_OLD-${testname}-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}"
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ELSE (${testtype} STREQUAL "SKIP")
+ ADD_TEST (
+ NAME H5REPACK_OLD-${testname}
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} -i ${PROJECT_BINARY_DIR}/testfiles/${testfile} -o ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ )
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5REPACK_OLD-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ADD_TEST (
+ NAME H5REPACK_OLD-${testname}_DFF
+ COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ )
+ SET_TESTS_PROPERTIES (H5REPACK_OLD-${testname}_DFF PROPERTIES DEPENDS H5REPACK_OLD-${testname})
+ ENDIF (${testtype} STREQUAL "SKIP")
+ ENDMACRO (ADD_H5_TEST_OLD)
+
+ MACRO (ADD_H5_TEST testname testtype testfile)
+ IF (${testtype} STREQUAL "SKIP")
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5REPACK-${testname}-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}"
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ELSE (${testtype} STREQUAL "SKIP")
+ ADD_TEST (
+ NAME H5REPACK-${testname}
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ )
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5REPACK-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ADD_TEST (
+ NAME H5REPACK-${testname}_DFF
+ COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ )
+ SET_TESTS_PROPERTIES (H5REPACK-${testname}_DFF PROPERTIES DEPENDS H5REPACK-${testname})
+ ENDIF (${testtype} STREQUAL "SKIP")
+ ENDMACRO (ADD_H5_TEST)
+
+ MACRO (ADD_H5_CMP_TEST testname testfilter testtype resultcode resultfile)
+ IF (${testtype} STREQUAL "SKIP")
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5REPACK_CMP-${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
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5REPACK_CMP-${testname} COMMAND $<TARGET_FILE:h5repack> ${ARGN} testfiles/${resultfile} testfiles/out-${testname}.${resultfile})
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5REPACK_CMP-${testname}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5repack>"
+ -D "TEST_ARGS:STRING=${ARGN};testfiles/${resultfile};testfiles/out-${testname}.${resultfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=./testfiles/${resultfile}-${testname}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_FILTER:STRING=${testfilter}"
+ -D "TEST_REFERENCE=testfiles/${resultfile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5REPACK_CMP-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ENDIF (${testtype} STREQUAL "SKIP")
+ ENDMACRO (ADD_H5_CMP_TEST)
+
+ MACRO (ADD_H5_VERIFY_TEST testname testtype resultcode testfile testdset testfilter)
+ IF (${testtype} STREQUAL "SKIP")
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5REPACK_VERIFY_LAYOUT-${testname}-SKIPPED
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP -d ${testdset} -pH ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${resultfile}"
+ )
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ELSE (${testtype} STREQUAL "SKIP")
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5REPACK_VERIFY_LAYOUT-${testname}
+ COMMAND $<TARGET_FILE:h5repack> ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ )
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ADD_TEST (
+ NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF
+ COMMAND $<TARGET_FILE:h5diff> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile}
+ )
+ SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DFF PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname})
+ IF (${resultcode} STREQUAL "0")
+ ADD_TEST (
+ NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=-d;${testdset};-pH;testfiles/out-${testname}.${testfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_FILTER:STRING=${testfilter}"
+ -D "TEST_REFERENCE=${testfilter}"
+ -P "${HDF5_RESOURCES_DIR}/grepTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
+ ELSE (${resultcode} STREQUAL "0")
+ IF (${testfilter} STREQUAL "CHUNKED")
+ SET (nottestfilter "(CONTIGUOUS|COMPACT)")
+ ENDIF (${testfilter} STREQUAL "CHUNKED")
+ IF (${testfilter} STREQUAL "CONTIGUOUS")
+ SET (nottestfilter "(CHUNK|COMPACT)")
+ ENDIF (${testfilter} STREQUAL "CONTIGUOUS")
+ IF (${testfilter} STREQUAL "COMPACT")
+ SET (nottestfilter "(CONTIGUOUS|CHUNK)")
+ ENDIF (${testfilter} STREQUAL "COMPACT")
+ ADD_TEST (
+ NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=-pH;testfiles/out-${testname}.${testfile}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=./testfiles/${testfile}-${testname}-v.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_FILTER:STRING=${nottestfilter}"
+ -D "TEST_REFERENCE=${testfilter}"
+ -P "${HDF5_RESOURCES_DIR}/grepTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF)
+ ENDIF (${resultcode} STREQUAL "0")
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ENDIF (${testtype} STREQUAL "SKIP")
+ ENDMACRO (ADD_H5_VERIFY_TEST)
+
+ MACRO (ADD_H5_TEST_META testname testfile)
+ ADD_TEST (
+ NAME H5REPACK_META-${testname}_N
+ COMMAND $<TARGET_FILE:h5repack> ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}_N.${testname}.h5
+ )
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5REPACK_META-${testname}_N PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ADD_TEST (
+ NAME H5REPACK_META-${testname}_M
+ COMMAND $<TARGET_FILE:h5repack> ${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)
+
+ ADD_TEST (NAME H5REPACK_META-${testname} COMMAND ${CMAKE_COMMAND} -E compare_files ${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")
+ SET_TESTS_PROPERTIES (H5REPACK_META-${testname} PROPERTIES DEPENDS H5REPACK_META-${testname}_M)
+ ENDMACRO (ADD_H5_TEST_META)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+
+ # --------------------------------------------------------------------
+ # test file names
+ # --------------------------------------------------------------------
+ SET (INFO_FILE testfiles/h5repack.info)
+
+ SET (FILE0 h5repack_fill.h5)
+ SET (FILE1 h5repack_objs.h5)
+ SET (FILE2 h5repack_attr.h5)
+ SET (FILE3 h5repack_hlink.h5)
+ SET (FILE4 h5repack_layout.h5)
+ SET (FILE5 h5repack_early.h5)
+ SET (FILE7 h5repack_szip.h5)
+ SET (FILE8 h5repack_deflate.h5)
+ SET (FILE9 h5repack_shuffle.h5)
+ SET (FILE10 h5repack_fletcher.h5)
+ SET (FILE11 h5repack_filters.h5)
+ SET (FILE12 h5repack_nbit.h5)
+ SET (FILE13 h5repack_soffset.h5)
+ SET (FILE14 h5repack_layouto.h5 ) # A file with an older version of the layout message (copy of test/tlayouto.h5)
+ SET (FILE15 h5repack_named_dtypes.h5)
+ SET (FILE16 tfamily%05d.h5) # located in common testfiles folder
+ SET (FILE18 h5repack_layout2.h5)
+ SET (FILE_REF h5repack_refs.h5)
+ SET (FILE_ATTR_REF h5repack_attr_refs.h5)
+
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5REPACK-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out
+ ./testfiles/h5repack_filters.h5-gzip_verbose_filters.out.err
+ ./testfiles/h5repack_layout.h5-chunk_18x13-v.out
+ ./testfiles/h5repack_layout.h5-chunk_18x13-v.out.err
+ ./testfiles/h5repack_layout.h5-chunk_20x10-v.out
+ ./testfiles/h5repack_layout.h5-chunk_20x10-v.out.err
+ ./testfiles/h5repack_layout.h5-chunk_compa-v.out
+ ./testfiles/h5repack_layout.h5-chunk_compa-v.out.err
+ ./testfiles/h5repack_layout.h5-chunk_conti-v.out
+ ./testfiles/h5repack_layout.h5-chunk_conti-v.out.err
+ ./testfiles/h5repack_layout.h5-compa-v.out
+ ./testfiles/h5repack_layout.h5-compa-v.out.err
+ ./testfiles/h5repack_layout.h5-conti-v.out
+ ./testfiles/h5repack_layout.h5-conti-v.out.err
+ ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out
+ ./testfiles/h5repack_layout.h5-dset2_chunk_20x10-v.out.err
+ ./testfiles/h5repack_layout.h5-dset2_compa-v.out
+ ./testfiles/h5repack_layout.h5-dset2_compa-v.out.err
+ ./testfiles/h5repack_layout.h5-dset2_conti-v.out
+ ./testfiles/h5repack_layout.h5-dset2_conti-v.out.err
+ ./testfiles/h5repack_layout.h5-dset_compa_chunk-v.out
+ ./testfiles/h5repack_layout.h5-dset_compa_chunk-v.out.err
+ ./testfiles/h5repack_layout.h5-dset_compa_compa-v.out
+ ./testfiles/h5repack_layout.h5-dset_compa_compa-v.out.err
+ ./testfiles/h5repack_layout.h5-dset_compa_conti-v.out
+ ./testfiles/h5repack_layout.h5-dset_compa_conti-v.out.err
+ ./testfiles/h5repack_layout.h5-dset_conti_chunk-v.out
+ ./testfiles/h5repack_layout.h5-dset_conti_chunk-v.out.err
+ ./testfiles/h5repack_layout.h5-dset_conti_compa-v.out
+ ./testfiles/h5repack_layout.h5-dset_conti_compa-v.out.err
+ ./testfiles/h5repack_layout.h5-dset_conti_conti-v.out
+ ./testfiles/h5repack_layout.h5-dset_conti_conti-v.out.err
+ ./testfiles/h5repack_layout.h5-layout_long_switches-v.out
+ ./testfiles/h5repack_layout.h5-layout_long_switches-v.out.err
+ ./testfiles/h5repack_layout.h5-layout_short_switches-v.out
+ ./testfiles/h5repack_layout.h5-layout_short_switches-v.out.err
+ ./testfiles/h5repack_layout2.h5-contig_small_compa-v.out
+ ./testfiles/h5repack_layout2.h5-contig_small_compa-v.out.err
+ ./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out
+ ./testfiles/h5repack_layout2.h5-contig_small_fixed_compa-v.out.err
+ ./testfiles/h5repack_layout3.h5-chunk2chunk-v.out
+ ./testfiles/h5repack_layout3.h5-chunk2chunk-v.out.err
+ ./testfiles/h5repack_layout3.h5-chunk2compa-v.out
+ ./testfiles/h5repack_layout3.h5-chunk2compa-v.out.err
+ ./testfiles/h5repack_layout3.h5-chunk2conti-v.out
+ ./testfiles/h5repack_layout3.h5-chunk2conti-v.out.err
+ ./testfiles/h5repack_layout3.h5-error1-v.out
+ ./testfiles/h5repack_layout3.h5-error1-v.out.err
+ ./testfiles/h5repack_layout3.h5-error2-v.out
+ ./testfiles/h5repack_layout3.h5-error2-v.out.err
+ ./testfiles/h5repack_layout3.h5-error3-v.out
+ ./testfiles/h5repack_layout3.h5-error3-v.out.err
+ ./testfiles/out-family.tfamily%05d.h5
+ ./testfiles/out-HDFFV-7840.h5diff_attr1.h5
+ ./testfiles/out-attr.h5repack_attr.h5
+ ./testfiles/out-native_attr.h5repack_attr.h5
+ ./testfiles/out-HDFFV-5932.h5repack_attr_refs.h5
+ ./testfiles/out-deflate_copy.h5repack_deflate.h5
+ ./testfiles/out-deflate_remove.h5repack_deflate.h5
+ ./testfiles/out-early.h5repack_early.h5
+ ./testfiles/out-fill.h5repack_fill.h5
+ ./testfiles/out-native_fill.h5repack_fill.h5
+ ./testfiles/out-gzip_verbose_filters.h5repack_filters.h5
+ ./testfiles/out-fletcher_copy.h5repack_fletcher.h5
+ ./testfiles/out-fletcher_remove.h5repack_fletcher.h5
+ ./testfiles/out-hlink.h5repack_hlink.h5
+ ./testfiles/out-chunk_18x13.h5repack_layout.h5
+ ./testfiles/out-chunk_20x10.h5repack_layout.h5
+ ./testfiles/out-chunk_compa.h5repack_layout.h5
+ ./testfiles/out-chunk_conti.h5repack_layout.h5
+ ./testfiles/out-compa.h5repack_layout.h5
+ ./testfiles/out-conti.h5repack_layout.h5
+ ./testfiles/out-deflate_file.h5repack_layout.h5
+ ./testfiles/out-deflate_limit.h5repack_layout.h5
+ ./testfiles/out-dset2_chunk_20x10.h5repack_layout.h5
+ ./testfiles/out-dset2_compa.h5repack_layout.h5
+ ./testfiles/out-dset2_conti.h5repack_layout.h5
+ ./testfiles/out-dset_compa_chunk.h5repack_layout.h5
+ ./testfiles/out-dset_compa_compa.h5repack_layout.h5
+ ./testfiles/out-dset_compa_conti.h5repack_layout.h5
+ ./testfiles/out-dset_conti_chunk.h5repack_layout.h5
+ ./testfiles/out-dset_conti_compa.h5repack_layout.h5
+ ./testfiles/out-dset_conti_conti.h5repack_layout.h5
+ ./testfiles/out-fletcher_all.h5repack_layout.h5
+ ./testfiles/out-fletcher_individual.h5repack_layout.h5
+ ./testfiles/out-global_filters.h5repack_layout.h5
+ ./testfiles/out-gzip_all.h5repack_layout.h5
+ ./testfiles/out-gzip_individual.h5repack_layout.h5
+ ./testfiles/out-layout.h5repack_layout.h5
+ ./testfiles/out-layout_long_switches.h5repack_layout.h5
+ ./testfiles/out-layout_short_switches.h5repack_layout.h5
+ ./testfiles/out-old_style_layout_short_switches.h5repack_layout.h5
+ ./testfiles/out-shuffle_all.h5repack_layout.h5
+ ./testfiles/out-shuffle_individual.h5repack_layout.h5
+ ./testfiles/out-upgrade_layout.h5repack_layouto.h5
+ ./testfiles/out-contig_small_compa.h5repack_layout2.h5
+ ./testfiles/out-contig_small_fixed_compa.h5repack_layout2.h5
+ ./testfiles/out-chunk2chunk.h5repack_layout3.h5
+ ./testfiles/out-chunk2compa.h5repack_layout3.h5
+ ./testfiles/out-chunk2conti.h5repack_layout3.h5
+ ./testfiles/out-error1.h5repack_layout3.h5
+ ./testfiles/out-error2.h5repack_layout3.h5
+ ./testfiles/out-error3.h5repack_layout3.h5
+ ./testfiles/out-error4.h5repack_layout3.h5
+ ./testfiles/out-committed_dt.h5repack_named_dtypes.h5
+ ./testfiles/out-nbit_add.h5repack_nbit.h5
+ ./testfiles/out-nbit_copy.h5repack_nbit.h5
+ ./testfiles/out-nbit_remove.h5repack_nbit.h5
+ ./testfiles/out-add_alignment.h5repack_objs.h5
+ ./testfiles/out-add_userblock.h5repack_objs.h5
+ ./testfiles/out-objs.h5repack_objs.h5
+ ./testfiles/out-gt_mallocsize.h5repack_objs.h5
+ ./testfiles/out-bug1814.h5repack_refs.h5
+ ./testfiles/out-shuffle_copy.h5repack_shuffle.h5
+ ./testfiles/out-shuffle_remove.h5repack_shuffle.h5
+ ./testfiles/out-scale_add.h5repack_soffset.h5
+ ./testfiles/out-scale_copy.h5repack_soffset.h5
+ ./testfiles/out-scale_remove.h5repack_soffset.h5
+ ./testfiles/out-meta_short_M.meta_short.h5
+ ./testfiles/out-meta_short_N.meta_short.h5
+ ./testfiles/out-meta_long_M.meta_long.h5
+ ./testfiles/out-meta_long_N.meta_long.h5
+ # from the h5repacktst
+ h5repack_attr.h5
+ h5repack_attr_out.h5
+ h5repack_attr_refs.h5
+ h5repack_big.h5
+ h5repack_deflate.h5
+ h5repack_deflate_out.h5
+ h5repack_early2.h5
+ h5repack_early.h5
+ h5repack_early_out.h5
+ h5repack_ext.h5
+ h5repack_ext_out.h5
+ h5repack_fill.h5
+ h5repack_fill_out.h5
+ h5repack_filters.h5
+ h5repack_filters_out.h5
+ h5repack_fletcher.h5
+ h5repack_fletcher_out.h5
+ h5repack_hlink.h5
+ h5repack_hlink_out.h5
+ h5repack_layout.h5
+ h5repack_layout_out.h5
+ h5repack_layout2.h5
+ h5repack_layout3.h5
+ h5repack_named_dtypes.h5
+ h5repack_named_dtypes_out.h5
+ h5repack_nbit.h5
+ h5repack_nbit_out.h5
+ h5repack_objs.h5
+ h5repack_objs_out.h5
+ h5repack_refs.h5
+ h5repack_shuffle.h5
+ h5repack_shuffle_out.h5
+ h5repack_soffset.h5
+ h5repack_soffset_out.h5
+ h5repack_szip.h5
+ h5repack_szip_out.h5
+ h5repack_ub.h5
+ h5repack_ub_out.h5
+ h5repack_ext.bin
+ ublock.bin
+ )
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5REPACK-clearall-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+
+ ADD_TEST (NAME H5REPACK-testh5repack_detect_szip COMMAND $<TARGET_FILE:testh5repack_detect_szip>)
+ IF (HDF5_ENABLE_SZIP_SUPPORT)
+ IF (HDF5_ENABLE_SZIP_ENCODING)
+ SET (passRegex "yes")
+ SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "yes")
+ ELSE (HDF5_ENABLE_SZIP_ENCODING)
+ SET (passRegex "no")
+ SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no")
+ ENDIF (HDF5_ENABLE_SZIP_ENCODING)
+ ELSE (HDF5_ENABLE_SZIP_SUPPORT)
+ SET (passRegex "no")
+ SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES PASS_REGULAR_EXPRESSION "no")
+ ENDIF (HDF5_ENABLE_SZIP_SUPPORT)
+ SET_TESTS_PROPERTIES (H5REPACK-testh5repack_detect_szip PROPERTIES DEPENDS H5REPACK-clearall-objects)
+
+ ADD_TEST (NAME H5REPACK-h5repacktest COMMAND $<TARGET_FILE:h5repacktest>)
+ SET_TESTS_PROPERTIES (H5REPACK-h5repacktest PROPERTIES DEPENDS H5REPACK-testh5repack_detect_szip)
+ SET (last_test "H5REPACK-h5repacktest")
+
+#
+# The tests
+# We use the files generated by h5repacktst
+# Each run generates "<file>.out.h5" and the tool h5diff is used to
+# compare the input and output files
+#
+# the tests are the same as the program h5repacktst, but run from the CLI
+#
+
+# See which filters are usable (and skip tests for filters we
+# don't have). Do this by searching H5pubconf.h to see which
+# filters are defined.
+
+# detect whether the encoder is present.
+ SET (USE_FILTER_SZIP_ENCODER "no")
+ IF (HDF5_ENABLE_SZIP_ENCODING)
+ SET (USE_FILTER_SZIP_ENCODER ${testh5repack_detect_szip})
+ ENDIF (HDF5_ENABLE_SZIP_ENCODING)
+
+ IF (H5_HAVE_FILTER_DEFLATE)
+ SET (USE_FILTER_DEFLATE "true")
+ ENDIF (H5_HAVE_FILTER_DEFLATE)
+
+ IF (H5_HAVE_FILTER_SZIP)
+ SET (USE_FILTER_SZIP "true")
+ ENDIF (H5_HAVE_FILTER_SZIP)
+
+ IF (H5_HAVE_FILTER_SHUFFLE)
+ SET (USE_FILTER_SHUFFLE "true")
+ ENDIF (H5_HAVE_FILTER_SHUFFLE)
+
+ IF (H5_HAVE_FILTER_FLETCHER32)
+ SET (USE_FILTER_FLETCHER32 "true")
+ ENDIF (H5_HAVE_FILTER_FLETCHER32)
+
+ IF (H5_HAVE_FILTER_NBIT)
+ SET (USE_FILTER_NBIT "true")
+ ENDIF (H5_HAVE_FILTER_NBIT)
+
+ IF (H5_HAVE_FILTER_SCALEOFFSET)
+ SET (USE_FILTER_SCALEOFFSET "true")
+ ENDIF (H5_HAVE_FILTER_SCALEOFFSET)
+
+# copy files (these files have no filters)
+ ADD_H5_TEST (fill "TEST" ${FILE0})
+ ADD_H5_TEST (objs "TEST" ${FILE1})
+ ADD_H5_TEST (attr "TEST" ${FILE2})
+ ADD_H5_TEST (hlink "TEST" ${FILE3})
+ ADD_H5_TEST (layout "TEST" ${FILE4})
+ ADD_H5_TEST (early "TEST" ${FILE5})
+
+# use $FILE4 to write some filters (this file has no filters)
+
+# gzip with individual object
+ SET (arg ${FILE4} -f dset1:GZIP=1 -l dset1:CHUNK=20x10)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_DEFLATE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_DEFLATE)
+ ADD_H5_TEST (gzip_individual ${TESTTYPE} ${arg})
+
+# gzip for all
+ SET (arg ${FILE4} -f GZIP=1)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_DEFLATE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_DEFLATE)
+ ADD_H5_TEST (gzip_all ${TESTTYPE} ${arg})
+
+# szip with individual object
+ SET (arg ${FILE4} -f dset2:SZIP=8,EC -l dset2:CHUNK=20x10)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ ADD_H5_TEST (szip_individual ${TESTTYPE} ${arg})
+
+# szip for all
+ SET (arg ${FILE4} -f SZIP=8,NN)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ ADD_H5_TEST (szip_all ${TESTTYPE} ${arg})
+
+# shuffle with individual object
+ SET (arg ${FILE4} -f dset2:SHUF -l dset2:CHUNK=20x10)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_SHUFFLE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_SHUFFLE)
+ ADD_H5_TEST (shuffle_individual ${TESTTYPE} ${arg})
+
+# shuffle for all
+ SET (arg ${FILE4} -f SHUF)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_SHUFFLE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_SHUFFLE)
+ ADD_H5_TEST (shuffle_all ${TESTTYPE} ${arg})
+
+# fletcher32 with individual object
+ SET (arg ${FILE4} -f dset2:FLET -l dset2:CHUNK=20x10)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_FLETCHER32)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_FLETCHER32)
+ ADD_H5_TEST (fletcher_individual ${TESTTYPE} ${arg})
+
+# fletcher32 for all
+ SET (arg ${FILE4} -f FLET)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_FLETCHER32)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_FLETCHER32)
+ ADD_H5_TEST (fletcher_all ${TESTTYPE} ${arg})
+
+# all filters
+ SET (arg ${FILE4} -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10)
+ SET (TESTTYPE "TEST")
+ IF (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)
+ 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
+###########################################################
+
+# szip copy
+ SET (arg ${FILE7})
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ ADD_H5_TEST (szip_copy ${TESTTYPE} ${arg})
+
+# szip remove
+ SET (arg ${FILE7} --filter=dset_szip:NONE)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP)
+ ADD_H5_TEST (szip_remove ${TESTTYPE} ${arg})
+
+# deflate copy
+ SET (arg ${FILE8})
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_DEFLATE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_DEFLATE)
+ ADD_H5_TEST (deflate_copy ${TESTTYPE} ${arg})
+
+# deflate remove
+ SET (arg ${FILE8} -f dset_deflate:NONE)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_DEFLATE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_DEFLATE)
+ ADD_H5_TEST (deflate_remove ${TESTTYPE} ${arg})
+
+# shuffle copy
+ SET (arg ${FILE9})
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_SHUFFLE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_SHUFFLE)
+ ADD_H5_TEST (shuffle_copy ${TESTTYPE} ${arg})
+
+# shuffle remove
+ SET (arg ${FILE9} -f dset_shuffle:NONE)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_SHUFFLE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_SHUFFLE)
+ ADD_H5_TEST (shuffle_remove ${TESTTYPE} ${arg})
+
+# fletcher32 copy
+ SET (arg ${FILE10})
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_FLETCHER32)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_FLETCHER32)
+ ADD_H5_TEST (fletcher_copy ${TESTTYPE} ${arg})
+
+# fletcher32 remove
+ SET (arg ${FILE10} -f dset_fletcher32:NONE)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_FLETCHER32)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_FLETCHER32)
+ ADD_H5_TEST (fletcher_remove ${TESTTYPE} ${arg})
+
+# nbit copy
+ SET (arg ${FILE12})
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_NBIT)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_NBIT)
+ ADD_H5_TEST (nbit_copy ${TESTTYPE} ${arg})
+
+# nbit remove
+ SET (arg ${FILE12} -f dset_nbit:NONE)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_NBIT)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_NBIT)
+ ADD_H5_TEST (nbit_remove ${TESTTYPE} ${arg})
+
+# nbit add
+ SET (arg ${FILE12} -f dset_int31:NBIT)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_NBIT)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_NBIT)
+ ADD_H5_TEST (nbit_add ${TESTTYPE} ${arg})
+
+# scaleoffset copy
+ SET (arg ${FILE13})
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_SCALEOFFSET)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_SCALEOFFSET)
+ ADD_H5_TEST (scale_copy ${TESTTYPE} ${arg})
+
+# scaleoffset add
+ SET (arg ${FILE13} -f dset_none:SOFF=31,IN)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_SCALEOFFSET)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_SCALEOFFSET)
+ ADD_H5_TEST (scale_add ${TESTTYPE} ${arg})
+
+# scaleoffset remove
+ SET (arg ${FILE13} -f dset_scaleoffset:NONE)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_SCALEOFFSET)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_SCALEOFFSET)
+ ADD_H5_TEST (scale_remove ${TESTTYPE} ${arg})
+
+# remove all filters
+ SET (arg ${FILE11} -f NONE)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_NBIT OR NOT USE_FILTER_SCALEOFFSET)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_FLETCHER32 OR NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SHUFFLE OR NOT USE_FILTER_NBIT OR NOT USE_FILTER_SCALEOFFSET)
+ ADD_H5_TEST (remove_all ${TESTTYPE} ${arg})
+
+#filter conversions
+ SET (arg ${FILE8} -f dset_deflate:SZIP=8,NN)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_SZIP OR NOT USE_FILTER_DEFLATE)
+ ADD_H5_TEST (deflate_convert ${TESTTYPE} ${arg})
+
+ SET (arg ${FILE7} -f dset_szip:GZIP=1)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_SZIP OR NOT USE_FILTER_SZIP_ENCODER OR NOT USE_FILTER_DEFLATE)
+ ADD_H5_TEST (szip_convert ${TESTTYPE} ${arg})
+
+#limit
+ SET (arg ${FILE4} -f GZIP=1 -m 1024)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_DEFLATE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_DEFLATE)
+ ADD_H5_TEST (deflate_limit ${TESTTYPE} ${arg})
+
+#file
+ SET (arg ${FILE4} -e ${INFO_FILE})
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_DEFLATE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_DEFLATE)
+ ADD_H5_TEST (deflate_file ${TESTTYPE} ${arg})
+
+#########################################################
+# layout options (these files have no filters)
+#########################################################
+ ADD_H5_VERIFY_TEST (dset2_chunk_20x10 "TEST" 0 ${FILE4} dset2 CHUNKED --layout=dset2:CHUNK=20x10)
+ ADD_H5_VERIFY_TEST (chunk_20x10 "TEST" 1 ${FILE4} null CHUNKED -l CHUNK=20x10)
+ ADD_H5_VERIFY_TEST (dset2_conti "TEST" 0 ${FILE4} dset2 CONTIGUOUS -l dset2:CONTI)
+ ADD_H5_VERIFY_TEST (conti "TEST" 1 ${FILE4} null CONTIGUOUS -l CONTI)
+ ADD_H5_VERIFY_TEST (dset2_compa "TEST" 0 ${FILE4} dset2 COMPACT -l dset2:COMPA)
+ ADD_H5_VERIFY_TEST (compa "TEST" 1 ${FILE4} null COMPACT -l COMPA)
+
+################################################################
+# layout conversions (file has no filters)
+###############################################################
+ ADD_H5_VERIFY_TEST (dset_compa_conti "TEST" 0 ${FILE4} dset_compact CONTIGUOUS -l dset_compact:CONTI)
+ ADD_H5_VERIFY_TEST (dset_compa_chunk "TEST" 0 ${FILE4} dset_compact CHUNKED -l dset_compact:CHUNK=2x5)
+ ADD_H5_VERIFY_TEST (dset_compa_compa "TEST" 0 ${FILE4} dset_compact COMPACT -l dset_compact:COMPA)
+ ADD_H5_VERIFY_TEST (dset_conti_compa "TEST" 0 ${FILE4} dset_contiguous COMPACT -l dset_contiguous:COMPA)
+ ADD_H5_VERIFY_TEST (dset_conti_chunk "TEST" 0 ${FILE4} dset_contiguous CHUNKED -l dset_contiguous:CHUNK=3x6)
+ ADD_H5_VERIFY_TEST (dset_conti_conti "TEST" 0 ${FILE4} dset_contiguous CONTIGUOUS -l dset_contiguous:CONTI)
+ ADD_H5_VERIFY_TEST (chunk_compa "TEST" 0 ${FILE4} dset_chunk COMPACT -l dset_chunk:COMPA)
+ ADD_H5_VERIFY_TEST (chunk_conti "TEST" 0 ${FILE4} dset_chunk CONTIGUOUS -l dset_chunk:CONTI)
+ ADD_H5_VERIFY_TEST (chunk_18x13 "TEST" 0 ${FILE4} dset_chunk CHUNKED -l dset_chunk:CHUNK=18x13)
+
+# test convert small size dataset ( < 1k) to compact layout without -m
+ ADD_H5_VERIFY_TEST (contig_small_compa "TEST" 0 ${FILE18} contig_small COMPACT -l contig_small:COMPA)
+ ADD_H5_VERIFY_TEST (contig_small_fixed_compa "TEST" 0 ${FILE18} chunked_small_fixed COMPACT -l chunked_small_fixed:COMPA)
+
+#---------------------------------------------------------------------------
+# Test file contains chunked datasets (need multiple dsets) with
+# unlimited max dims. (HDFFV-7933)
+# Use first dset to test.
+#---------------------------------------------------------------------------
+# chunk to chunk - specify chunk dim bigger than any current dim
+ADD_H5_VERIFY_TEST (chunk2chunk "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:CHUNK=100x300)
+
+# chunk to contiguous
+ADD_H5_VERIFY_TEST (chunk2conti "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CONTI -l chunk_unlimit1:CONTI)
+
+# chunk to compact - convert big dataset (should be > 64k) for this purpose,
+# should remain as original layout (chunk)
+ADD_H5_VERIFY_TEST (chunk2compa "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 CHUNK -l chunk_unlimit1:COMPA)
+
+#--------------------------------------------------------------------------
+# Test -f for some specific cases. Chunked dataset with unlimited max dims.
+# (HDFFV-8012)
+#--------------------------------------------------------------------------
+# - should not fail
+# - should not change max dims from unlimit
+
+# chunk dim is bigger than dataset dim. ( dset size < 64k )
+ADD_H5_VERIFY_TEST (error1 "TEST" 0 h5repack_layout3.h5 chunk_unlimit1 H5S_UNLIMITED -f chunk_unlimit1:NONE)
+
+# chunk dim is bigger than dataset dim. ( dset size > 64k )
+ADD_H5_VERIFY_TEST (error2 "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 H5S_UNLIMITED -f chunk_unlimit2:NONE)
+
+# chunk dims are smaller than dataset dims. ( dset size < 64k )
+ADD_H5_VERIFY_TEST (error3 "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 H5S_UNLIMITED -f chunk_unlimit3:NONE)
+
+# file input - should not fail
+ADD_H5_TEST (error4 "TEST" h5repack_layout3.h5 -f NONE)
+
+#--------------------------------------------------------------------------
+# Test base: Convert CHUNK to CONTI for a chunked dataset with small dataset
+# (dset size < 64K) and with unlimited max dims on a condition as follow.
+# (HDFFV-8214)
+#--------------------------------------------------------------------------
+# chunk dim is bigger than dataset dim. should succeed.
+ADD_H5_VERIFY_TEST (ckdim_biger "TEST" 0 h5repack_layout3.h5 chunk_unlimit2 CONTI -l chunk_unlimit2:CONTI)
+# chunk dim is smaller than dataset dim. should succeed.
+ADD_H5_VERIFY_TEST (ckdim_smaller "TEST" 0 h5repack_layout3.h5 chunk_unlimit3 CONTI -l chunk_unlimit3:CONTI)
+
+
+
+# Native option
+# Do not use FILE1, as the named dtype will be converted to native, and h5diff will
+# report a difference.
+ ADD_H5_TEST (native_fill "TEST" ${FILE0} -n)
+ ADD_H5_TEST (native_attr "TEST" ${FILE2} -n)
+
+# latest file format with long switches. use FILE4=h5repack_layout.h5 (no filters)
+ SET (arg --layout CHUNK=20x10 --filter GZIP=1 --minimum=10 --native --latest --compact=8 --indexed=6 --ssize=8[:dtype])
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_DEFLATE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_DEFLATE)
+ ADD_H5_VERIFY_TEST (layout_long_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg})
+
+# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters)
+ SET (arg -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype])
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_DEFLATE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_DEFLATE)
+ ADD_H5_VERIFY_TEST (layout_short_switches ${TESTTYPE} 1 ${FILE4} null CHUNKED ${arg})
+
+# several global filters
+ SET (arg ${FILE4} --filter GZIP=1 --filter SHUF)
+ SET (TESTTYPE "TEST")
+ IF (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_DEFLATE OR NOT USE_FILTER_SHUFFLE)
+ ADD_H5_TEST (global_filters ${TESTTYPE} ${arg})
+
+# syntax of -i infile -o outfile
+# latest file format with short switches. use FILE4=h5repack_layout.h5 (no filters)
+ SET (arg ${FILE4} -l CHUNK=20x10 -f GZIP=1 -m 10 -n -L -c 8 -d 6 -s 8[:dtype])
+ SET (TESTTYPE "LEGACY")
+ IF (NOT USE_FILTER_DEFLATE)
+ SET (TESTTYPE "SKIP")
+ ENDIF (NOT USE_FILTER_DEFLATE)
+ ADD_H5_TEST_OLD (old_style_layout_short_switches ${TESTTYPE} ${arg})
+
+# add a userblock to file
+ SET (arg ${FILE1} -u ${PROJECT_BINARY_DIR}/testfiles/ublock.bin -b 2048)
+ ADD_H5_TEST (add_userblock "TEST" ${arg})
+
+# add alignment
+ SET (arg ${FILE1} -t 1 -a 1)
+ ADD_H5_TEST (add_alignment "TEST" ${arg})
+
+# Check repacking file with old version of layout message (should get upgraded
+# to new version and be readable, etc.)
+ ADD_H5_TEST (upgrade_layout "TEST" ${FILE14})
+
+# test for datum size > H5TOOLS_MALLOCSIZE
+ ADD_H5_TEST (gt_mallocsize "TEST" ${FILE1} -f GZIP=1)
+
+# Check repacking file with committed datatypes in odd configurations
+ ADD_H5_TEST (committed_dt "TEST" ${FILE15})
+
+# tests family driver (file is located in common testfiles folder, uses TOOLTEST1
+ ADD_H5_TEST (family "TEST" ${FILE16})
+
+# test various references (bug 1814 and 1726)
+ ADD_H5_TEST (bug1814 "TEST" ${FILE_REF})
+
+# test attribute with various references (bug1797 / HDFFV-5932)
+# the references in attribute of compund or vlen datatype
+ ADD_H5_TEST (HDFFV-5932 "TEST" ${FILE_ATTR_REF})
+
+# Add test for memory leak in attirbute. This test is verified by CTEST.
+# 1. leak from vlen string
+# 2. leak from compound type without reference member
+# (HDFFV-7840, )
+# Note: this test is experimental for sharing test file among tools
+ ADD_H5_TEST (HDFFV-7840 "TEST" h5diff_attr1.h5)
+
+# tests for metadata block size option ('-M')
+ ADD_H5_TEST_META (meta_short h5repack_layout.h5 -M 8192)
+ ADD_H5_TEST_META (meta_long h5repack_layout.h5 --metadata_block_size=8192)
+
+ IF (HDF5_TEST_VFD)
+ # Run test with different Virtual File Driver
+ FOREACH (vfd ${VFD_LIST})
+ ADD_VFD_TEST (${vfd} 0)
+ ENDFOREACH (vfd ${VFD_LIST})
+ ENDIF (HDF5_TEST_VFD)
diff --git a/tools/h5stat/CMakeLists.txt b/tools/h5stat/CMakeLists.txt
index 4a775ee..6086fc2 100644
--- a/tools/h5stat/CMakeLists.txt
+++ b/tools/h5stat/CMakeLists.txt
@@ -17,12 +17,6 @@ SET_TARGET_PROPERTIES (h5stat PROPERTIES FOLDER tools)
SET (H5_DEP_EXECUTABLES h5stat)
-##############################################################################
-##############################################################################
-### T E S T I N G ###
-##############################################################################
-##############################################################################
-
IF (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the h5stat test executables
@@ -36,256 +30,8 @@ IF (BUILD_TESTING)
#ADD_TEST (NAME h5stat_gentest COMMAND $<TARGET_FILE:h5stat_gentest>)
ENDIF (HDF5_BUILD_GENERATORS AND NOT BUILD_SHARED_LIBS)
-
- # --------------------------------------------------------------------
- # Copy all the HDF5 files from the test directory into the source directory
- # --------------------------------------------------------------------
- SET (HDF5_REFERENCE_FILES
- h5stat_help1.ddl
- h5stat_help2.ddl
- h5stat_notexist.ddl
- h5stat_nofile.ddl
- h5stat_filters.ddl
- h5stat_filters-file.ddl
- h5stat_filters-F.ddl
- h5stat_filters-d.ddl
- h5stat_filters-g.ddl
- h5stat_filters-dT.ddl
- h5stat_filters-UD.ddl
- h5stat_filters-UT.ddl
- h5stat_tsohm.ddl
- h5stat_newgrat.ddl
- h5stat_newgrat-UG.ddl
- h5stat_newgrat-UA.ddl
- h5stat_err1_links.ddl
- h5stat_links1.ddl
- h5stat_links2.ddl
- h5stat_links3.ddl
- h5stat_links4.ddl
- h5stat_links5.ddl
- h5stat_err1_dims.ddl
- h5stat_dims1.ddl
- h5stat_dims2.ddl
- h5stat_err1_numattrs.ddl
- h5stat_err2_numattrs.ddl
- h5stat_numattrs1.ddl
- h5stat_numattrs2.ddl
- h5stat_numattrs3.ddl
- h5stat_numattrs4.ddl
- )
- SET (HDF5_REFERENCE_TEST_FILES
- h5stat_filters.h5
- h5stat_tsohm.h5
- h5stat_newgrat.h5
- h5stat_threshold.h5
- )
-
- FOREACH (ddl_file ${HDF5_REFERENCE_FILES})
- SET (ddldest "${PROJECT_BINARY_DIR}/${ddl_file}")
- #MESSAGE (STATUS " Translating ${ddl_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5stat
- POST_BUILD
- COMMAND ${XLATE_UTILITY}
- ARGS ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${ddl_file} ${ddldest} -l3
- )
- ENDFOREACH (ddl_file ${HDF5_REFERENCE_FILES})
-
- FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5stat
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${h5_file} ${dest}
- )
- ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
-
-##############################################################################
-##############################################################################
-### T H E T E S T S M A C R O S ###
-##############################################################################
-##############################################################################
-
- MACRO (ADD_H5_TEST resultfile resultcode)
- # If using memchecker add tests without using scripts
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5STAT-${resultfile} COMMAND $<TARGET_FILE:h5stat> ${ARGN})
- IF (NOT ${resultcode} STREQUAL "0")
- SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true")
- ENDIF (NOT ${resultcode} STREQUAL "0")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5STAT-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove ${resultfile}.out ${resultfile}.out.err
- )
- ADD_TEST (
- NAME H5STAT-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5stat>"
- -D "TEST_ARGS=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.ddl"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS "H5STAT-${resultfile}-clear-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_TEST file)
-
-##############################################################################
-##############################################################################
-### T H E T E S T S ###
-##############################################################################
-##############################################################################
-
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5STAT-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- h5stat_help1.out
- h5stat_help1.out.err
- h5stat_help2.out
- h5stat_help2.out.err
- h5stat_notexist.out
- h5stat_notexist.out.err
- h5stat_nofile.out
- h5stat_nofile.out.err
- h5stat_filters.out
- h5stat_filters.out.err
- h5stat_filters-file.out
- h5stat_filters-file.out.err
- h5stat_filters-F.out
- h5stat_filters-F.out.err
- h5stat_filters-d.out
- h5stat_filters-d.out.err
- h5stat_filters-g.out
- h5stat_filters-g.out.err
- h5stat_filters-dT.out
- h5stat_filters-dT.out.err
- h5stat_filters-UD.out
- h5stat_filters-UD.out.err
- h5stat_filters-UT.out
- h5stat_filters-UT.out.err
- h5stat_tsohm.out
- h5stat_tsohm.out.err
- h5stat_newgrat.out
- h5stat_newgrat.out.err
- h5stat_newgrat-UG.out
- h5stat_newgrat-UG.out.err
- h5stat_newgrat-UA.out
- h5stat_newgrat-UA.out.err
- h5stat_err1_links.out
- h5stat_err1_links.out.err
- h5stat_links1.out
- h5stat_links1.out.err
- h5stat_links2.out
- h5stat_links2.out.err
- h5stat_links3.out
- h5stat_links3.out.err
- h5stat_links4.out
- h5stat_links4.out.err
- h5stat_links5.out
- h5stat_links5.out.err
- h5stat_err1_dims.out
- h5stat_err1_dims.out.err
- h5stat_dims1.out
- h5stat_dims1.out.err
- h5stat_dims2.out
- h5stat_dims2.out.err
- h5stat_err1_numattrs.out
- h5stat_err1_numattrs.out.err
- h5stat_err2_numattrs.out
- h5stat_err2_numattrs.out.err
- h5stat_numattrs1.out
- h5stat_numattrs1.out.err
- h5stat_numattrs2.out
- h5stat_numattrs2.out.err
- h5stat_numattrs3.out
- h5stat_numattrs3.out.err
- h5stat_numattrs4.out
- h5stat_numattrs4.out.err
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5STAT-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5STAT-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
-# Test for help flag
- ADD_H5_TEST (h5stat_help1 0 -h)
- ADD_H5_TEST (h5stat_help2 0 --help)
-
-# Test when h5stat a file that does not exist
- ADD_H5_TEST (h5stat_notexist 1 notexist.h5)
- ADD_H5_TEST (h5stat_nofile 1 '')
-# Test file with groups, compressed datasets, user-applied fileters, etc.
-# h5stat_filters.h5 is a copy of ../../testfiles/tfilters.h5 as of release 1.8.0-alpha4
- ADD_H5_TEST (h5stat_filters 0 h5stat_filters.h5)
- ADD_H5_TEST (h5stat_filters-file 0 -f h5stat_filters.h5)
- ADD_H5_TEST (h5stat_filters-F 0 -F h5stat_filters.h5)
- ADD_H5_TEST (h5stat_filters-d 0 -d h5stat_filters.h5)
- ADD_H5_TEST (h5stat_filters-g 0 -g h5stat_filters.h5)
- ADD_H5_TEST (h5stat_filters-dT 0 -dT h5stat_filters.h5)
- ADD_H5_TEST (h5stat_filters-UD 0 -D h5stat_filters.h5)
- ADD_H5_TEST (h5stat_filters-UT 0 -T h5stat_filters.h5)
-# h5stat_tsohm.h5 is a copy of ../../../test/tsohm.h5 generated by tsohm.c
-# as of release 1.8.0-alpha4
- ADD_H5_TEST (h5stat_tsohm 0 h5stat_tsohm.h5)
-# h5stat_newgrat.h5 is generated by h5stat_gentest.c
- ADD_H5_TEST (h5stat_newgrat 0 h5stat_newgrat.h5)
- ADD_H5_TEST (h5stat_newgrat-UG 0 -G h5stat_newgrat.h5)
- ADD_H5_TEST (h5stat_newgrat-UA 0 -A h5stat_newgrat.h5)
-#
-# Tests for -l (--links) option on h5stat_threshold.h5:
-# -l 0 (incorrect threshold value)
-# -g -l 8
-# --links=8
-# --links=20 -g
- ADD_H5_TEST (h5stat_err1_links 1 -l 0 h5stat_threshold.h5)
- ADD_H5_TEST (h5stat_links1 0 -g -l 8 h5stat_threshold.h5)
- ADD_H5_TEST (h5stat_links2 0 --links=8 h5stat_threshold.h5)
- ADD_H5_TEST (h5stat_links3 0 --links=20 -g h5stat_threshold.h5)
-#
-# Tests for -l (--links) option on h5stat_newgrat.h5:
-# -g
-# -g -l 40000
- ADD_H5_TEST (h5stat_links4 0 -g h5stat_newgrat.h5)
- ADD_H5_TEST (h5stat_links5 0 -g -l 40000 h5stat_newgrat.h5)
-#
-# Tests for -m (--dims) option on h5stat_threshold.h5
-# -d --dims=-1 (incorrect threshold value)
-# -gd -m 5
-# -d --di=15
- ADD_H5_TEST (h5stat_err1_dims 1 -d --dims=-1 h5stat_threshold.h5)
- ADD_H5_TEST (h5stat_dims1 0 -gd -m 5 h5stat_threshold.h5)
- ADD_H5_TEST (h5stat_dims2 0 -d --di=15 h5stat_threshold.h5)
-#
-# Tests for -a option on h5stat_threshold.h5
-# -a -2 (incorrect threshold value)
-# --numattrs (without threshold value)
-# -AS -a 10
-# -a 1
-# -A --numattrs=25
- ADD_H5_TEST (h5stat_err1_numattrs 1 -a -2 h5stat_threshold.h5)
- ADD_H5_TEST (h5stat_err2_numattrs 1 --numattrs h5stat_threshold.h5)
- ADD_H5_TEST (h5stat_numattrs1 0 -AS -a 10 h5stat_threshold.h5)
- ADD_H5_TEST (h5stat_numattrs2 0 -a 1 h5stat_threshold.h5)
- ADD_H5_TEST (h5stat_numattrs3 0 -A --numattrs=25 h5stat_threshold.h5)
-#
-# Tests for -a option on h5stat_newgrat.h5
-# -A -a 100
- ADD_H5_TEST (h5stat_numattrs4 0 -A -a 100 h5stat_newgrat.h5)
-#
+ INCLUDE (CMakeTests.cmake)
ENDIF (BUILD_TESTING)
##############################################################################
diff --git a/tools/h5stat/CMakeTests.cmake b/tools/h5stat/CMakeTests.cmake
new file mode 100644
index 0000000..0e4315f
--- /dev/null
+++ b/tools/h5stat/CMakeTests.cmake
@@ -0,0 +1,257 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ # --------------------------------------------------------------------
+ # Copy all the HDF5 files from the test directory into the source directory
+ # --------------------------------------------------------------------
+ SET (HDF5_REFERENCE_FILES
+ h5stat_help1.ddl
+ h5stat_help2.ddl
+ h5stat_notexist.ddl
+ h5stat_nofile.ddl
+ h5stat_filters.ddl
+ h5stat_filters-file.ddl
+ h5stat_filters-F.ddl
+ h5stat_filters-d.ddl
+ h5stat_filters-g.ddl
+ h5stat_filters-dT.ddl
+ h5stat_filters-UD.ddl
+ h5stat_filters-UT.ddl
+ h5stat_tsohm.ddl
+ h5stat_newgrat.ddl
+ h5stat_newgrat-UG.ddl
+ h5stat_newgrat-UA.ddl
+ h5stat_err1_links.ddl
+ h5stat_links1.ddl
+ h5stat_links2.ddl
+ h5stat_links3.ddl
+ h5stat_links4.ddl
+ h5stat_links5.ddl
+ h5stat_err1_dims.ddl
+ h5stat_dims1.ddl
+ h5stat_dims2.ddl
+ h5stat_err1_numattrs.ddl
+ h5stat_err2_numattrs.ddl
+ h5stat_numattrs1.ddl
+ h5stat_numattrs2.ddl
+ h5stat_numattrs3.ddl
+ h5stat_numattrs4.ddl
+ )
+ SET (HDF5_REFERENCE_TEST_FILES
+ h5stat_filters.h5
+ h5stat_tsohm.h5
+ h5stat_newgrat.h5
+ h5stat_threshold.h5
+ )
+
+ FOREACH (ddl_file ${HDF5_REFERENCE_FILES})
+ SET (ddldest "${PROJECT_BINARY_DIR}/${ddl_file}")
+ #MESSAGE (STATUS " Translating ${ddl_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5stat
+ POST_BUILD
+ COMMAND ${XLATE_UTILITY}
+ ARGS ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${ddl_file} ${ddldest} -l3
+ )
+ ENDFOREACH (ddl_file ${HDF5_REFERENCE_FILES})
+
+ FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ SET (dest "${PROJECT_BINARY_DIR}/${h5_file}")
+ #MESSAGE (STATUS " Copying ${h5_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5stat
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_H5STAT_SOURCE_DIR}/testfiles/${h5_file} ${dest}
+ )
+ ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ MACRO (ADD_H5_TEST resultfile resultcode)
+ # If using memchecker add tests without using scripts
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5STAT-${resultfile} COMMAND $<TARGET_FILE:h5stat> ${ARGN})
+ IF (NOT ${resultcode} STREQUAL "0")
+ SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES WILL_FAIL "true")
+ ENDIF (NOT ${resultcode} STREQUAL "0")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5STAT-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove ${resultfile}.out ${resultfile}.out.err
+ )
+ ADD_TEST (
+ NAME H5STAT-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5stat>"
+ -D "TEST_ARGS=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5STAT-${resultfile} PROPERTIES DEPENDS "H5STAT-${resultfile}-clear-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_TEST file)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5STAT-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ h5stat_help1.out
+ h5stat_help1.out.err
+ h5stat_help2.out
+ h5stat_help2.out.err
+ h5stat_notexist.out
+ h5stat_notexist.out.err
+ h5stat_nofile.out
+ h5stat_nofile.out.err
+ h5stat_filters.out
+ h5stat_filters.out.err
+ h5stat_filters-file.out
+ h5stat_filters-file.out.err
+ h5stat_filters-F.out
+ h5stat_filters-F.out.err
+ h5stat_filters-d.out
+ h5stat_filters-d.out.err
+ h5stat_filters-g.out
+ h5stat_filters-g.out.err
+ h5stat_filters-dT.out
+ h5stat_filters-dT.out.err
+ h5stat_filters-UD.out
+ h5stat_filters-UD.out.err
+ h5stat_filters-UT.out
+ h5stat_filters-UT.out.err
+ h5stat_tsohm.out
+ h5stat_tsohm.out.err
+ h5stat_newgrat.out
+ h5stat_newgrat.out.err
+ h5stat_newgrat-UG.out
+ h5stat_newgrat-UG.out.err
+ h5stat_newgrat-UA.out
+ h5stat_newgrat-UA.out.err
+ h5stat_err1_links.out
+ h5stat_err1_links.out.err
+ h5stat_links1.out
+ h5stat_links1.out.err
+ h5stat_links2.out
+ h5stat_links2.out.err
+ h5stat_links3.out
+ h5stat_links3.out.err
+ h5stat_links4.out
+ h5stat_links4.out.err
+ h5stat_links5.out
+ h5stat_links5.out.err
+ h5stat_err1_dims.out
+ h5stat_err1_dims.out.err
+ h5stat_dims1.out
+ h5stat_dims1.out.err
+ h5stat_dims2.out
+ h5stat_dims2.out.err
+ h5stat_err1_numattrs.out
+ h5stat_err1_numattrs.out.err
+ h5stat_err2_numattrs.out
+ h5stat_err2_numattrs.out.err
+ h5stat_numattrs1.out
+ h5stat_numattrs1.out.err
+ h5stat_numattrs2.out
+ h5stat_numattrs2.out.err
+ h5stat_numattrs3.out
+ h5stat_numattrs3.out.err
+ h5stat_numattrs4.out
+ h5stat_numattrs4.out.err
+ )
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5STAT-clearall-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5STAT-clearall-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+# Test for help flag
+ ADD_H5_TEST (h5stat_help1 0 -h)
+ ADD_H5_TEST (h5stat_help2 0 --help)
+
+# Test when h5stat a file that does not exist
+ ADD_H5_TEST (h5stat_notexist 1 notexist.h5)
+ ADD_H5_TEST (h5stat_nofile 1 '')
+
+# Test file with groups, compressed datasets, user-applied fileters, etc.
+# h5stat_filters.h5 is a copy of ../../testfiles/tfilters.h5 as of release 1.8.0-alpha4
+ ADD_H5_TEST (h5stat_filters 0 h5stat_filters.h5)
+ ADD_H5_TEST (h5stat_filters-file 0 -f h5stat_filters.h5)
+ ADD_H5_TEST (h5stat_filters-F 0 -F h5stat_filters.h5)
+ ADD_H5_TEST (h5stat_filters-d 0 -d h5stat_filters.h5)
+ ADD_H5_TEST (h5stat_filters-g 0 -g h5stat_filters.h5)
+ ADD_H5_TEST (h5stat_filters-dT 0 -dT h5stat_filters.h5)
+ ADD_H5_TEST (h5stat_filters-UD 0 -D h5stat_filters.h5)
+ ADD_H5_TEST (h5stat_filters-UT 0 -T h5stat_filters.h5)
+# h5stat_tsohm.h5 is a copy of ../../../test/tsohm.h5 generated by tsohm.c
+# as of release 1.8.0-alpha4
+ ADD_H5_TEST (h5stat_tsohm 0 h5stat_tsohm.h5)
+# h5stat_newgrat.h5 is generated by h5stat_gentest.c
+ ADD_H5_TEST (h5stat_newgrat 0 h5stat_newgrat.h5)
+ ADD_H5_TEST (h5stat_newgrat-UG 0 -G h5stat_newgrat.h5)
+ ADD_H5_TEST (h5stat_newgrat-UA 0 -A h5stat_newgrat.h5)
+#
+# Tests for -l (--links) option on h5stat_threshold.h5:
+# -l 0 (incorrect threshold value)
+# -g -l 8
+# --links=8
+# --links=20 -g
+ ADD_H5_TEST (h5stat_err1_links 1 -l 0 h5stat_threshold.h5)
+ ADD_H5_TEST (h5stat_links1 0 -g -l 8 h5stat_threshold.h5)
+ ADD_H5_TEST (h5stat_links2 0 --links=8 h5stat_threshold.h5)
+ ADD_H5_TEST (h5stat_links3 0 --links=20 -g h5stat_threshold.h5)
+#
+# Tests for -l (--links) option on h5stat_newgrat.h5:
+# -g
+# -g -l 40000
+ ADD_H5_TEST (h5stat_links4 0 -g h5stat_newgrat.h5)
+ ADD_H5_TEST (h5stat_links5 0 -g -l 40000 h5stat_newgrat.h5)
+#
+# Tests for -m (--dims) option on h5stat_threshold.h5
+# -d --dims=-1 (incorrect threshold value)
+# -gd -m 5
+# -d --di=15
+ ADD_H5_TEST (h5stat_err1_dims 1 -d --dims=-1 h5stat_threshold.h5)
+ ADD_H5_TEST (h5stat_dims1 0 -gd -m 5 h5stat_threshold.h5)
+ ADD_H5_TEST (h5stat_dims2 0 -d --di=15 h5stat_threshold.h5)
+#
+# Tests for -a option on h5stat_threshold.h5
+# -a -2 (incorrect threshold value)
+# --numattrs (without threshold value)
+# -AS -a 10
+# -a 1
+# -A --numattrs=25
+ ADD_H5_TEST (h5stat_err1_numattrs 1 -a -2 h5stat_threshold.h5)
+ ADD_H5_TEST (h5stat_err2_numattrs 1 --numattrs h5stat_threshold.h5)
+ ADD_H5_TEST (h5stat_numattrs1 0 -AS -a 10 h5stat_threshold.h5)
+ ADD_H5_TEST (h5stat_numattrs2 0 -a 1 h5stat_threshold.h5)
+ ADD_H5_TEST (h5stat_numattrs3 0 -A --numattrs=25 h5stat_threshold.h5)
+#
+# Tests for -a option on h5stat_newgrat.h5
+# -A -a 100
+ ADD_H5_TEST (h5stat_numattrs4 0 -A -a 100 h5stat_newgrat.h5)
+#
+ \ No newline at end of file
diff --git a/tools/misc/CMakeLists.txt b/tools/misc/CMakeLists.txt
index dc98967..8e1003e 100644
--- a/tools/misc/CMakeLists.txt
+++ b/tools/misc/CMakeLists.txt
@@ -41,12 +41,6 @@ SET (H5_DEP_EXECUTABLES
# CONFIGURE_FILE (${HDF5_TOOLS_MISC_SOURCE_DIR}/h5cc.in ${HDF5_BINARY_DIR}/h5cc @ONLY)
#ENDIF (NOT WIN32)
-##############################################################################
-##############################################################################
-### T E S T I N G ###
-##############################################################################
-##############################################################################
-
IF (BUILD_TESTING)
# --------------------------------------------------------------------
# Add the misc test executables
@@ -65,272 +59,8 @@ IF (BUILD_TESTING)
TARGET_C_PROPERTIES (h5repart_test " " " ")
TARGET_LINK_LIBRARIES (h5repart_test ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
SET_TARGET_PROPERTIES (h5repart_test PROPERTIES FOLDER tools)
-
- # --------------------------------------------------------------------
- # Copy all the HDF5 files from the source directory into the test directory
- # --------------------------------------------------------------------
- SET (HDF5_REFERENCE_TEST_FILES
- family_file00000.h5
- family_file00001.h5
- family_file00002.h5
- family_file00003.h5
- family_file00004.h5
- family_file00005.h5
- family_file00006.h5
- family_file00007.h5
- family_file00008.h5
- family_file00009.h5
- family_file00010.h5
- family_file00011.h5
- family_file00012.h5
- family_file00013.h5
- family_file00014.h5
- family_file00015.h5
- family_file00016.h5
- family_file00017.h5
- )
-
- FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/${h5_file}")
- #MESSAGE (STATUS " Copying ${h5_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5repart
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_file} ${dest}
- )
- ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
-
- SET (HDF5_MKGRP_TEST_FILES
- #h5mkgrp_help.txt
- #h5mkgrp_version
- h5mkgrp_single.ls
- h5mkgrp_single_v.ls
- h5mkgrp_single_p.ls
- h5mkgrp_single_l.ls
- h5mkgrp_several.ls
- h5mkgrp_several_v.ls
- h5mkgrp_several_p.ls
- h5mkgrp_several_l.ls
- h5mkgrp_nested_p.ls
- h5mkgrp_nested_lp.ls
- h5mkgrp_nested_mult_p.ls
- h5mkgrp_nested_mult_lp.ls
- )
-
- # make test dir
- FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
-
- FOREACH (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
- SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}")
- #MESSAGE (STATUS " Copying ${h5_mkgrp_file}")
- ADD_CUSTOM_COMMAND (
- TARGET h5mkgrp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_mkgrp_file} ${dest}
- )
- ENDFOREACH (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
-
- ADD_CUSTOM_COMMAND (
- TARGET h5mkgrp
- POST_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_help.txt ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_help.txt
- )
- CONFIGURE_FILE (${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_version.txt.in ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_version.txt @ONLY)
-
-##############################################################################
-##############################################################################
-### T H E T E S T S M A C R O S ###
-##############################################################################
-##############################################################################
-
- MACRO (ADD_H5_TEST resultfile resultcode resultoption)
- IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5MKGRP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${resultfile}.h5
- ${resultfile}.out
- ${resultfile}.out.err
- )
- SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
-
- ADD_TEST (
- NAME H5MKGRP-${resultfile}
- COMMAND $<TARGET_FILE:h5mkgrp> ${resultoption} ${resultfile}.h5 ${ARGN}
- )
- SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile}-clear-objects)
- ADD_TEST (
- NAME H5MKGRP-${resultfile}-h5ls
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
- -D "TEST_ARGS:STRING=-v;-r;${resultfile}.h5"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_MASK_MOD=true"
- -D "TEST_REFERENCE=${resultfile}.ls"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}-h5ls PROPERTIES DEPENDS H5MKGRP-${resultfile})
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_TEST resultfile resultcode resultoption)
-
- MACRO (ADD_H5_CMP resultfile resultcode)
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (NAME H5MKGRP_CMP-${resultfile} COMMAND $<TARGET_FILE:h5mkgrp> ${ARGN})
- ELSE (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5MKGRP_CMP-${resultfile}-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- ${resultfile}.h5
- ${resultfile}.out
- ${resultfile}.out.err
- )
- SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- ADD_TEST (
- NAME H5MKGRP_CMP-${resultfile}
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp>"
- -D "TEST_ARGS:STRING=${ARGN}"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
- -D "TEST_OUTPUT=${resultfile}.out"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_REFERENCE=${resultfile}.txt"
- -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
- )
- SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects)
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
- ENDMACRO (ADD_H5_CMP resultfile resultcode)
-
-##############################################################################
-##############################################################################
-### T H E T E S T S ###
-##############################################################################
-##############################################################################
-
- # Remove any output file left over from previous test run
- ADD_TEST (
- NAME H5REPART-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- fst_family00000.h5
- scd_family00000.h5
- scd_family00001.h5
- scd_family00002.h5
- scd_family00003.h5
- family_to_sec2.h5
- )
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5REPART-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5REPART-clearall-objects")
-
- # repartition family member size to 20,000 bytes.
- ADD_TEST (NAME H5REPART-h5repart_20K COMMAND $<TARGET_FILE:h5repart> -m 20000 family_file%05d.h5 fst_family%05d.h5)
- SET_TESTS_PROPERTIES (H5REPART-h5repart_20K PROPERTIES DEPENDS H5REPART-clearall-objects)
-
- # repartition family member size to 5 KB.
- ADD_TEST (NAME H5REPART-h5repart_5K COMMAND $<TARGET_FILE:h5repart> -m 5k family_file%05d.h5 scd_family%05d.h5)
- SET_TESTS_PROPERTIES (H5REPART-h5repart_5K PROPERTIES DEPENDS H5REPART-clearall-objects)
-
- # convert family file to sec2 file of 20,000 bytes
- ADD_TEST (NAME H5REPART-h5repart_sec2 COMMAND $<TARGET_FILE:h5repart> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5)
- SET_TESTS_PROPERTIES (H5REPART-h5repart_sec2 PROPERTIES DEPENDS H5REPART-clearall-objects)
-
- # test the output files repartitioned above.
- ADD_TEST (NAME H5REPART-h5repart_test COMMAND $<TARGET_FILE:h5repart_test>)
- SET_TESTS_PROPERTIES (H5REPART-h5repart_test PROPERTIES DEPENDS H5REPART-clearall-objects DEPENDS H5REPART-h5repart_20K DEPENDS H5REPART-h5repart_5K DEPENDS H5REPART-h5repart_sec2)
-
- SET (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES}
- h5repart_test
- )
-
- IF (HDF5_ENABLE_USING_MEMCHECKER)
- ADD_TEST (
- NAME H5MKGRP-clearall-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- h5mkgrp_help.out
- h5mkgrp_help.out.err
- h5mkgrp_version.out
- h5mkgrp_version.out.err
- h5mkgrp_single.h5
- h5mkgrp_single.out
- h5mkgrp_single.out.err
- h5mkgrp_single_v.h5
- h5mkgrp_single_v.out
- h5mkgrp_single_v.out.err
- h5mkgrp_single_p.h5
- h5mkgrp_single_p.out
- h5mkgrp_single_p.out.err
- h5mkgrp_single_l.h5
- h5mkgrp_single_l.out
- h5mkgrp_single_l.out.err
- h5mkgrp_several.h5
- h5mkgrp_several.out
- h5mkgrp_several.out.err
- h5mkgrp_several_v.h5
- h5mkgrp_several_v.out
- h5mkgrp_several_v.out.err
- h5mkgrp_several_p.h5
- h5mkgrp_several_p.out
- h5mkgrp_several_p.out.err
- h5mkgrp_several_l.h5
- h5mkgrp_several_l.out
- h5mkgrp_several_l.out.err
- h5mkgrp_nested_p.h5
- h5mkgrp_nested_p.out
- h5mkgrp_nested_p.out.err
- h5mkgrp_nested_lp.h5
- h5mkgrp_nested_lp.out
- h5mkgrp_nested_lp.out.err
- h5mkgrp_nested_mult_p.h5
- h5mkgrp_nested_mult_p.out
- h5mkgrp_nested_mult_p.out.err
- h5mkgrp_nested_mult_lp.h5
- h5mkgrp_nested_mult_lp.out
- h5mkgrp_nested_mult_lp.out.err
- )
- SET_TESTS_PROPERTIES (H5MKGRP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
- IF (NOT "${last_test}" STREQUAL "")
- SET_TESTS_PROPERTIES (H5MKGRP-clearall-objects PROPERTIES DEPENDS ${last_test})
- ENDIF (NOT "${last_test}" STREQUAL "")
- SET (last_test "H5MKGRP-clearall-objects")
- ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
-
- # Check that help & version is displayed properly
- ADD_H5_CMP (h5mkgrp_help 0 "-h")
- ADD_H5_CMP (h5mkgrp_version 0 "-V")
-
- # Create single group at root level
- ADD_H5_TEST (h5mkgrp_single 0 "" single)
- ADD_H5_TEST (h5mkgrp_single_v 0 "-v" single)
- ADD_H5_TEST (h5mkgrp_single_p 0 "-p" single)
- ADD_H5_TEST (h5mkgrp_single_l 0 "-l" latest)
-
- # Create several groups at root level
- ADD_H5_TEST (h5mkgrp_several 0 "" one two)
- ADD_H5_TEST (h5mkgrp_several_v 0 "-v" one two)
- ADD_H5_TEST (h5mkgrp_several_p 0 "-p" one two)
- ADD_H5_TEST (h5mkgrp_several_l 0 "-l" one two)
- # Create various nested groups
- ADD_H5_TEST (h5mkgrp_nested_p 0 "-p" /one/two)
- ADD_H5_TEST (h5mkgrp_nested_lp 0 "-lp" /one/two)
- ADD_H5_TEST (h5mkgrp_nested_mult_p 0 "-p" /one/two /three/four)
- ADD_H5_TEST (h5mkgrp_nested_mult_lp 0 "-lp" /one/two /three/four)
+ INCLUDE (CMakeTests.cmake)
ENDIF (BUILD_TESTING)
##############################################################################
diff --git a/tools/misc/CMakeTests.cmake b/tools/misc/CMakeTests.cmake
new file mode 100644
index 0000000..cc9c5e2
--- /dev/null
+++ b/tools/misc/CMakeTests.cmake
@@ -0,0 +1,272 @@
+
+##############################################################################
+##############################################################################
+### T E S T I N G ###
+##############################################################################
+##############################################################################
+
+ # --------------------------------------------------------------------
+ # Copy all the HDF5 files from the source directory into the test directory
+ # --------------------------------------------------------------------
+ SET (HDF5_REFERENCE_TEST_FILES
+ family_file00000.h5
+ family_file00001.h5
+ family_file00002.h5
+ family_file00003.h5
+ family_file00004.h5
+ family_file00005.h5
+ family_file00006.h5
+ family_file00007.h5
+ family_file00008.h5
+ family_file00009.h5
+ family_file00010.h5
+ family_file00011.h5
+ family_file00012.h5
+ family_file00013.h5
+ family_file00014.h5
+ family_file00015.h5
+ family_file00016.h5
+ family_file00017.h5
+ )
+
+ FOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ SET (dest "${PROJECT_BINARY_DIR}/${h5_file}")
+ #MESSAGE (STATUS " Copying ${h5_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5repart
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_file} ${dest}
+ )
+ ENDFOREACH (h5_file ${HDF5_REFERENCE_TEST_FILES})
+
+ SET (HDF5_MKGRP_TEST_FILES
+ #h5mkgrp_help.txt
+ #h5mkgrp_version
+ h5mkgrp_single.ls
+ h5mkgrp_single_v.ls
+ h5mkgrp_single_p.ls
+ h5mkgrp_single_l.ls
+ h5mkgrp_several.ls
+ h5mkgrp_several_v.ls
+ h5mkgrp_several_p.ls
+ h5mkgrp_several_l.ls
+ h5mkgrp_nested_p.ls
+ h5mkgrp_nested_lp.ls
+ h5mkgrp_nested_mult_p.ls
+ h5mkgrp_nested_mult_lp.ls
+ )
+
+ # make test dir
+ FILE (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+
+ FOREACH (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
+ SET (dest "${PROJECT_BINARY_DIR}/testfiles/${h5_mkgrp_file}")
+ #MESSAGE (STATUS " Copying ${h5_mkgrp_file}")
+ ADD_CUSTOM_COMMAND (
+ TARGET h5mkgrp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${h5_mkgrp_file} ${dest}
+ )
+ ENDFOREACH (h5_mkgrp_file ${HDF5_MKGRP_TEST_FILES})
+
+ ADD_CUSTOM_COMMAND (
+ TARGET h5mkgrp
+ POST_BUILD
+ COMMAND ${CMAKE_COMMAND}
+ ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_help.txt ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_help.txt
+ )
+ CONFIGURE_FILE (${PROJECT_SOURCE_DIR}/testfiles/h5mkgrp_version.txt.in ${PROJECT_BINARY_DIR}/testfiles/h5mkgrp_version.txt @ONLY)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ MACRO (ADD_H5_TEST resultfile resultcode resultoption)
+ IF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5MKGRP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${resultfile}.h5
+ ${resultfile}.out
+ ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ ENDIF (NOT HDF5_ENABLE_USING_MEMCHECKER)
+
+ ADD_TEST (
+ NAME H5MKGRP-${resultfile}
+ COMMAND $<TARGET_FILE:h5mkgrp> ${resultoption} ${resultfile}.h5 ${ARGN}
+ )
+ SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ SET_TESTS_PROPERTIES (H5MKGRP-${resultfile} PROPERTIES DEPENDS H5MKGRP-${resultfile}-clear-objects)
+ ADD_TEST (
+ NAME H5MKGRP-${resultfile}-h5ls
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
+ -D "TEST_ARGS:STRING=-v;-r;${resultfile}.h5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_MASK_MOD=true"
+ -D "TEST_REFERENCE=${resultfile}.ls"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5MKGRP-${resultfile}-h5ls PROPERTIES DEPENDS H5MKGRP-${resultfile})
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_TEST resultfile resultcode resultoption)
+
+ MACRO (ADD_H5_CMP resultfile resultcode)
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (NAME H5MKGRP_CMP-${resultfile} COMMAND $<TARGET_FILE:h5mkgrp> ${ARGN})
+ ELSE (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5MKGRP_CMP-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${resultfile}.h5
+ ${resultfile}.out
+ ${resultfile}.out.err
+ )
+ SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ ADD_TEST (
+ NAME H5MKGRP_CMP-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5mkgrp>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.txt"
+ -P "${HDF5_RESOURCES_DIR}/runTest.cmake"
+ )
+ SET_TESTS_PROPERTIES (H5MKGRP_CMP-${resultfile} PROPERTIES DEPENDS H5MKGRP_CMP-${resultfile}-clear-objects)
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+ ENDMACRO (ADD_H5_CMP resultfile resultcode)
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+
+ # Remove any output file left over from previous test run
+ ADD_TEST (
+ NAME H5REPART-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ fst_family00000.h5
+ scd_family00000.h5
+ scd_family00001.h5
+ scd_family00002.h5
+ scd_family00003.h5
+ family_to_sec2.h5
+ )
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5REPART-clearall-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5REPART-clearall-objects")
+
+ # repartition family member size to 20,000 bytes.
+ ADD_TEST (NAME H5REPART-h5repart_20K COMMAND $<TARGET_FILE:h5repart> -m 20000 family_file%05d.h5 fst_family%05d.h5)
+ SET_TESTS_PROPERTIES (H5REPART-h5repart_20K PROPERTIES DEPENDS H5REPART-clearall-objects)
+
+ # repartition family member size to 5 KB.
+ ADD_TEST (NAME H5REPART-h5repart_5K COMMAND $<TARGET_FILE:h5repart> -m 5k family_file%05d.h5 scd_family%05d.h5)
+ SET_TESTS_PROPERTIES (H5REPART-h5repart_5K PROPERTIES DEPENDS H5REPART-clearall-objects)
+
+ # convert family file to sec2 file of 20,000 bytes
+ ADD_TEST (NAME H5REPART-h5repart_sec2 COMMAND $<TARGET_FILE:h5repart> -m 20000 -family_to_sec2 family_file%05d.h5 family_to_sec2.h5)
+ SET_TESTS_PROPERTIES (H5REPART-h5repart_sec2 PROPERTIES DEPENDS H5REPART-clearall-objects)
+
+ # test the output files repartitioned above.
+ ADD_TEST (NAME H5REPART-h5repart_test COMMAND $<TARGET_FILE:h5repart_test>)
+ SET_TESTS_PROPERTIES (H5REPART-h5repart_test PROPERTIES DEPENDS H5REPART-clearall-objects DEPENDS H5REPART-h5repart_20K DEPENDS H5REPART-h5repart_5K DEPENDS H5REPART-h5repart_sec2)
+
+ SET (H5_DEP_EXECUTABLES ${H5_DEP_EXECUTABLES}
+ h5repart_test
+ )
+
+ IF (HDF5_ENABLE_USING_MEMCHECKER)
+ ADD_TEST (
+ NAME H5MKGRP-clearall-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ h5mkgrp_help.out
+ h5mkgrp_help.out.err
+ h5mkgrp_version.out
+ h5mkgrp_version.out.err
+ h5mkgrp_single.h5
+ h5mkgrp_single.out
+ h5mkgrp_single.out.err
+ h5mkgrp_single_v.h5
+ h5mkgrp_single_v.out
+ h5mkgrp_single_v.out.err
+ h5mkgrp_single_p.h5
+ h5mkgrp_single_p.out
+ h5mkgrp_single_p.out.err
+ h5mkgrp_single_l.h5
+ h5mkgrp_single_l.out
+ h5mkgrp_single_l.out.err
+ h5mkgrp_several.h5
+ h5mkgrp_several.out
+ h5mkgrp_several.out.err
+ h5mkgrp_several_v.h5
+ h5mkgrp_several_v.out
+ h5mkgrp_several_v.out.err
+ h5mkgrp_several_p.h5
+ h5mkgrp_several_p.out
+ h5mkgrp_several_p.out.err
+ h5mkgrp_several_l.h5
+ h5mkgrp_several_l.out
+ h5mkgrp_several_l.out.err
+ h5mkgrp_nested_p.h5
+ h5mkgrp_nested_p.out
+ h5mkgrp_nested_p.out.err
+ h5mkgrp_nested_lp.h5
+ h5mkgrp_nested_lp.out
+ h5mkgrp_nested_lp.out.err
+ h5mkgrp_nested_mult_p.h5
+ h5mkgrp_nested_mult_p.out
+ h5mkgrp_nested_mult_p.out.err
+ h5mkgrp_nested_mult_lp.h5
+ h5mkgrp_nested_mult_lp.out
+ h5mkgrp_nested_mult_lp.out.err
+ )
+ SET_TESTS_PROPERTIES (H5MKGRP-clearall-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles")
+ IF (NOT "${last_test}" STREQUAL "")
+ SET_TESTS_PROPERTIES (H5MKGRP-clearall-objects PROPERTIES DEPENDS ${last_test})
+ ENDIF (NOT "${last_test}" STREQUAL "")
+ SET (last_test "H5MKGRP-clearall-objects")
+ ENDIF (HDF5_ENABLE_USING_MEMCHECKER)
+
+ # Check that help & version is displayed properly
+ ADD_H5_CMP (h5mkgrp_help 0 "-h")
+ ADD_H5_CMP (h5mkgrp_version 0 "-V")
+
+ # Create single group at root level
+ ADD_H5_TEST (h5mkgrp_single 0 "" single)
+ ADD_H5_TEST (h5mkgrp_single_v 0 "-v" single)
+ ADD_H5_TEST (h5mkgrp_single_p 0 "-p" single)
+ ADD_H5_TEST (h5mkgrp_single_l 0 "-l" latest)
+
+ # Create several groups at root level
+ ADD_H5_TEST (h5mkgrp_several 0 "" one two)
+ ADD_H5_TEST (h5mkgrp_several_v 0 "-v" one two)
+ ADD_H5_TEST (h5mkgrp_several_p 0 "-p" one two)
+ ADD_H5_TEST (h5mkgrp_several_l 0 "-l" one two)
+
+ # Create various nested groups
+ ADD_H5_TEST (h5mkgrp_nested_p 0 "-p" /one/two)
+ ADD_H5_TEST (h5mkgrp_nested_lp 0 "-lp" /one/two)
+ ADD_H5_TEST (h5mkgrp_nested_mult_p 0 "-p" /one/two /three/four)
+ ADD_H5_TEST (h5mkgrp_nested_mult_lp 0 "-lp" /one/two /three/four)