From 0d912d463206762d8dfe5fa46fd2318b1ee50123 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 21 Feb 2018 16:23:07 -0600 Subject: HDFFV-10412 moved check back into normal path --- release_docs/RELEASE.txt | 12 +++++++++++ tools/src/h5repack/h5repack_filters.c | 40 +++++++++++++++++------------------ 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index e7186c5..4675423 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -310,6 +310,18 @@ Bug Fixes since HDF5-1.10.1 release Tools ----- + - h5repack + + h5repack changes the chunk parameters when a change of layout is not + specified and a filter is applied. + + HDFFV-10297, HDFFV-10319 reworked code for h5repack and h5diff code + in the tools library. The check for an existing layout was incorrectly + placed into an if block and not executed. The check was moved into + the normal path of the function. + + (ADB - 2018/02/21, HDFFV-10412) + - h5dump the tools library will hide the error stack during file open. diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c index ae0bfd5..253be6d 100644 --- a/tools/src/h5repack/h5repack_filters.c +++ b/tools/src/h5repack/h5repack_filters.c @@ -280,33 +280,33 @@ int apply_filters(const char* name, /* object name from traverse list */ *has_filter = 1; if (H5Premove_filter(dcpl_id, H5Z_FILTER_ALL) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Premove_filter failed"); - - /*------------------------------------------------------------------------- - * check if there is an existent chunk - * read it only if there is not a requested layout - *------------------------------------------------------------------------- - */ - if (obj.layout == -1) { - if ((layout = H5Pget_layout(dcpl_id)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed"); - - if (layout == H5D_CHUNKED) { - if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0) - HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed"); - obj.layout = H5D_CHUNKED; - obj.chunk.rank = rank; - for (i = 0; i < rank; i++) - obj.chunk.chunk_lengths[i] = chsize[i]; - } - } } else if(nfilters) { - *has_filter = 1; + *has_filter = 1; if (aux_copy_obj(dcpl_id, name, &filtobj) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "aux_copy_obj failed"); } /*------------------------------------------------------------------------- + * check if there is an existent chunk + * read it only if there is not a requested layout + *------------------------------------------------------------------------- + */ + if (obj.layout == -1) { + if ((layout = H5Pget_layout(dcpl_id)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_layout failed"); + + if (layout == H5D_CHUNKED) { + if ((rank = H5Pget_chunk(dcpl_id, NELMTS(chsize), chsize/*out*/)) < 0) + HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Pget_chunk failed"); + obj.layout = H5D_CHUNKED; + obj.chunk.rank = rank; + for (i = 0; i < rank; i++) + obj.chunk.chunk_lengths[i] = chsize[i]; + } + } + + /*------------------------------------------------------------------------- * the type of filter and additional parameter * type can be one of the filters * H5Z_FILTER_NONE 0 , uncompress if compressed -- cgit v0.12 From b996ee29726b820869776620c6a9f496c4823762 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 21 Feb 2018 16:29:41 -0600 Subject: HDFFV-10412 fix typo --- tools/src/h5repack/h5repack_filters.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/src/h5repack/h5repack_filters.c b/tools/src/h5repack/h5repack_filters.c index 253be6d..0092abc 100644 --- a/tools/src/h5repack/h5repack_filters.c +++ b/tools/src/h5repack/h5repack_filters.c @@ -282,7 +282,7 @@ int apply_filters(const char* name, /* object name from traverse list */ HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Premove_filter failed"); } else if(nfilters) { - *has_filter = 1; + *has_filter = 1; if (aux_copy_obj(dcpl_id, name, &filtobj) < 0) HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "aux_copy_obj failed"); } -- cgit v0.12 From 76a0003f96f8e1336062089380adc95f8b3dee56 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 22 Feb 2018 10:18:17 -0600 Subject: HDFFV-10412 update test ref files --- tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl | 4 ++-- tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl | 2 +- .../h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl b/tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl index 1dcc742..75f54fa 100644 --- a/tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl +++ b/tools/test/h5repack/testfiles/deflate_limit.h5repack_layout.h5.ddl @@ -76,8 +76,8 @@ GROUP "/" { DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } STORAGE_LAYOUT { - CHUNKED ( 40, 20 ) - SIZE 1150 (2.783:1 COMPRESSION) + CHUNKED ( 20, 10 ) + SIZE 1283 (2.494:1 COMPRESSION) } FILTERS { COMPRESSION DEFLATE { LEVEL 1 } diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl index 4856f84..a8b4562 100644 --- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl +++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_test.ddl @@ -92,7 +92,7 @@ GROUP "/" { DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } STORAGE_LAYOUT { - CHUNKED ( 40, 20 ) + CHUNKED ( 20, 10 ) SIZE 3200 (1.000:1 COMPRESSION) } FILTERS { diff --git a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl index 5a1ebe7..a1fc0cb 100644 --- a/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl +++ b/tools/test/h5repack/testfiles/h5repack_layout.h5-plugin_version_test.ddl @@ -92,7 +92,7 @@ GROUP "/" { DATATYPE H5T_STD_I32LE DATASPACE SIMPLE { ( 40, 20 ) / ( 40, 20 ) } STORAGE_LAYOUT { - CHUNKED ( 40, 20 ) + CHUNKED ( 20, 10 ) SIZE 3200 (1.000:1 COMPRESSION) } FILTERS { -- cgit v0.12 From a4f0666ecdd0f48081e43eef2e792d791044e549 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 26 Feb 2018 16:13:25 -0600 Subject: Update list --- release_docs/INSTALL_CMake.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 8c72685..64eb1d2 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -564,7 +564,6 @@ HDF5_BUILD_TOOLS "Build HDF5 Tools" ON ALLOW_UNSUPPORTED "Allow unsupported combinations of configure options" OFF HDF5_DISABLE_COMPILER_WARNINGS "Disable compiler warnings" OFF HDF5_ENABLE_ALL_WARNINGS "Enable all warnings" OFF -HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF HDF5_ENABLE_CODESTACK "Enable the function stack tracing (for developer debugging)." OFF HDF5_ENABLE_COVERAGE "Enable code coverage for Libraries and Programs" OFF HDF5_ENABLE_DEBUG_APIS "Turn on extra debug output in all packages" OFF @@ -584,6 +583,8 @@ HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" HDF5_NO_PACKAGES "Do not include CPack Packaging" OFF HDF5_PACK_EXAMPLES "Package the HDF5 Library Examples Compressed File" OFF HDF5_PACK_MACOSX_FRAMEWORK "Package the HDF5 Library in a Frameworks" OFF +HDF5_BUILD_FRAMEWORKS "TRUE to build as frameworks libraries, + FALSE to build according to BUILD_SHARED_LIBS" FALSE HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries" OFF HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF HDF_TEST_EXPRESS "Control testing framework (0-3)" "0" @@ -597,7 +598,7 @@ HDF5_ENABLE_THREADSAFE "Enable Threadsafety" if (APPLE) HDF5_BUILD_WITH_INSTALL_NAME "Build with library install_name set to the installation path" OFF if (CMAKE_BUILD_TYPE MATCHES Debug) - HDF5_ENABLE_TRACE "Enable API tracing capability" ON + HDF5_ENABLE_INSTRUMENT "Instrument The library" OFF if (HDF5_TEST_VFD) HDF5_TEST_FHEAP_VFD "Execute fheap test with different VFDs" ON -- cgit v0.12 From b36bad53d9d5930ef1339d0db1bd7152c0e9b75d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 27 Feb 2018 12:57:07 -0600 Subject: Inc CMake min, Add new tests, rework test CMake files --- CMakeLists.txt | 2 +- MANIFEST | 1 + c++/CMakeLists.txt | 2 +- c++/examples/CMakeLists.txt | 2 +- c++/examples/CMakeTests.cmake | 4 +- c++/src/CMakeLists.txt | 2 +- c++/test/CMakeLists.txt | 2 +- config/cmake/CTestScript.cmake | 2 +- config/cmake/HDF518_Examples.cmake.in | 2 +- config/cmake/HDF5_Examples.cmake.in | 2 +- config/cmake/scripts/CTestScript.cmake | 2 +- config/cmake/scripts/HDF5config.cmake | 2 +- examples/CMakeLists.txt | 2 +- fortran/CMakeLists.txt | 2 +- fortran/examples/CMakeLists.txt | 2 +- fortran/src/CMakeLists.txt | 2 +- fortran/test/CMakeLists.txt | 2 +- fortran/testpar/CMakeLists.txt | 2 +- hl/CMakeLists.txt | 2 +- hl/c++/CMakeLists.txt | 2 +- hl/c++/examples/CMakeLists.txt | 2 +- hl/c++/src/CMakeLists.txt | 2 +- hl/c++/test/CMakeLists.txt | 2 +- hl/examples/CMakeLists.txt | 2 +- hl/fortran/CMakeLists.txt | 2 +- hl/fortran/examples/CMakeLists.txt | 2 +- hl/fortran/src/CMakeLists.txt | 2 +- hl/fortran/test/CMakeLists.txt | 2 +- hl/src/CMakeLists.txt | 2 +- hl/test/CMakeLists.txt | 2 +- hl/tools/CMakeLists.txt | 2 +- hl/tools/gif2h5/CMakeLists.txt | 2 +- hl/tools/h5watch/CMakeLists.txt | 2 +- java/CMakeLists.txt | 2 +- java/examples/CMakeLists.txt | 2 +- java/examples/datasets/CMakeLists.txt | 2 +- java/examples/datatypes/CMakeLists.txt | 2 +- java/examples/groups/CMakeLists.txt | 2 +- java/examples/intro/CMakeLists.txt | 2 +- java/src/CMakeLists.txt | 2 +- java/src/hdf/CMakeLists.txt | 2 +- java/src/hdf/hdf5lib/CMakeLists.txt | 2 +- java/src/jni/CMakeLists.txt | 2 +- java/test/CMakeLists.txt | 2 +- java/test/TestH5Pfapl.java | 7 + release_docs/INSTALL_CMake.txt | 2 +- release_docs/USING_HDF5_CMake.txt | 2 +- src/CMakeLists.txt | 2 +- test/CMakeLists.txt | 225 ++++++----- test/CMakeTests.cmake | 578 ++++++----------------------- test/CMakeVFDTests.cmake | 303 +++++++++++++++ testpar/CMakeLists.txt | 3 +- tools/CMakeLists.txt | 2 +- tools/lib/CMakeLists.txt | 2 +- tools/src/CMakeLists.txt | 2 +- tools/src/h5copy/CMakeLists.txt | 2 +- tools/src/h5diff/CMakeLists.txt | 2 +- tools/src/h5dump/CMakeLists.txt | 2 +- tools/src/h5format_convert/CMakeLists.txt | 2 +- tools/src/h5import/CMakeLists.txt | 2 +- tools/src/h5jam/CMakeLists.txt | 2 +- tools/src/h5ls/CMakeLists.txt | 2 +- tools/src/h5repack/CMakeLists.txt | 2 +- tools/src/h5stat/CMakeLists.txt | 2 +- tools/src/misc/CMakeLists.txt | 2 +- tools/test/CMakeLists.txt | 2 +- tools/test/h5copy/CMakeLists.txt | 2 +- tools/test/h5diff/CMakeLists.txt | 2 +- tools/test/h5dump/CMakeLists.txt | 2 +- tools/test/h5format_convert/CMakeLists.txt | 2 +- tools/test/h5import/CMakeLists.txt | 2 +- tools/test/h5jam/CMakeLists.txt | 2 +- tools/test/h5ls/CMakeLists.txt | 2 +- tools/test/h5repack/CMakeLists.txt | 2 +- tools/test/h5repack/CMakeTests.cmake | 161 +++++--- tools/test/h5stat/CMakeLists.txt | 2 +- tools/test/misc/CMakeLists.txt | 2 +- tools/test/misc/vds/CMakeLists.txt | 2 +- tools/test/perform/CMakeLists.txt | 2 +- 79 files changed, 729 insertions(+), 695 deletions(-) create mode 100644 test/CMakeVFDTests.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c7bb38..e7dda17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5 C CXX) #----------------------------------------------------------------------------- diff --git a/MANIFEST b/MANIFEST index 8e79458..f365884 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3176,6 +3176,7 @@ ./src/CMakeLists.txt ./test/CMakeLists.txt ./test/CMakeTests.cmake +./test/CMakeVFDTests.cmake ./testpar/CMakeLists.txt ./testpar/CMakeTests.cmake ./tools/CMakeLists.txt diff --git a/c++/CMakeLists.txt b/c++/CMakeLists.txt index adbf1a4..2d3ab0f 100644 --- a/c++/CMakeLists.txt +++ b/c++/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_CPP) #----------------------------------------------------------------------------- diff --git a/c++/examples/CMakeLists.txt b/c++/examples/CMakeLists.txt index 300f6bc..397c300 100644 --- a/c++/examples/CMakeLists.txt +++ b/c++/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_CPP_EXAMPLES) # -------------------------------------------------------------------- diff --git a/c++/examples/CMakeTests.cmake b/c++/examples/CMakeTests.cmake index 264a7e7..bd1f95b 100644 --- a/c++/examples/CMakeTests.cmake +++ b/c++/examples/CMakeTests.cmake @@ -51,7 +51,7 @@ endif () set (last_test "CPP_ex_${example}") endforeach () -#the following dependicies are handled by the order of the files +#the following dependencies are handled by the order of the files # SET_TESTS_PROPERTIES(CPP_ex_readdata PROPERTIES DEPENDS CPP_ex_create) # SET_TESTS_PROPERTIES(CPP_ex_chunks PROPERTIES DEPENDS CPP_ex_extend_ds) @@ -91,7 +91,7 @@ endif () set (last_test "CPP_ex_${example}") endforeach () -#the following dependicies are handled by the order of the files +#the following dependencies are handled by the order of the files # SET_TESTS_PROPERTIES(CPP_ex_h5tutr_crtatt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat) # SET_TESTS_PROPERTIES(CPP_ex_h5tutr_rdwt PROPERTIES DEPENDS CPP_ex_h5tutr_crtdat) # SET_TESTS_PROPERTIES(CPP_ex_h5tutr_crtgrpd PROPERTIES DEPENDS CPP_ex_h5tutr_crtgrpar) diff --git a/c++/src/CMakeLists.txt b/c++/src/CMakeLists.txt index 3b9a0c3..921497f 100644 --- a/c++/src/CMakeLists.txt +++ b/c++/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_CPP_SRC) #----------------------------------------------------------------------------- diff --git a/c++/test/CMakeLists.txt b/c++/test/CMakeLists.txt index 4930626..5194865 100644 --- a/c++/test/CMakeLists.txt +++ b/c++/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_CPP_TEST) # -------------------------------------------------------------------- # Notes: When creating unit test executables they should be prefixed diff --git a/config/cmake/CTestScript.cmake b/config/cmake/CTestScript.cmake index a8b7bbc..27ae3a0 100755 --- a/config/cmake/CTestScript.cmake +++ b/config/cmake/CTestScript.cmake @@ -9,7 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # -cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) +cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR) ######################################################## # For any comments please contact cdashhelp@hdfgroup.org # diff --git a/config/cmake/HDF518_Examples.cmake.in b/config/cmake/HDF518_Examples.cmake.in index 6af0b09..0e81217 100644 --- a/config/cmake/HDF518_Examples.cmake.in +++ b/config/cmake/HDF518_Examples.cmake.in @@ -9,7 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # -cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR) +cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR) ############################################################################################################### # This script will build and run the examples from a folder # Execute from a command line: diff --git a/config/cmake/HDF5_Examples.cmake.in b/config/cmake/HDF5_Examples.cmake.in index bede701..6453b16 100644 --- a/config/cmake/HDF5_Examples.cmake.in +++ b/config/cmake/HDF5_Examples.cmake.in @@ -9,7 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # -cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR) +cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR) ############################################################################################################### # This script will build and run the examples from a folder # Execute from a command line: diff --git a/config/cmake/scripts/CTestScript.cmake b/config/cmake/scripts/CTestScript.cmake index f826e31..cfad6f1 100755 --- a/config/cmake/scripts/CTestScript.cmake +++ b/config/cmake/scripts/CTestScript.cmake @@ -9,7 +9,7 @@ # If you do not have access to either file, you may request a copy from # help@hdfgroup.org. # -cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) +cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR) ######################################################## # This dashboard is maintained by The HDF Group # For any comments please contact cdashhelp@hdfgroup.org diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index 33d7868..88843fa 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -15,7 +15,7 @@ ### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log ### ############################################################################################# -cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) +cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR) ############################################################################ # Usage: # ctest -S HDF5config.cmake,OPTION=VALUE -C Release -VV -O test.log diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 43c6d63..e9430d9 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_EXAMPLES) #----------------------------------------------------------------------------- diff --git a/fortran/CMakeLists.txt b/fortran/CMakeLists.txt index a0f92d3..7864f2d 100644 --- a/fortran/CMakeLists.txt +++ b/fortran/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_F90 C CXX Fortran) if (H5_HAVE_PARALLEL) diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt index a48b3bd..9adf8bd 100644 --- a/fortran/examples/CMakeLists.txt +++ b/fortran/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_F90_EXAMPLES C CXX Fortran) # -------------------------------------------------------------------- # Notes: When creating examples they should be prefixed diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index 5446616..9bf1719 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_F90_SRC C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 86f7a12..67d377f 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/fortran/testpar/CMakeLists.txt b/fortran/testpar/CMakeLists.txt index ed9d28c..b1cf9d2 100644 --- a/fortran/testpar/CMakeLists.txt +++ b/fortran/testpar/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_FORTRAN_TESTPAR C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/CMakeLists.txt b/hl/CMakeLists.txt index d80b4f9..eac6df0 100644 --- a/hl/CMakeLists.txt +++ b/hl/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL C CXX) #----------------------------------------------------------------------------- diff --git a/hl/c++/CMakeLists.txt b/hl/c++/CMakeLists.txt index 9a1d059..c5b4a72 100644 --- a/hl/c++/CMakeLists.txt +++ b/hl/c++/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_CPP) #----------------------------------------------------------------------------- diff --git a/hl/c++/examples/CMakeLists.txt b/hl/c++/examples/CMakeLists.txt index 8c48795..bf96fba 100644 --- a/hl/c++/examples/CMakeLists.txt +++ b/hl/c++/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_CPP_EXAMPLES) #----------------------------------------------------------------------------- diff --git a/hl/c++/src/CMakeLists.txt b/hl/c++/src/CMakeLists.txt index 70f0a79..0f187c5 100644 --- a/hl/c++/src/CMakeLists.txt +++ b/hl/c++/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_CPP_SRC) #----------------------------------------------------------------------------- diff --git a/hl/c++/test/CMakeLists.txt b/hl/c++/test/CMakeLists.txt index 54afd7c..28b5eb8 100644 --- a/hl/c++/test/CMakeLists.txt +++ b/hl/c++/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_CPP_TEST) #----------------------------------------------------------------------------- diff --git a/hl/examples/CMakeLists.txt b/hl/examples/CMakeLists.txt index 68f0128..dd94da0 100644 --- a/hl/examples/CMakeLists.txt +++ b/hl/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_EXAMPLES ) #----------------------------------------------------------------------------- diff --git a/hl/fortran/CMakeLists.txt b/hl/fortran/CMakeLists.txt index 00d7517..37c5cc9 100644 --- a/hl/fortran/CMakeLists.txt +++ b/hl/fortran/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_F90 C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/fortran/examples/CMakeLists.txt b/hl/fortran/examples/CMakeLists.txt index d920d64..ff0403a 100644 --- a/hl/fortran/examples/CMakeLists.txt +++ b/hl/fortran/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_F90_EXAMPLES C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 5ad441c..7a2eff1 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT(HDF5_HL_F90_SRC C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/fortran/test/CMakeLists.txt b/hl/fortran/test/CMakeLists.txt index b264d5f..1ec4b93 100644 --- a/hl/fortran/test/CMakeLists.txt +++ b/hl/fortran/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_FORTRAN_TESTS C CXX Fortran) #----------------------------------------------------------------------------- diff --git a/hl/src/CMakeLists.txt b/hl/src/CMakeLists.txt index 3dd6ce8..d21a3ea 100644 --- a/hl/src/CMakeLists.txt +++ b/hl/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_SRC) #----------------------------------------------------------------------------- diff --git a/hl/test/CMakeLists.txt b/hl/test/CMakeLists.txt index 82a3c1b..1f2ea17 100644 --- a/hl/test/CMakeLists.txt +++ b/hl/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_TEST) # -------------------------------------------------------------------- # Notes: When creating unit test executables they should be prefixed diff --git a/hl/tools/CMakeLists.txt b/hl/tools/CMakeLists.txt index 43229e8..ab71a7e 100644 --- a/hl/tools/CMakeLists.txt +++ b/hl/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_TOOLS C CXX) add_subdirectory (gif2h5) diff --git a/hl/tools/gif2h5/CMakeLists.txt b/hl/tools/gif2h5/CMakeLists.txt index 34d7074..b50bbf7 100644 --- a/hl/tools/gif2h5/CMakeLists.txt +++ b/hl/tools/gif2h5/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_TOOLS_GIF2H5) #----------------------------------------------------------------------------- diff --git a/hl/tools/h5watch/CMakeLists.txt b/hl/tools/h5watch/CMakeLists.txt index d0764c9..a1697cd 100644 --- a/hl/tools/h5watch/CMakeLists.txt +++ b/hl/tools/h5watch/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_HL_TOOLS_H5WATCH) #----------------------------------------------------------------------------- diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt index 9a5692f..d8cd358 100644 --- a/java/CMakeLists.txt +++ b/java/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT ( HDF5_JAVA C Java ) set (CMAKE_MODULE_PATH "${HDF_RESOURCES_DIR};${HDF_RESOURCES_EXT_DIR}") diff --git a/java/examples/CMakeLists.txt b/java/examples/CMakeLists.txt index 3073918..d43b49f 100644 --- a/java/examples/CMakeLists.txt +++ b/java/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDFJAVA_EXAMPLES) add_subdirectory (datasets) diff --git a/java/examples/datasets/CMakeLists.txt b/java/examples/datasets/CMakeLists.txt index 3e8bc8b..ed4559c 100644 --- a/java/examples/datasets/CMakeLists.txt +++ b/java/examples/datasets/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDFJAVA_EXAMPLES_DATASETS Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/examples/datatypes/CMakeLists.txt b/java/examples/datatypes/CMakeLists.txt index b79ba64..71cf83e 100644 --- a/java/examples/datatypes/CMakeLists.txt +++ b/java/examples/datatypes/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDFJAVA_EXAMPLES_DATATYPES Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/examples/groups/CMakeLists.txt b/java/examples/groups/CMakeLists.txt index 56c92fe..dc5d834 100644 --- a/java/examples/groups/CMakeLists.txt +++ b/java/examples/groups/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDFJAVA_EXAMPLES_GROUPS Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/examples/intro/CMakeLists.txt b/java/examples/intro/CMakeLists.txt index 495ec5e..59fe48b 100644 --- a/java/examples/intro/CMakeLists.txt +++ b/java/examples/intro/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDFJAVA_EXAMPLES_INTRO Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/src/CMakeLists.txt b/java/src/CMakeLists.txt index 9bdab4b..7075d32 100644 --- a/java/src/CMakeLists.txt +++ b/java/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT ( HDF5_JAVA_SRC C Java ) #----------------------------------------------------------------------------- diff --git a/java/src/hdf/CMakeLists.txt b/java/src/hdf/CMakeLists.txt index 649f7d0..35b436d 100644 --- a/java/src/hdf/CMakeLists.txt +++ b/java/src/hdf/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_JAVA_HDF) add_subdirectory (hdf5lib) diff --git a/java/src/hdf/hdf5lib/CMakeLists.txt b/java/src/hdf/hdf5lib/CMakeLists.txt index c856c04..1f2587e 100644 --- a/java/src/hdf/hdf5lib/CMakeLists.txt +++ b/java/src/hdf/hdf5lib/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_JAVA_HDF_HDF5 Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/src/jni/CMakeLists.txt b/java/src/jni/CMakeLists.txt index ea9665b..8ab275e 100644 --- a/java/src/jni/CMakeLists.txt +++ b/java/src/jni/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_JAVA_JNI C CXX) set (HDF5_JAVA_JNI_CSRCS diff --git a/java/test/CMakeLists.txt b/java/test/CMakeLists.txt index 49cda32..329c602 100644 --- a/java/test/CMakeLists.txt +++ b/java/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_JAVA_TEST Java) set (CMAKE_VERBOSE_MAKEFILE 1) diff --git a/java/test/TestH5Pfapl.java b/java/test/TestH5Pfapl.java index 48a5986..ac54405 100644 --- a/java/test/TestH5Pfapl.java +++ b/java/test/TestH5Pfapl.java @@ -1385,6 +1385,13 @@ public class TestH5Pfapl { ret_val_id = H5.H5Pget_evict_on_close(fapl_id); assertTrue("H5P_evict_on_close", ret_val_id); } + catch (HDF5PropertyListInterfaceException err) { + // parallel is not supported + if (err.getMinorErrorNumber() != HDF5Constants.H5E_CANTSET) { + err.printStackTrace(); + fail("H5P_evict_on_close: " + err); + } + } catch (Throwable err) { err.printStackTrace(); fail("H5P_evict_on_close: " + err); diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 64eb1d2..99efb6a 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -648,7 +648,7 @@ adding an option (${CTEST_SCRIPT_ARG}) to the platform configuration script. ### ctest -S HDF5config.cmake,BUILD_GENERATOR=VS201764 -C Release -VV -O hdf5.log ### ############################################################################################# -cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) +cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR) ############################################################################ # Usage: # ctest -S HDF5config.cmake,OPTION=VALUE -C Release -VV -O test.log diff --git a/release_docs/USING_HDF5_CMake.txt b/release_docs/USING_HDF5_CMake.txt index fc62b75..8dd47c2 100644 --- a/release_docs/USING_HDF5_CMake.txt +++ b/release_docs/USING_HDF5_CMake.txt @@ -229,7 +229,7 @@ your application with an installed HDF5 binary. ctest use of HDF5_Examples.cmake and HDF5_Examples_options.cmake ======================================================================== -cmake_minimum_required(VERSION 3.2.2 FATAL_ERROR) +cmake_minimum_required (VERSION 3.3.2 FATAL_ERROR) ############################################################################################################### # This script will build and run the examples from a folder # Execute from a command line: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index aaedfda..bf7fb07 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_SRC C CXX) #----------------------------------------------------------------------------- diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 5e0c990..cdab4f5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TEST) #----------------------------------------------------------------------------- @@ -13,9 +13,9 @@ set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}) configure_file (${HDF5_TEST_SOURCE_DIR}/H5srcdir_str.h.in H5srcdir_str.h @ONLY) INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR}) -#----------------------------------------------------------------------------- +################################################################################# # Define Test Library Sources -#----------------------------------------------------------------------------- +################################################################################# set (TEST_LIB_SOURCES ${HDF5_TEST_SOURCE_DIR}/h5test.c ${HDF5_TEST_SOURCE_DIR}/testframe.c @@ -71,9 +71,9 @@ if (BUILD_SHARED_LIBS) endif () endif () -#----------------------------------------------------------------------------- +################################################################################# # If filter plugin tests can be tested -#----------------------------------------------------------------------------- +################################################################################# # make plugins dir file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/filter_plugin_dir1") file (MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/filter_plugin_dir2") @@ -116,7 +116,7 @@ endif () ) endforeach () - foreach ( plugin_name ${FILTER_PLUGINS_FOR_DIR2}) + foreach (plugin_name ${FILTER_PLUGINS_FOR_DIR2}) set (HDF5_TEST_PLUGIN_CORENAME "${plugin_name}") set (HDF5_TEST_PLUGIN_NAME "${HDF5_EXTERNAL_LIB_PREFIX}${HDF5_TEST_PLUGIN_CORENAME}") set (HDF5_TEST_PLUGIN_TARGET ${HDF5_TEST_PLUGIN_CORENAME}) @@ -142,6 +142,10 @@ endif () ) endforeach () +################################################################################# +# Test program sources +################################################################################# + set (testhdf5_SOURCES ${HDF5_TEST_SOURCE_DIR}/testhdf5.c ${HDF5_TEST_SOURCE_DIR}/tarray.c @@ -170,34 +174,24 @@ set (testhdf5_SOURCES ${HDF5_TEST_SOURCE_DIR}/tvlstr.c ) -#-- Adding test for testhdf5 -add_executable (testhdf5 ${testhdf5_SOURCES}) -TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") -target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET}) -set_target_properties (testhdf5 PROPERTIES FOLDER test) -if (BUILD_SHARED_LIBS) - add_executable (testhdf5-shared ${testhdf5_SOURCES}) - TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ") - target_link_libraries (testhdf5-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) - set_target_properties (testhdf5-shared PROPERTIES FOLDER test) -endif () +set (cache_image_SOURCES + ${HDF5_TEST_SOURCE_DIR}/cache_image.c + ${HDF5_TEST_SOURCE_DIR}/genall5.c +) -MACRO (ADD_H5_EXE file) - add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) - TARGET_C_PROPERTIES (${file} STATIC " " " ") - target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET}) - set_target_properties (${file} PROPERTIES FOLDER test) - if (BUILD_SHARED_LIBS) - add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c) - TARGET_C_PROPERTIES (${file}-shared SHARED " " " ") - target_link_libraries (${file}-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) - set_target_properties (${file}-shared PROPERTIES FOLDER test) - endif () -ENDMACRO () +set (ttsafe_SOURCES + ${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 +) set (H5_TESTS + testhdf5 # multiple source cache cache_api + cache_image # multiple source cache_tagging lheap ohdr @@ -210,9 +204,11 @@ set (H5_TESTS fheap pool accum + hyperslab istore bittests dt_arith + page_buffer dtypes dsets cmpd_dset @@ -233,6 +229,7 @@ set (H5_TESTS app_ref enum set_extent + ttsafe # multiple source enc_dec_plist enc_dec_plist_cross_platform getname @@ -244,7 +241,6 @@ set (H5_TESTS cross_read freespace mf - page_buffer vds file_image unregister @@ -253,98 +249,66 @@ set (H5_TESTS swmr ) -foreach (test ${H5_TESTS}) - ADD_H5_EXE(${test}) -endforeach () - -set (H5_SWMR_TESTS - swmr_addrem_writer - swmr_check_compat_vfd - swmr_generator - swmr_reader - swmr_remove_reader - swmr_remove_writer - swmr_sparse_reader - swmr_sparse_writer - swmr_start_write - swmr_writer -) - -foreach (test ${H5_SWMR_TESTS}) - ADD_H5_EXE(${test}) -endforeach () +macro (ADD_H5_EXE file) + add_executable (${file} ${HDF5_TEST_SOURCE_DIR}/${file}.c) + TARGET_C_PROPERTIES (${file} STATIC " " " ") + target_link_libraries (${file} PUBLIC ${HDF5_TEST_LIB_TARGET}) + set_target_properties (${file} PROPERTIES FOLDER test) + if (BUILD_SHARED_LIBS) + add_executable (${file}-shared ${HDF5_TEST_SOURCE_DIR}/${file}.c) + TARGET_C_PROPERTIES (${file}-shared SHARED " " " ") + target_link_libraries (${file}-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) + set_target_properties (${file}-shared PROPERTIES FOLDER test) + endif () +endmacro () -set (H5_VDS_SWMR_TESTS - vds_swmr_gen - vds_swmr_reader - vds_swmr_writer +set (H5_TESTS_MULTIPLE + testhdf5 + cache_image + ttsafe ) - -foreach (test ${H5_VDS_SWMR_TESTS}) - ADD_H5_EXE(${test}) +# Only build single source tests here +foreach (test ${H5_TESTS}) + if (NOT "${test}" IN_LIST ${H5_TESTS_MULTIPLE}) + ADD_H5_EXE(${test}) + endif () endforeach () ############################################################################## +### M U L T I P L E S O U R C E T E S T S ### ############################################################################## -### A D D I T I O N A L T E S T S ### -############################################################################## -############################################################################## + +#-- Adding test for testhdf5 +add_executable (testhdf5 ${testhdf5_SOURCES}) +TARGET_C_PROPERTIES (testhdf5 STATIC " " " ") +target_link_libraries (testhdf5 ${HDF5_TEST_LIB_TARGET}) +set_target_properties (testhdf5 PROPERTIES FOLDER test) +if (BUILD_SHARED_LIBS) + add_executable (testhdf5-shared ${testhdf5_SOURCES}) + TARGET_C_PROPERTIES (testhdf5-shared SHARED " " " ") + target_link_libraries (testhdf5-shared PUBLIC ${HDF5_TEST_LIBSH_TARGET}) + set_target_properties (testhdf5-shared PROPERTIES FOLDER test) +endif () #-- Adding test for cache_image -add_executable (cache_image - ${HDF5_TEST_SOURCE_DIR}/cache_image.c - ${HDF5_TEST_SOURCE_DIR}/genall5.c -) +add_executable (cache_image ${cache_image_SOURCES}) TARGET_C_PROPERTIES (cache_image STATIC " " " ") target_link_libraries (cache_image ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (cache_image PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) - add_executable (cache_image-shared - ${HDF5_TEST_SOURCE_DIR}/cache_image.c - ${HDF5_TEST_SOURCE_DIR}/genall5.c - ) + add_executable (cache_image-shared ${cache_image_SOURCES}) TARGET_C_PROPERTIES (cache_image-shared SHARED " " " ") target_link_libraries (cache_image-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (cache_image-shared PROPERTIES FOLDER test) endif () -#-- Adding test for hyperslab -add_executable (hyperslab ${HDF5_TEST_SOURCE_DIR}/hyperslab.c) -TARGET_C_PROPERTIES (hyperslab STATIC " " " ") -target_link_libraries (hyperslab ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) -set_target_properties (hyperslab PROPERTIES FOLDER test) -if (BUILD_SHARED_LIBS) - add_executable (hyperslab-shared ${HDF5_TEST_SOURCE_DIR}/hyperslab.c) - TARGET_C_PROPERTIES (hyperslab-shared SHARED " " " ") - target_link_libraries (hyperslab-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) - set_target_properties (hyperslab-shared PROPERTIES FOLDER test) - if (HDF5_ENABLE_THREADSAFE) - set_property (TARGET hyperslab-shared - APPEND PROPERTY COMPILE_DEFINITIONS - "H5_HAVE_THREADSAFE" - ) - endif () -endif () - #-- 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 -) +add_executable (ttsafe ${ttsafe_SOURCES}) TARGET_C_PROPERTIES (ttsafe STATIC " " " ") target_link_libraries (ttsafe ${HDF5_LIB_TARGET} ${HDF5_TEST_LIB_TARGET}) set_target_properties (ttsafe PROPERTIES FOLDER test) if (BUILD_SHARED_LIBS) - add_executable (ttsafe-shared - ${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 - ) + add_executable (ttsafe-shared ${ttsafe_SOURCES}) TARGET_C_PROPERTIES (ttsafe-shared SHARED " " " ") target_link_libraries (ttsafe-shared ${HDF5_TEST_LIBSH_TARGET} ${HDF5_LIBSH_TARGET}) set_target_properties (ttsafe-shared PROPERTIES FOLDER test) @@ -356,6 +320,10 @@ if (BUILD_SHARED_LIBS) endif () endif () +############################################################################## +### A D D I T I O N A L T E S T S ### +############################################################################## + set (H5_CHECK_TESTS error_test err_compat @@ -364,14 +332,57 @@ set (H5_CHECK_TESTS atomic_writer atomic_reader links_env - flushrefresh filenotclosed + flushrefresh ) foreach (test ${H5_CHECK_TESTS}) ADD_H5_EXE(${test}) endforeach () +#-- 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 () + message (STATUS \"COMMAND Result: \${TEST_RESULT}\") +endif () +" +) + +############################################################################## +### S W I M M E R T E S T S ### +############################################################################## + +set (H5_SWMR_TESTS + swmr_addrem_writer + swmr_check_compat_vfd + swmr_generator + swmr_reader + swmr_remove_reader + swmr_remove_writer + swmr_sparse_reader + swmr_sparse_writer + swmr_start_write + swmr_writer +) + +foreach (test ${H5_SWMR_TESTS}) + ADD_H5_EXE(${test}) +endforeach () + +set (H5_VDS_SWMR_TESTS + vds_swmr_gen + vds_swmr_reader + vds_swmr_writer +) + +foreach (test ${H5_VDS_SWMR_TESTS}) + ADD_H5_EXE(${test}) +endforeach () + #-- Adding test for accum_swmr_reader # This has to be copied to the test directory for execve() to find it # and it can't be renamed (i.e., no -shared). @@ -386,18 +397,6 @@ if (BUILD_SHARED_LIBS) set_target_properties (accum-shared PROPERTIES DEPENDS accum_swmr_reader) endif () -#-- 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 () - message (STATUS \"COMMAND Result: \${TEST_RESULT}\") -endif () -" -) - ############################################################################## ### P L U G I N T E S T S ############################################################################## diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 06bbd06..9b1ea6b 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -26,27 +26,6 @@ if (BUILD_SHARED_LIBS) file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/H5TEST-shared/testfiles/plist_files") endif () -if (HDF5_TEST_VFD) - set (VFD_LIST - sec2 - stdio - core - core_paged - split - multi - family - ) - if (DIRECT_VFD) - set (VFD_LIST ${VFD_LIST} direct) - endif () - foreach (vfdtest ${VFD_LIST}) - file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}") - #if (BUILD_SHARED_LIBS) - # file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared") - #endif () - endforeach () -endif () - # -------------------------------------------------------------------- # Copy all the HDF5 files from the source directory into the test directory # -------------------------------------------------------------------- @@ -75,16 +54,6 @@ foreach (h5_tfile ${HDF5_TEST_FILES}) HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/H5TEST-shared/${h5_tfile}" "HDF5_TEST_LIBSH_files") endif () endforeach () -if (HDF5_TEST_VFD) - foreach (vfdtest ${VFD_LIST}) - foreach (h5_tfile ${HDF5_TEST_FILES}) - HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}" "HDF5_TEST_LIB_files") - if (BUILD_SHARED_LIBS) - HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${h5_tfile}" "HDF5_TEST_LIBSH_files") - endif () - endforeach () - endforeach () -endif () # -------------------------------------------------------------------- # Copy all the HDF5 files from the test directory into the source directory @@ -103,16 +72,6 @@ foreach (ref_file ${HDF5_REFERENCE_FILES}) HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/H5TEST-shared/${ref_file}" "HDF5_TEST_LIBSH_files") endif () endforeach () -if (HDF5_TEST_VFD) - foreach (vfdtest ${VFD_LIST}) - foreach (ref_file ${HDF5_REFERENCE_FILES}) - HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}/${ref_file}" "HDF5_TEST_LIB_files") - if (BUILD_SHARED_LIBS) - HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${ref_file}" "HDF5_TEST_LIBSH_files") - endif () - endforeach () - endforeach () -endif () # -------------------------------------------------------------------- # Copy test files from test/testfiles/plist_files dir to test dir @@ -238,16 +197,7 @@ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/H5TEST-shared/${h5_file}" "HDF5_TEST_LIBSH_files") endif () endforeach () -if (HDF5_TEST_VFD) - foreach (vfdtest ${VFD_LIST}) - foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) - HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}/${h5_file}" "HDF5_TEST_LIB_files") - if (BUILD_SHARED_LIBS) - HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}-shared/${h5_file}" "HDF5_TEST_LIBSH_files") - endif () - endforeach () - endforeach () -endif () + add_custom_target(HDF5_TEST_LIB_files ALL COMMENT "Copying files needed by HDF5_TEST_LIB tests" DEPENDS ${HDF5_TEST_LIB_files_list}) if (BUILD_SHARED_LIBS) add_custom_target(HDF5_TEST_LIBSH_files ALL COMMENT "Copying files needed by HDF5_TEST_LIBSH tests" DEPENDS ${HDF5_TEST_LIBSH_files_list}) @@ -593,97 +543,42 @@ add_test (NAME H5TEST-clear-objects ${HDF5_TEST_BINARY_DIR}/H5TEST ) -set (H5TEST_TESTS - #testhdf5 - #cache - cache_api - cache_tagging - lheap - ohdr - stab - gheap - evict_on_close - farray - earray - btree2 - fheap - pool - accum - #hyperslab - istore - bittests - dt_arith - dtypes - dsets - cmpd_dset - filter_fail - extend - external - efc - objcopy - links - unlink - twriteorder - big - mtime - fillval - mount - flush1 - flush2 - app_ref - enum - set_extent - ttsafe - enc_dec_plist - enc_dec_plist_cross_platform - getname - vfd - ntypes - dangle - dtransform - reserved - cross_read - freespace - mf - page_buffer - vds - file_image - unregister - cache_logging - cork - swmr +set (H5TEST_SEPARATE_TESTS + cache + cache_image ) - foreach (test ${H5TEST_TESTS}) - if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME H5TEST-${test} COMMAND $) - set_tests_properties (H5TEST-${test} PROPERTIES - DEPENDS H5TEST-clear-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST - ) - else () - if ("${test}" STREQUAL "big" AND CYGWIN) - add_test (NAME H5TEST-${test} - COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}" + if (NOT "${test}" IN_LIST ${H5TEST_SEPARATE_TESTS}) + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME H5TEST-${test} COMMAND $) + set_tests_properties (H5TEST-${test} PROPERTIES + DEPENDS H5TEST-clear-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) else () - add_test (NAME H5TEST-${test} COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_OUTPUT=${test}.txt" - #-D "TEST_REFERENCE=${test}.out" - -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + if ("${test}" STREQUAL "big" AND CYGWIN) + add_test (NAME H5TEST-${test} + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}" + ) + else () + add_test (NAME H5TEST-${test} COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=${test}.txt" + #-D "TEST_REFERENCE=${test}.out" + -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + endif () + set_tests_properties (H5TEST-${test} PROPERTIES + DEPENDS H5TEST-clear-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) endif () - set_tests_properties (H5TEST-${test} PROPERTIES - DEPENDS H5TEST-clear-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST - ) endif () endforeach () @@ -704,27 +599,29 @@ if (BUILD_SHARED_LIBS) ) foreach (test ${H5TEST_TESTS}) - if ("${test}" STREQUAL "big" AND CYGWIN) - add_test (NAME H5TEST-shared-${test} - COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared" - ) - else () - add_test (NAME H5TEST-shared-${test} COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_OUTPUT=${test}.txt" - #-D "TEST_REFERENCE=${test}.out" - -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + if (NOT "${test}" IN_LIST ${H5TEST_SEPARATE_TESTS}) + if ("${test}" STREQUAL "big" AND CYGWIN) + add_test (NAME H5TEST-shared-${test} + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared" + ) + else () + add_test (NAME H5TEST-shared-${test} COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=${test}.txt" + #-D "TEST_REFERENCE=${test}.out" + -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + endif () + set_tests_properties (H5TEST-shared-${test} PROPERTIES + DEPENDS H5TEST-shared-clear-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) endif () - set_tests_properties (H5TEST-shared-${test} PROPERTIES - DEPENDS H5TEST-shared-clear-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared - ) endforeach () set_tests_properties (H5TEST-shared-flush2 PROPERTIES DEPENDS H5TEST-shared-flush1) @@ -734,12 +631,6 @@ if (BUILD_SHARED_LIBS) set_tests_properties (H5TEST-shared-objcopy PROPERTIES TIMEOUT 1800) endif () -############################################################################## -############################################################################## -### A D D I T I O N A L T E S T S ### -############################################################################## -############################################################################## - #-- Adding test for cache if (NOT CYGWIN) add_test (NAME H5TEST-clear-cache-objects @@ -787,6 +678,73 @@ set_tests_properties (H5TEST-cache_image PROPERTIES WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) +if (BUILD_SHARED_LIBS) + #-- Adding test for cache + if (NOT CYGWIN AND NOT WIN32) + add_test (NAME H5TEST-shared-clear-cache-objects + COMMAND ${CMAKE_COMMAND} + -E remove + cache_test.h5 + WORKING_DIRECTORY + ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + if (HDF5_ENABLE_USING_MEMCHECKER) + add_test (NAME H5TEST-shared-cache COMMAND $) + else () + add_test (NAME H5TEST-shared-cache COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_EXPECT=0" + -D "TEST_SKIP_COMPARE=TRUE" + -D "TEST_OUTPUT=cache-shared.txt" + #-D "TEST_REFERENCE=cache-shared.out" + -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" + -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" + ) + endif () + set_tests_properties (H5TEST-shared-cache PROPERTIES + DEPENDS H5TEST-shared-clear-cache-objects + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared + ) + set_tests_properties (H5TEST-shared-cache PROPERTIES TIMEOUT 1800) + endif () +endif () + + +############################################################################## +############################################################################## +### A D D I T I O N A L T E S T S ### +############################################################################## +############################################################################## +# H5_CHECK_TESTS +#--------------- +# error_test +# err_compat +# tcheck_version +# testmeta +# atomic_writer +# atomic_reader +# links_env +# filenotclosed +# flushrefresh +############################################################################## +# autotools script tests +# error_test and err_compat are built at the same time as the other tests, but executed by testerror.sh. +# NOT CONVERTED tcheck_version is used by testcheck_version.sh. +# NOT CONVERTED accum_swmr_reader is used by accum.c. +# NOT CONVERTED atomic_writer and atomic_reader are standalone programs. +# links_env is used by testlinks_env.sh +# filenotclosed is used by test_filenotclosed.sh +# NOT CONVERTED flushrefresh is used by testflushrefresh.sh. +# NOT CONVERTED use_append_chunk, use_append_mchunks and use_disable_mdc_flushes are used by test_usecases.sh +# NOT CONVERTED swmr_* files (besides swmr.c) are used by testswmr.sh. +# NOT CONVERTED vds_swmr_* files are used by testvdsswmr.sh +# NOT CONVERTED 'make check' doesn't run them directly, so they are not included in TEST_PROG. +# NOT CONVERTED Also build testmeta, which is used for timings test. It builds quickly, +# NOT CONVERTED and this lets automake keep all its test programs in one place. +############################################################################## + #-- Adding test for filenotclosed add_test ( NAME H5TEST-clear-filenotclosed-objects @@ -899,37 +857,6 @@ add_test (NAME H5TEST-testlibinfo ) if (BUILD_SHARED_LIBS) - #-- Adding test for cache - if (NOT CYGWIN AND NOT WIN32) - add_test (NAME H5TEST-shared-clear-cache-objects - COMMAND ${CMAKE_COMMAND} - -E remove - cache_test.h5 - WORKING_DIRECTORY - ${HDF5_TEST_BINARY_DIR}/H5TEST-shared - ) - if (HDF5_ENABLE_USING_MEMCHECKER) - add_test (NAME H5TEST-shared-cache COMMAND $) - else () - add_test (NAME H5TEST-shared-cache COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_EXPECT=0" - -D "TEST_SKIP_COMPARE=TRUE" - -D "TEST_OUTPUT=cache-shared.txt" - #-D "TEST_REFERENCE=cache-shared.out" - -D "TEST_FOLDER=${HDF5_TEST_BINARY_DIR}/H5TEST-shared" - -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" - ) - endif () - set_tests_properties (H5TEST-shared-cache PROPERTIES - DEPENDS H5TEST-shared-clear-cache-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared - ) - set_tests_properties (H5TEST-shared-cache PROPERTIES TIMEOUT 1800) - endif () - #-- Adding test for err_compat if (HDF5_ENABLE_DEPRECATED_SYMBOLS) add_test (NAME H5TEST-shared-clear-err_compat-objects @@ -1068,272 +995,7 @@ set_tests_properties (H5PLUGIN-filter_plugin PROPERTIES ############################################################################## if (HDF5_TEST_VFD) - - set (H5_VFD_TESTS - testhdf5 -# cache - cache_api - cache_tagging - lheap - ohdr - stab - gheap - evict_on_close - pool -# accum - farray - earray - btree2 -# fheap - hyperslab - istore - bittests - dt_arith - dtypes - dsets - 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 -# error_test -# err_compat - #tcheck_version -# testmeta -# links_env - unregister - ) - if (NOT CYGWIN) - set (H5_VFD_TESTS ${H5_VFD_TESTS} big cache) - endif () - - # Windows only macro - macro (CHECK_VFD_TEST vfdtest vfdname resultcode) - if ("${vfdtest}" STREQUAL "flush1" OR "${vfdtest}" STREQUAL "flush2") - if ("${vfdname}" STREQUAL "multi" OR "${vfdname}" STREQUAL "split") - if (NOT BUILD_SHARED_LIBS AND NOT ${HDF_CFG_NAME} MATCHES "Debug") - add_test (NAME VFD-${vfdname}-${vfdtest} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${vfdtest}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} - ) - if (BUILD_SHARED_LIBS) - add_test (NAME VFD-${vfdname}-${test}-shared - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared - ) - endif () - else () - add_test (NAME VFD-${vfdname}-${vfdtest} - COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}" - ) - if (BUILD_SHARED_LIBS) - add_test (NAME VFD-${vfdname}-${test}-shared - COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}-shared" - ) - endif () - endif () - else () - add_test (NAME VFD-${vfdname}-${vfdtest} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${vfdtest}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} - ) - if (BUILD_SHARED_LIBS) - add_test (NAME VFD-${vfdname}-${test}-shared - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared - ) - endif () - endif () - else () - add_test (NAME VFD-${vfdname}-${vfdtest} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${vfdtest}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} - ) - if (BUILD_SHARED_LIBS AND NOT "${vfdtest}" STREQUAL "cache") - add_test (NAME VFD-${vfdname}-${vfdtest}-shared - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared - ) - endif () - endif () - endmacro () - - macro (ADD_VFD_TEST vfdname resultcode) - foreach (test ${H5_VFD_TESTS}) - if (WIN32) - CHECK_VFD_TEST (${test} ${vfdname} ${resultcode}) - else () - add_test (NAME VFD-${vfdname}-${test} - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${test}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${test} PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} - ) - if (BUILD_SHARED_LIBS) - add_test (NAME VFD-${vfdname}-${test}-shared - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-${test}-shared" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-${test}-shared PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared - ) - endif () - endif () - endforeach () - set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1) - set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT 1800) - if (NOT CYGWIN) - set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800) - endif () - if (BUILD_SHARED_LIBS) - set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared) - set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-istore-shared PROPERTIES TIMEOUT 1800) - if (NOT CYGWIN AND NOT WIN32) - set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800) - endif () - endif () - if (HDF5_TEST_FHEAP_VFD) - add_test (NAME VFD-${vfdname}-fheap - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-fheap" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-fheap PROPERTIES - TIMEOUT 1800 - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} - ) - if (BUILD_SHARED_LIBS) - add_test (NAME VFD-${vfdname}-fheap-shared - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-fheap-shared" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES - TIMEOUT 1800 - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared - ) - endif () - endif () - endmacro () - - # Run test with different Virtual File Driver - foreach (vfd ${VFD_LIST}) - ADD_VFD_TEST (${vfd} 0) - endforeach () - + include (CMakeVFDTests.cmake) endif () ############################################################################## diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake new file mode 100644 index 0000000..9897f3f --- /dev/null +++ b/test/CMakeVFDTests.cmake @@ -0,0 +1,303 @@ + +# Copyright by The HDF Group. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the COPYING file, which can be found at the root of the source code +# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. +# If you do not have access to either file, you may request a copy from +# help@hdfgroup.org. +# + +############################################################################## +############################################################################## +### T E S T I N G ### +############################################################################## +############################################################################## +# included from CMakeTEsts.cmake + +set (VFD_LIST + sec2 + stdio + core + core_paged + split + multi + family +) +if (DIRECT_VFD) + set (VFD_LIST ${VFD_LIST} direct) +endif () + +foreach (vfdtest ${VFD_LIST}) + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}") + if (BUILD_SHARED_LIBS) + file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}-shared") + endif () +endforeach () + +foreach (vfdtest ${VFD_LIST}) + foreach (h5_tfile ${HDF5_TEST_FILES}) + HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}" "HDF5_VFDTEST_LIB_files") + if (BUILD_SHARED_LIBS) + HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${h5_tfile}" "HDF5_VFDTEST_LIBSH_files") + endif () + endforeach () +endforeach () + +foreach (vfdtest ${VFD_LIST}) + foreach (ref_file ${HDF5_REFERENCE_FILES}) + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}/${ref_file}" "HDF5_VFDTEST_LIB_files") + if (BUILD_SHARED_LIBS) + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${vfdtest}-shared/${ref_file}" "HDF5_VFDTEST_LIBSH_files") + endif () + endforeach () +endforeach () + +foreach (vfdtest ${VFD_LIST}) + foreach (h5_file ${HDF5_REFERENCE_TEST_FILES}) + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}/${h5_file}" "HDF5_VFDTEST_LIB_files") + if (BUILD_SHARED_LIBS) + HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${vfdtest}-shared/${h5_file}" "HDF5_VFDTEST_LIBSH_files") + endif () + endforeach () +endforeach () + +add_custom_target(HDF5_VFDTEST_LIB_files ALL COMMENT "Copying files needed by HDF5_VFDTEST_LIB tests" DEPENDS ${HDF5_VFDTEST_LIB_files_list}) +if (BUILD_SHARED_LIBS) + add_custom_target(HDF5_VFDTEST_LIBSH_files ALL COMMENT "Copying files needed by HDF5_VFDTEST_LIBSH tests" DEPENDS ${HDF5_VFDTEST_LIBSH_files_list}) +endif () + +############################################################################## +############################################################################## +### V F D T E S T S ### +############################################################################## +############################################################################## + + set (H5_VFD_SKIP_TESTS + cache + accum + fheap + big + vfd + error_test + err_compat + tcheck_version + testmeta + links_env + ) + if (NOT CYGWIN) + list(REMOVE_ITEM ${H5_VFD_SKIP_TESTS} big cache) + endif () + + # Windows only macro + macro (CHECK_VFD_TEST vfdtest vfdname resultcode) + if ("${vfdtest}" STREQUAL "flush1" OR "${vfdtest}" STREQUAL "flush2") + if ("${vfdname}" STREQUAL "multi" OR "${vfdname}" STREQUAL "split") + if (NOT BUILD_SHARED_LIBS AND NOT ${HDF_CFG_NAME} MATCHES "Debug") + add_test (NAME VFD-${vfdname}-${vfdtest} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + if (BUILD_SHARED_LIBS) + add_test (NAME VFD-${vfdname}-${test}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif () + else () + add_test (NAME VFD-${vfdname}-${vfdtest} + COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}" + ) + if (BUILD_SHARED_LIBS) + add_test (NAME VFD-${vfdname}-${test}-shared + COMMAND ${CMAKE_COMMAND} -E echo "SKIP VFD-${vfdname}-${vfdtest}-shared" + ) + endif () + endif () + else () + add_test (NAME VFD-${vfdname}-${vfdtest} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + if (BUILD_SHARED_LIBS) + add_test (NAME VFD-${vfdname}-${test}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif () + endif () + else () + add_test (NAME VFD-${vfdname}-${vfdtest} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + if (BUILD_SHARED_LIBS AND NOT "${vfdtest}" STREQUAL "cache") + add_test (NAME VFD-${vfdname}-${vfdtest}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif () + endif () + endmacro () + + macro (DO_VFD_TEST vfdtest vfdname resultcode) + add_test (NAME VFD-${vfdname}-${vfdtest} + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + if (BUILD_SHARED_LIBS) + add_test (NAME VFD-${vfdname}-${vfdtest}-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-${vfdtest}-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif () + endmacro () + + macro (ADD_VFD_TEST vfdname resultcode) + foreach (test ${H5_TESTS}) + if (NOT "${test}" IN_LIST ${H5_VFD_SKIP_TESTS}) + if (WIN32) + CHECK_VFD_TEST (${test} ${vfdname} ${resultcode}) + else () + DO_VFD_TEST (${test} ${vfdname} ${resultcode}) + endif () + endforeach () + set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1) + set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT 1800) + if (NOT CYGWIN) + set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800) + endif () + if (BUILD_SHARED_LIBS) + set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared) + set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-istore-shared PROPERTIES TIMEOUT 1800) + if (NOT CYGWIN AND NOT WIN32) + set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800) + endif () + endif () + if (HDF5_TEST_FHEAP_VFD) + add_test (NAME VFD-${vfdname}-fheap + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-fheap" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-fheap PROPERTIES + TIMEOUT 1800 + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) + if (BUILD_SHARED_LIBS) + add_test (NAME VFD-${vfdname}-fheap-shared + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-fheap-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES + TIMEOUT 1800 + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared + ) + endif () + endif () + endif () + endmacro () + + # Run test with different Virtual File Driver + foreach (vfd ${VFD_LIST}) + ADD_VFD_TEST (${vfd} 0) + endforeach () diff --git a/testpar/CMakeLists.txt b/testpar/CMakeLists.txt index d0b74b0..3cee808 100644 --- a/testpar/CMakeLists.txt +++ b/testpar/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TEST_PAR) #----------------------------------------------------------------------------- @@ -49,6 +49,7 @@ set (H5P_TESTS t_mpi t_bigio t_cache + t_cache_image t_pflush1 t_pflush2 t_pread diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 41a9fdc..e02d3eb 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS) #----------------------------------------------------------------------------- diff --git a/tools/lib/CMakeLists.txt b/tools/lib/CMakeLists.txt index 0fc1981..addaf2e 100644 --- a/tools/lib/CMakeLists.txt +++ b/tools/lib/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_LIB) #----------------------------------------------------------------------------- diff --git a/tools/src/CMakeLists.txt b/tools/src/CMakeLists.txt index 24e682a..5a25f76 100644 --- a/tools/src/CMakeLists.txt +++ b/tools/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC) #----------------------------------------------------------------------------- diff --git a/tools/src/h5copy/CMakeLists.txt b/tools/src/h5copy/CMakeLists.txt index 1d9c11e..606516f 100644 --- a/tools/src/h5copy/CMakeLists.txt +++ b/tools/src/h5copy/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5COPY) #----------------------------------------------------------------------------- diff --git a/tools/src/h5diff/CMakeLists.txt b/tools/src/h5diff/CMakeLists.txt index a485de7..2ff5817 100644 --- a/tools/src/h5diff/CMakeLists.txt +++ b/tools/src/h5diff/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5DIFF) #----------------------------------------------------------------------------- diff --git a/tools/src/h5dump/CMakeLists.txt b/tools/src/h5dump/CMakeLists.txt index bcfa89c..491ec4b 100644 --- a/tools/src/h5dump/CMakeLists.txt +++ b/tools/src/h5dump/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5DUMP) #----------------------------------------------------------------------------- diff --git a/tools/src/h5format_convert/CMakeLists.txt b/tools/src/h5format_convert/CMakeLists.txt index 0f6d8d9..712dd87 100644 --- a/tools/src/h5format_convert/CMakeLists.txt +++ b/tools/src/h5format_convert/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5FC) #----------------------------------------------------------------------------- diff --git a/tools/src/h5import/CMakeLists.txt b/tools/src/h5import/CMakeLists.txt index 4aa8938..efb0ad2 100644 --- a/tools/src/h5import/CMakeLists.txt +++ b/tools/src/h5import/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5IMPORT) #----------------------------------------------------------------------------- diff --git a/tools/src/h5jam/CMakeLists.txt b/tools/src/h5jam/CMakeLists.txt index fbd4250..9035ed9 100644 --- a/tools/src/h5jam/CMakeLists.txt +++ b/tools/src/h5jam/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5JAM) #----------------------------------------------------------------------------- diff --git a/tools/src/h5ls/CMakeLists.txt b/tools/src/h5ls/CMakeLists.txt index 703e55e..71b3d1d 100644 --- a/tools/src/h5ls/CMakeLists.txt +++ b/tools/src/h5ls/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5LS) #----------------------------------------------------------------------------- diff --git a/tools/src/h5repack/CMakeLists.txt b/tools/src/h5repack/CMakeLists.txt index a646819..3fefd24 100644 --- a/tools/src/h5repack/CMakeLists.txt +++ b/tools/src/h5repack/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5REPACK) #----------------------------------------------------------------------------- diff --git a/tools/src/h5stat/CMakeLists.txt b/tools/src/h5stat/CMakeLists.txt index cde81ee..cc8bee2 100644 --- a/tools/src/h5stat/CMakeLists.txt +++ b/tools/src/h5stat/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_H5STAT) #----------------------------------------------------------------------------- diff --git a/tools/src/misc/CMakeLists.txt b/tools/src/misc/CMakeLists.txt index 313760f..78ba238 100644 --- a/tools/src/misc/CMakeLists.txt +++ b/tools/src/misc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_SRC_MISC) #----------------------------------------------------------------------------- diff --git a/tools/test/CMakeLists.txt b/tools/test/CMakeLists.txt index 6877bfc..54dd5a2 100644 --- a/tools/test/CMakeLists.txt +++ b/tools/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST) #----------------------------------------------------------------------------- diff --git a/tools/test/h5copy/CMakeLists.txt b/tools/test/h5copy/CMakeLists.txt index 35aee35..2f5f314 100644 --- a/tools/test/h5copy/CMakeLists.txt +++ b/tools/test/h5copy/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5COPY) #----------------------------------------------------------------------------- diff --git a/tools/test/h5diff/CMakeLists.txt b/tools/test/h5diff/CMakeLists.txt index def2e6d..cedc932 100644 --- a/tools/test/h5diff/CMakeLists.txt +++ b/tools/test/h5diff/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5DIFF) #----------------------------------------------------------------------------- diff --git a/tools/test/h5dump/CMakeLists.txt b/tools/test/h5dump/CMakeLists.txt index c4f2b95..1941764 100644 --- a/tools/test/h5dump/CMakeLists.txt +++ b/tools/test/h5dump/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5DUMP) #----------------------------------------------------------------------------- diff --git a/tools/test/h5format_convert/CMakeLists.txt b/tools/test/h5format_convert/CMakeLists.txt index 497f463..5287ae0 100644 --- a/tools/test/h5format_convert/CMakeLists.txt +++ b/tools/test/h5format_convert/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5FC) #----------------------------------------------------------------------------- diff --git a/tools/test/h5import/CMakeLists.txt b/tools/test/h5import/CMakeLists.txt index 36bfbdc..5492363 100644 --- a/tools/test/h5import/CMakeLists.txt +++ b/tools/test/h5import/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5IMPORT) #----------------------------------------------------------------------------- diff --git a/tools/test/h5jam/CMakeLists.txt b/tools/test/h5jam/CMakeLists.txt index dbac14b..17dda3c 100644 --- a/tools/test/h5jam/CMakeLists.txt +++ b/tools/test/h5jam/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5JAM) #----------------------------------------------------------------------------- diff --git a/tools/test/h5ls/CMakeLists.txt b/tools/test/h5ls/CMakeLists.txt index c21ca92..e92533f 100644 --- a/tools/test/h5ls/CMakeLists.txt +++ b/tools/test/h5ls/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5LS) #----------------------------------------------------------------------------- diff --git a/tools/test/h5repack/CMakeLists.txt b/tools/test/h5repack/CMakeLists.txt index 5996fff..a606ac6 100644 --- a/tools/test/h5repack/CMakeLists.txt +++ b/tools/test/h5repack/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5REPACK) #----------------------------------------------------------------------------- diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index 13ebd17..17081a7 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -76,6 +76,7 @@ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_shuffle.h5 ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_soffset.h5 ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_szip.h5 + ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/bounds_latest_latest.h5 # fsm ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_aggr.h5 ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fsm_aggr_nopersist.h5 @@ -464,60 +465,52 @@ endif () endmacro () - 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}" - ) + macro (ADD_H5_VERIFY_TEST testname resultcode testfile testdset testfilter) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + add_test ( + NAME H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/out-${testname}.${testfile} + testfiles/${testfile}-${testname}-v.out + testfiles/${testfile}-${testname}-v.out.err + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) endif () - else () - if (NOT HDF5_ENABLE_USING_MEMCHECKER) + add_test ( + NAME H5REPACK_VERIFY_LAYOUT-${testname} + COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects) + add_test ( + NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF + COMMAND $ ${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}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/out-${testname}.${testfile} - testfiles/${testfile}-${testname}-v.out - testfiles/${testfile}-${testname}-v.out.err + NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-d;${testdset};-pH;out-${testname}.${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${testfile}-${testname}-v.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_FILTER:STRING=${testfilter}" + -D "TEST_REFERENCE=${testfilter}" + -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake" ) - if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) + set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF) + else () + if ("${testfilter}" STREQUAL "CHUNKED") + set (nottestfilter "(CONTIGUOUS|COMPACT)") endif () - add_test ( - NAME H5REPACK_VERIFY_LAYOUT-${testname} - COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} - ) - set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects) - add_test ( - NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF - COMMAND $ ${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=$" - -D "TEST_ARGS:STRING=-d;${testdset};-pH;out-${testname}.${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_OUTPUT=${testfile}-${testname}-v.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_FILTER:STRING=${testfilter}" - -D "TEST_REFERENCE=${testfilter}" - -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake" - ) - set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF) - else () - if ("${testfilter}" STREQUAL "CHUNKED") - set (nottestfilter "(CONTIGUOUS|COMPACT)") - endif () - if ("${testfilter}" STREQUAL "CONTIGUOUS") - set (nottestfilter "(CHUNK|COMPACT)") - endif () - if ("${testfilter}" STREQUAL "COMPACT") - set (nottestfilter "(CONTIGUOUS|CHUNK)") + if ("${testfilter}" STREQUAL "CONTIGUOUS") + set (nottestfilter "(CHUNK|COMPACT)") + endif () + if ("${testfilter}" STREQUAL "COMPACT") + set (nottestfilter "(CONTIGUOUS|CHUNK)") endif () add_test ( NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP @@ -582,6 +575,62 @@ endif () endmacro () + macro (ADD_H5_VERIFY_SUPERBLOCK testname testfile lowbound highbound superblock) + if (NOT HDF5_ENABLE_USING_MEMCHECKER) + add_test ( + NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/out-${testname}.${testfile} + testfiles/${testfile}-${testname}-v.out + testfiles/${testfile}-${testname}-v.out.err + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) + endif () + add_test ( + NAME H5REPACK_VERIFY_SUPERBLOCK-${testname} + COMMAND $ -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects) + add_test ( + NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=-H;-B;out-${testname}.${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${testfile}-${testname}-v.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_FILTER:STRING=SUPERBLOCK_VERSION ${superblock}" + -D "TEST_REFERENCE=SUPERBLOCK_VERSION ${superblock}" + -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake" + ) + set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname}) + endif () + endmacro () + + macro (ADD_H5_VERIFY_INVALIDBOUNDS testname resultcode lowbound highbound) + add_test ( + NAME ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/out-${testname}.${testfile} + ) + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) + endif () + add_test ( + NAME ADD_H5_VERIFY_INVALIDBOUNDS-${testname} + COMMAND $ -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + set_tests_properties ( + ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname} PROPERTIES + DEPENDS ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects + WILL_FAIL "true" + ) + endif () + endmacro () + macro (ADD_H5_TEST_META testname testfile) # Remove any output file left over from previous test run add_test ( @@ -1371,6 +1420,18 @@ ADD_H5_VERIFY_VDS (vds_conti ${TESTTYPE} 0 ${FILEV4} vds_dset CONTIGUOUS -l vds_dset:CONTI) ############################################################################## +### V E R S I O N B O U N D S T E S T S +############################################################################## +# -j 0 -k 2, superblock will be 0 +ADD_H5_VERIFY_SUPERBLOCK SB_IS_0 h5repack_layout.h5 0 2 0 +# -j 1 -k 2, superblock will be 2 +ADD_H5_VERIFY_SUPERBLOCK SB_IS_2 h5repack_layout.h5 1 2 2 +# -j 2 -k 2, superblock will be 3 +ADD_H5_VERIFY_SUPERBLOCK SB_IS_3 h5repack_layout.h5 2 2 3 +# -j 0 -k 1, file cannot be opened +ADD_H5_VERIFY_INVALIDBOUNDS latest_latest_invalid bounds_latest_latest.h5 0 1 + +############################################################################## ### P L U G I N T E S T S ############################################################################## ADD_H5_UD_TEST (plugin_version_test 0 h5repack_layout.h5 -v -f UD=260,0,4,9,${H5_VERS_MAJOR},${H5_VERS_MINOR},${H5_VERS_RELEASE}) diff --git a/tools/test/h5stat/CMakeLists.txt b/tools/test/h5stat/CMakeLists.txt index d2a1de2..0d07753 100644 --- a/tools/test/h5stat/CMakeLists.txt +++ b/tools/test/h5stat/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_H5STAT) #----------------------------------------------------------------------------- diff --git a/tools/test/misc/CMakeLists.txt b/tools/test/misc/CMakeLists.txt index c014fad..178767a 100644 --- a/tools/test/misc/CMakeLists.txt +++ b/tools/test/misc/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_MISC) #----------------------------------------------------------------------------- diff --git a/tools/test/misc/vds/CMakeLists.txt b/tools/test/misc/vds/CMakeLists.txt index 9092079..5b34c43 100644 --- a/tools/test/misc/vds/CMakeLists.txt +++ b/tools/test/misc/vds/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_MISC_VDS) #----------------------------------------------------------------------------- diff --git a/tools/test/perform/CMakeLists.txt b/tools/test/perform/CMakeLists.txt index 581a85e..b7452e0 100644 --- a/tools/test/perform/CMakeLists.txt +++ b/tools/test/perform/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_TOOLS_TEST_PERFORM ) #----------------------------------------------------------------------------- -- cgit v0.12 From 90f01d5b160e0cbf950a9378d0a2625918a6eeb8 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 27 Feb 2018 13:33:38 -0600 Subject: Fix IN_LIST usage --- test/CMakeLists.txt | 2 +- test/CMakeTests.cmake | 4 ++-- test/CMakeVFDTests.cmake | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index cdab4f5..fd16f20 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -269,7 +269,7 @@ set (H5_TESTS_MULTIPLE ) # Only build single source tests here foreach (test ${H5_TESTS}) - if (NOT "${test}" IN_LIST ${H5_TESTS_MULTIPLE}) + if (NOT "${test}" IN_LIST H5_TESTS_MULTIPLE) ADD_H5_EXE(${test}) endif () endforeach () diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 9b1ea6b..67bb502 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -548,7 +548,7 @@ set (H5TEST_SEPARATE_TESTS cache_image ) foreach (test ${H5TEST_TESTS}) - if (NOT "${test}" IN_LIST ${H5TEST_SEPARATE_TESTS}) + if (NOT "${test}" IN_LIST H5TEST_SEPARATE_TESTS) if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5TEST-${test} COMMAND $) set_tests_properties (H5TEST-${test} PROPERTIES @@ -599,7 +599,7 @@ if (BUILD_SHARED_LIBS) ) foreach (test ${H5TEST_TESTS}) - if (NOT "${test}" IN_LIST ${H5TEST_SEPARATE_TESTS}) + if (NOT "${test}" IN_LIST H5TEST_SEPARATE_TESTS) if ("${test}" STREQUAL "big" AND CYGWIN) add_test (NAME H5TEST-shared-${test} COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared" diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake index 9897f3f..20020f8 100644 --- a/test/CMakeVFDTests.cmake +++ b/test/CMakeVFDTests.cmake @@ -237,7 +237,7 @@ endif () macro (ADD_VFD_TEST vfdname resultcode) foreach (test ${H5_TESTS}) - if (NOT "${test}" IN_LIST ${H5_VFD_SKIP_TESTS}) + if (NOT "${test}" IN_LIST H5_VFD_SKIP_TESTS) if (WIN32) CHECK_VFD_TEST (${test} ${vfdname} ${resultcode}) else () -- cgit v0.12 From 93744615f930324c04cef2543d272996e09acf56 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 27 Feb 2018 14:04:34 -0600 Subject: Fix list var --- test/CMakeLists.txt | 2 +- test/CMakeTests.cmake | 9 +- test/CMakeVFDTests.cmake | 2 +- tools/test/h5repack/CMakeTests.cmake | 161 +++++++++++------------------------ 4 files changed, 57 insertions(+), 117 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index fd16f20..fd88b5f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -269,7 +269,7 @@ set (H5_TESTS_MULTIPLE ) # Only build single source tests here foreach (test ${H5_TESTS}) - if (NOT "${test}" IN_LIST H5_TESTS_MULTIPLE) + if (NOT ${test} IN_LIST H5_TESTS_MULTIPLE) ADD_H5_EXE(${test}) endif () endforeach () diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 67bb502..221b857 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -544,11 +544,12 @@ add_test (NAME H5TEST-clear-objects ) set (H5TEST_SEPARATE_TESTS + testhdf5 cache cache_image ) -foreach (test ${H5TEST_TESTS}) - if (NOT "${test}" IN_LIST H5TEST_SEPARATE_TESTS) +foreach (test ${H5_TESTS}) + if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS) if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5TEST-${test} COMMAND $) set_tests_properties (H5TEST-${test} PROPERTIES @@ -598,8 +599,8 @@ if (BUILD_SHARED_LIBS) ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) - foreach (test ${H5TEST_TESTS}) - if (NOT "${test}" IN_LIST H5TEST_SEPARATE_TESTS) + foreach (test ${H5_TESTS}) + if (NOT ${test} IN_LIST H5TEST_SEPARATE_TESTS) if ("${test}" STREQUAL "big" AND CYGWIN) add_test (NAME H5TEST-shared-${test} COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared" diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake index 20020f8..944b163 100644 --- a/test/CMakeVFDTests.cmake +++ b/test/CMakeVFDTests.cmake @@ -237,7 +237,7 @@ endif () macro (ADD_VFD_TEST vfdname resultcode) foreach (test ${H5_TESTS}) - if (NOT "${test}" IN_LIST H5_VFD_SKIP_TESTS) + if (NOT ${test} IN_LIST H5_VFD_SKIP_TESTS) if (WIN32) CHECK_VFD_TEST (${test} ${vfdname} ${resultcode}) else () diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake index 17081a7..13ebd17 100644 --- a/tools/test/h5repack/CMakeTests.cmake +++ b/tools/test/h5repack/CMakeTests.cmake @@ -76,7 +76,6 @@ ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_shuffle.h5 ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_soffset.h5 ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_szip.h5 - ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/bounds_latest_latest.h5 # fsm ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_aggr.h5 ${HDF5_TOOLS_TEST_H5REPACK_SOURCE_DIR}/testfiles/h5repack_fsm_aggr_nopersist.h5 @@ -465,52 +464,60 @@ endif () endmacro () - macro (ADD_H5_VERIFY_TEST testname resultcode testfile testdset testfilter) - if (NOT HDF5_ENABLE_USING_MEMCHECKER) - add_test ( - NAME H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/out-${testname}.${testfile} - testfiles/${testfile}-${testname}-v.out - testfiles/${testfile}-${testname}-v.out.err - ) - if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects PROPERTIES DEPENDS ${last_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 () - add_test ( - NAME H5REPACK_VERIFY_LAYOUT-${testname} - COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} - ) - set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects) - add_test ( - NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF - COMMAND $ ${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") + else () + if (NOT HDF5_ENABLE_USING_MEMCHECKER) add_test ( - NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-d;${testdset};-pH;out-${testname}.${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_OUTPUT=${testfile}-${testname}-v.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_FILTER:STRING=${testfilter}" - -D "TEST_REFERENCE=${testfilter}" - -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake" + NAME H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/out-${testname}.${testfile} + testfiles/${testfile}-${testname}-v.out + testfiles/${testfile}-${testname}-v.out.err ) - set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF) - else () - if ("${testfilter}" STREQUAL "CHUNKED") - set (nottestfilter "(CONTIGUOUS|COMPACT)") - endif () - if ("${testfilter}" STREQUAL "CONTIGUOUS") - set (nottestfilter "(CHUNK|COMPACT)") + if (NOT "${last_test}" STREQUAL "") + set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) endif () - if ("${testfilter}" STREQUAL "COMPACT") - set (nottestfilter "(CONTIGUOUS|CHUNK)") + add_test ( + NAME H5REPACK_VERIFY_LAYOUT-${testname} + COMMAND $ ${ARGN} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} + ) + set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}-clear-objects) + add_test ( + NAME H5REPACK_VERIFY_LAYOUT-${testname}_DFF + COMMAND $ ${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=$" + -D "TEST_ARGS:STRING=-d;${testdset};-pH;out-${testname}.${testfile}" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" + -D "TEST_OUTPUT=${testfile}-${testname}-v.out" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_FILTER:STRING=${testfilter}" + -D "TEST_REFERENCE=${testfilter}" + -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake" + ) + set_tests_properties (H5REPACK_VERIFY_LAYOUT-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_LAYOUT-${testname}_DFF) + else () + if ("${testfilter}" STREQUAL "CHUNKED") + set (nottestfilter "(CONTIGUOUS|COMPACT)") + endif () + if ("${testfilter}" STREQUAL "CONTIGUOUS") + set (nottestfilter "(CHUNK|COMPACT)") + endif () + if ("${testfilter}" STREQUAL "COMPACT") + set (nottestfilter "(CONTIGUOUS|CHUNK)") endif () add_test ( NAME H5REPACK_VERIFY_LAYOUT-${testname}_DMP @@ -575,62 +582,6 @@ endif () endmacro () - macro (ADD_H5_VERIFY_SUPERBLOCK testname testfile lowbound highbound superblock) - if (NOT HDF5_ENABLE_USING_MEMCHECKER) - add_test ( - NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/out-${testname}.${testfile} - testfiles/${testfile}-${testname}-v.out - testfiles/${testfile}-${testname}-v.out.err - ) - if (NOT "${last_test}" STREQUAL "") - set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () - add_test ( - NAME H5REPACK_VERIFY_SUPERBLOCK-${testname} - COMMAND $ -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} - ) - set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname} PROPERTIES DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname}-clear-objects) - add_test ( - NAME H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=-H;-B;out-${testname}.${testfile}" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles" - -D "TEST_OUTPUT=${testfile}-${testname}-v.out" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_FILTER:STRING=SUPERBLOCK_VERSION ${superblock}" - -D "TEST_REFERENCE=SUPERBLOCK_VERSION ${superblock}" - -P "${HDF_RESOURCES_EXT_DIR}/grepTest.cmake" - ) - set_tests_properties (H5REPACK_VERIFY_SUPERBLOCK-${testname}_DMP PROPERTIES DEPENDS H5REPACK_VERIFY_SUPERBLOCK-${testname}) - endif () - endmacro () - - macro (ADD_H5_VERIFY_INVALIDBOUNDS testname resultcode lowbound highbound) - add_test ( - NAME ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects - COMMAND ${CMAKE_COMMAND} - -E remove - testfiles/out-${testname}.${testfile} - ) - if (NOT "${last_test}" STREQUAL "") - set_tests_properties (ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects PROPERTIES DEPENDS ${last_test}) - endif () - add_test ( - NAME ADD_H5_VERIFY_INVALIDBOUNDS-${testname} - COMMAND $ -j;${lowbound};-k;${highbound} ${PROJECT_BINARY_DIR}/testfiles/${testfile} ${PROJECT_BINARY_DIR}/testfiles/out-${testname}.${testfile} - ) - set_tests_properties ( - ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname} PROPERTIES - DEPENDS ADD_H5_VERIFY_INVALIDBOUNDS-h5repack-${testname}-clear-objects - WILL_FAIL "true" - ) - endif () - endmacro () - macro (ADD_H5_TEST_META testname testfile) # Remove any output file left over from previous test run add_test ( @@ -1420,18 +1371,6 @@ ADD_H5_VERIFY_VDS (vds_conti ${TESTTYPE} 0 ${FILEV4} vds_dset CONTIGUOUS -l vds_dset:CONTI) ############################################################################## -### V E R S I O N B O U N D S T E S T S -############################################################################## -# -j 0 -k 2, superblock will be 0 -ADD_H5_VERIFY_SUPERBLOCK SB_IS_0 h5repack_layout.h5 0 2 0 -# -j 1 -k 2, superblock will be 2 -ADD_H5_VERIFY_SUPERBLOCK SB_IS_2 h5repack_layout.h5 1 2 2 -# -j 2 -k 2, superblock will be 3 -ADD_H5_VERIFY_SUPERBLOCK SB_IS_3 h5repack_layout.h5 2 2 3 -# -j 0 -k 1, file cannot be opened -ADD_H5_VERIFY_INVALIDBOUNDS latest_latest_invalid bounds_latest_latest.h5 0 1 - -############################################################################## ### P L U G I N T E S T S ############################################################################## ADD_H5_UD_TEST (plugin_version_test 0 h5repack_layout.h5 -v -f UD=260,0,4,9,${H5_VERS_MAJOR},${H5_VERS_MINOR},${H5_VERS_RELEASE}) -- cgit v0.12 From 032f680919cd67202c6b5817c327139c09dacb05 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 27 Feb 2018 14:09:27 -0600 Subject: Add import --- java/test/TestH5Pfapl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/java/test/TestH5Pfapl.java b/java/test/TestH5Pfapl.java index ac54405..51fa4df 100644 --- a/java/test/TestH5Pfapl.java +++ b/java/test/TestH5Pfapl.java @@ -26,6 +26,7 @@ import hdf.hdf5lib.H5; import hdf.hdf5lib.HDF5Constants; import hdf.hdf5lib.exceptions.HDF5Exception; import hdf.hdf5lib.exceptions.HDF5LibraryException; +import hdf.hdf5lib.exceptions.HDF5PropertyListInterfaceException; import hdf.hdf5lib.structs.H5AC_cache_config_t; import org.junit.After; -- cgit v0.12 From 23ceda33b3f6b6903ce7bd4373347af5e0a33cd6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Feb 2018 09:01:38 -0600 Subject: Correct use of LIST var --- test/CMakeVFDTests.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake index 944b163..a17efbb 100644 --- a/test/CMakeVFDTests.cmake +++ b/test/CMakeVFDTests.cmake @@ -88,7 +88,7 @@ endif () links_env ) if (NOT CYGWIN) - list(REMOVE_ITEM ${H5_VFD_SKIP_TESTS} big cache) + list (REMOVE_ITEM H5_VFD_SKIP_TESTS big cache) endif () # Windows only macro -- cgit v0.12 From bf9b73e877302948a54a9a4129ffb265f39b574f Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Feb 2018 09:26:11 -0600 Subject: Remove t_cache_image test on Windows --- testpar/CMakeTests.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake index 87470f3..cd9acda 100644 --- a/testpar/CMakeTests.cmake +++ b/testpar/CMakeTests.cmake @@ -18,6 +18,10 @@ add_test (NAME TEST_PAR_testphdf5 COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) +if (WIN32) + # t_cache_imagee uses fork() and execve(), will not run on Windows + list (REMOVE_ITEM H5P_TESTS t_cache_image) +endif () foreach (testp ${H5P_TESTS}) add_test (NAME TEST_PAR_${testp} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $ ${MPIEXEC_POSTFLAGS}) endforeach () -- cgit v0.12 From 81b96fb01a706d88f973516efb1c0a78878a004b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 28 Feb 2018 11:47:17 -0600 Subject: Remove option from list in doc --- release_docs/INSTALL_CMake.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 99efb6a..f54ca4b 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -571,7 +571,6 @@ HDF5_ENABLE_DEPRECATED_SYMBOLS "Enable deprecated public API symbols" HDF5_ENABLE_DIRECT_VFD "Build the Direct I/O Virtual File Driver" OFF HDF5_ENABLE_EMBEDDED_LIBINFO "embed library info into executables" ON HDF5_ENABLE_HSIZET "Enable datasets larger than memory" ON -HDF5_ENABLE_LARGE_FILE "Enable support for large (64-bit) files on Linux." ON HDF5_ENABLE_PARALLEL "Enable parallel build (requires MPI)" OFF HDF5_ENABLE_TRACE "Enable API tracing capability" OFF HDF5_ENABLE_USING_MEMCHECKER "Indicate that a memory checker is used" OFF -- cgit v0.12 From cecb59f93f1345b2a667c996304e2430a716cfeb Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 1 Mar 2018 08:26:33 -0600 Subject: Correct if-endif block --- java/src/jni/h5dImp.c | 2 +- test/CMakeVFDTests.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/jni/h5dImp.c b/java/src/jni/h5dImp.c index 66efed0..9784055 100644 --- a/java/src/jni/h5dImp.c +++ b/java/src/jni/h5dImp.c @@ -1019,7 +1019,7 @@ Java_hdf_hdf5lib_H5_H5DreadVL } /* end else */ return (jint)status; -} /* end Java_hdf_hdf5lib_H5_H5Dread_1VLStrings */ +} /* end Java_hdf_hdf5lib_H5_H5Dread_1VL */ herr_t H5DreadVL_asstr diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake index a17efbb..cbf944e 100644 --- a/test/CMakeVFDTests.cmake +++ b/test/CMakeVFDTests.cmake @@ -243,7 +243,7 @@ endif () else () DO_VFD_TEST (${test} ${vfdname} ${resultcode}) endif () - endforeach () + endif () set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1) set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10) set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10) -- cgit v0.12 From 5a8ac1fb6c13e776bc17fa52c4cdf353c907907b Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 1 Mar 2018 08:33:24 -0600 Subject: Fix test loop --- test/CMakeVFDTests.cmake | 78 ++++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake index cbf944e..995f4e0 100644 --- a/test/CMakeVFDTests.cmake +++ b/test/CMakeVFDTests.cmake @@ -244,55 +244,55 @@ endif () DO_VFD_TEST (${test} ${vfdname} ${resultcode}) endif () endif () - set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1) - set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT 1800) - if (NOT CYGWIN) - set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800) + endforeach () + set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES DEPENDS VFD-${vfdname}-flush1) + set_tests_properties (VFD-${vfdname}-flush1 PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-istore PROPERTIES TIMEOUT 1800) + if (NOT CYGWIN) + set_tests_properties (VFD-${vfdname}-cache PROPERTIES TIMEOUT 1800) + endif () + if (BUILD_SHARED_LIBS) + set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared) + set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10) + set_tests_properties (VFD-${vfdname}-istore-shared PROPERTIES TIMEOUT 1800) + if (NOT CYGWIN AND NOT WIN32) + set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800) endif () + endif () + if (HDF5_TEST_FHEAP_VFD) + add_test (NAME VFD-${vfdname}-fheap + COMMAND "${CMAKE_COMMAND}" + -D "TEST_PROGRAM=$" + -D "TEST_ARGS:STRING=" + -D "TEST_VFD:STRING=${vfdname}" + -D "TEST_EXPECT=${resultcode}" + -D "TEST_OUTPUT=${vfdname}-fheap" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" + ) + set_tests_properties (VFD-${vfdname}-fheap PROPERTIES + TIMEOUT 1800 + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ) if (BUILD_SHARED_LIBS) - set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES DEPENDS VFD-${vfdname}-flush1-shared) - set_tests_properties (VFD-${vfdname}-flush1-shared PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-flush2-shared PROPERTIES TIMEOUT 10) - set_tests_properties (VFD-${vfdname}-istore-shared PROPERTIES TIMEOUT 1800) - if (NOT CYGWIN AND NOT WIN32) - set_tests_properties (VFD-${vfdname}-cache-shared PROPERTIES TIMEOUT 1800) - endif () - endif () - if (HDF5_TEST_FHEAP_VFD) - add_test (NAME VFD-${vfdname}-fheap + add_test (NAME VFD-${vfdname}-fheap-shared COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" + -D "TEST_PROGRAM=$" -D "TEST_ARGS:STRING=" -D "TEST_VFD:STRING=${vfdname}" -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-fheap" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}" + -D "TEST_OUTPUT=${vfdname}-fheap-shared" + -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) - set_tests_properties (VFD-${vfdname}-fheap PROPERTIES + set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES TIMEOUT 1800 - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared ) - if (BUILD_SHARED_LIBS) - add_test (NAME VFD-${vfdname}-fheap-shared - COMMAND "${CMAKE_COMMAND}" - -D "TEST_PROGRAM=$" - -D "TEST_ARGS:STRING=" - -D "TEST_VFD:STRING=${vfdname}" - -D "TEST_EXPECT=${resultcode}" - -D "TEST_OUTPUT=${vfdname}-fheap-shared" - -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}-shared" - -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" - ) - set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES - TIMEOUT 1800 - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared - ) - endif () endif () endif () endmacro () -- cgit v0.12 From c0aafa78e52fcea5bfc4252fc2c0285b9b983646 Mon Sep 17 00:00:00 2001 From: Richard Warren Date: Fri, 2 Mar 2018 11:32:13 -0500 Subject: Fixed t_pread.c to remove the use of h5jam, etc.. This fixes HDFFV-8839 and should merge into develop --- testpar/t_pread.c | 155 +++++++++++++++++------------------------------------- 1 file changed, 47 insertions(+), 108 deletions(-) diff --git a/testpar/t_pread.c b/testpar/t_pread.c index aac5bee..53701b9 100644 --- a/testpar/t_pread.c +++ b/testpar/t_pread.c @@ -25,16 +25,10 @@ * since each set of three is used by the tests either to construct * or to read and validate. */ -#define NFILENAME 9 -const char *FILENAMES[NFILENAME + 1]={"t_pread_data_file", - "reloc_t_pread_data_file", - "prefix_file", - "t_pread_group_0_file", +#define NFILENAME 3 +const char *FILENAMES[NFILENAME + 1]={"reloc_t_pread_data_file", "reloc_t_pread_group_0_file", - "prefix_file_0", - "t_pread_group_1_file", "reloc_t_pread_group_1_file", - "prefix_file_1", NULL}; #define FILENAME_BUF_SIZE 1024 @@ -55,18 +49,13 @@ static int generate_test_file(MPI_Comm comm, int mpi_rank, int group); static int test_parallel_read(MPI_Comm comm, int mpi_rank, int group); static char *test_argv0 = NULL; -extern char *dirname(char *path); /* Avoids additional includes */ - + /*------------------------------------------------------------------------- * Function: generate_test_file * * Purpose: This function is called to produce an HDF5 data file - * whose superblock is relocated to a non-zero offset by - * utilizing the 'h5jam' utility to write random text - * at the start of the file. Unlike simple concatenation - * of files, h5jam is used to place the superblock on a - * power-of-2 boundary. + * whose superblock is relocated to a power-of-2 boundary. * * Since data will be read back and validated, we generate * data in a predictable manner rather than randomly. @@ -98,13 +87,11 @@ extern char *dirname(char *path); /* Avoids additional includes */ static int generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) { - FILE *header = NULL; + int header = -1; const char *fcn_name = "generate_test_file()"; const char *failure_mssg = NULL; char *group_filename = NULL; char data_filename[FILENAME_BUF_SIZE]; - char reloc_data_filename[FILENAME_BUF_SIZE]; - char prolog_filename[FILENAME_BUF_SIZE]; int file_index = 0; int group_size; int group_rank; @@ -117,6 +104,7 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) hid_t file_id = -1; hid_t memspace = -1; hid_t filespace = -1; + hid_t fctmpl = -1; hid_t fapl_id = -1; hid_t dxpl_id = -1; hid_t dset_id = -1; @@ -154,10 +142,10 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) file_index = 0; } else if ( group_id == 0 ) { /* Test 2 group 0 */ - file_index = 3; + file_index = 1; } else { /* Test 2 group 1 */ - file_index = 6; + file_index = 2; } /* The 'group_filename' is just a temp variable and @@ -175,32 +163,6 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) } } - if ( pass ) { - - group_filename = FILENAMES[file_index+1]; - HDassert( group_filename ); - - /* Assign the 'reloc_data_filename' */ - if ( h5_fixname(group_filename, H5P_DEFAULT, reloc_data_filename, - sizeof(reloc_data_filename)) == NULL ) { - - pass = FALSE; - failure_mssg = "h5_fixname(1) failed.\n"; - } - } - - if ( pass ) { - group_filename = FILENAMES[file_index+2]; - HDassert( group_filename ); - - /* Assign the 'prolog_filename' */ - if ( h5_fixname(group_filename, H5P_DEFAULT, prolog_filename, - sizeof(prolog_filename)) == NULL ) { - pass = FALSE; - failure_mssg = "h5_fixname(2) failed.\n"; - } - } - /* setup data to write */ if ( pass ) { if ( (data_slice = (float *)HDmalloc(COUNT * sizeof(float))) == NULL ) { @@ -218,6 +180,17 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) } } + /* Initialize a file creation template */ + if (pass) { + if ((fctmpl = H5Pcreate(H5P_FILE_CREATE)) < 0) { + pass = FALSE; + failure_mssg = "H5Pcreate(H5P_FILE_CREATE) failed.\n"; + } + else if (H5Pset_userblock(fctmpl, 512) != SUCCEED) { + pass = FALSE; + failure_mssg = "H5Pset_userblock(,size) failed.\n"; + } + } /* setup FAPL */ if ( pass ) { if ( (fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0 ) { @@ -236,7 +209,7 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) /* create the data file */ if ( pass ) { if ( (file_id = H5Fcreate(data_filename, H5F_ACC_TRUNC, - H5P_DEFAULT, fapl_id)) < 0 ) { + fctmpl, fapl_id)) < 0 ) { pass = FALSE; failure_mssg = "H5Fcreate() failed.\n"; } @@ -342,6 +315,13 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) } } + if (pass || (fctmpl != -1)) { + if (H5Pclose(fctmpl) < 0) { + pass = false; + failure_mssg = "H5Pclose(fctmpl) failed.\n"; + } + } + /* Add a userblock to the head of the datafile. * We will use this to for a functional test of the * file open optimization. This is superblock @@ -354,11 +334,8 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) * group_rank(0) processes. Each parallel group * will create a unique file with different text * headers and different data. - * - * We also delete files that are no longer needed. */ - if ( group_rank == 0 ) { - + if (group_rank == 0) { const char *text_to_write; size_t bytes_to_write; @@ -367,69 +344,33 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) else text_to_write = hitchhiker_quote; - bytes_to_write = strlen(text_to_write); - - if ( pass ) { - if ( (header = HDfopen(prolog_filename, "w+")) == NULL ) { - pass = FALSE; - failure_mssg = "HDfopen(prolog_filename, \"w+\") failed.\n"; - } - } - - if ( pass ) { + bytes_to_write = HDstrlen(text_to_write); - if ( HDfwrite(text_to_write, 1, bytes_to_write, header) != - bytes_to_write ) { + if (pass) { + if ((header = HDopen(data_filename, O_WRONLY)) < 0) { pass = FALSE; - failure_mssg = "Unable to write header file.\n"; + failure_mssg = "HDopen(data_filename, O_WRONLY) failed.\n"; } } - if ( pass || (header != NULL) ) { - if ( HDfclose(header) != 0 ) { + if (pass) { + HDlseek(header, 0, SEEK_SET); + if (HDwrite(header, text_to_write, bytes_to_write) < 0) { pass = FALSE; - failure_mssg = "HDfclose() failed.\n"; - } + failure_mssg = "Unable to write user text into file.\n"; + } } - if ( pass ) { - char cmd[256]; - char exe_path[256]; - char *relative_path = "../tools/src/h5jam"; - char *exe_dirname = relative_path; - - /* We're checking for the existance of the h5jam utility - * With Cmake testing, all binaries are in the same directory - * e.g. the same location where this executable is found. - * We've copied the argv[0] argument and check to see - * if h5jam is co-located here. Otherwise, the autotools - * put things into directories, hence the relative path. - */ - if (test_argv0 != NULL) { - HDstrncpy(exe_path, test_argv0, sizeof(exe_path)); - if ( (exe_dirname = (char *)dirname(exe_path)) != NULL) { - HDsprintf(cmd, "%s/h5jam", exe_dirname); - if ( HDaccess(cmd, F_OK) != 0) - exe_dirname = relative_path; - } - } - HDsprintf(cmd, "%s/h5jam -i %s -u %s -o %s", - exe_dirname, - data_filename, - prolog_filename, reloc_data_filename); - - if ( system(cmd) != 0 ) { + if (pass || (header > 0)) { + if (HDclose(header) < 0) { pass = FALSE; - failure_mssg = "invocation of h5jam failed.\n"; + failure_mssg = "HDclose() failed.\n"; } } - - HDremove(prolog_filename); - HDremove(data_filename); } /* collect results from other processes. - * Only overwrite the failure message if no preveious error + * Only overwrite the failure message if no previous error * has been detected */ local_failure = ( pass ? 0 : 1 ); @@ -467,7 +408,7 @@ generate_test_file( MPI_Comm comm, int mpi_rank, int group_id ) } /* generate_test_file() */ - + /*------------------------------------------------------------------------- * Function: test_parallel_read * @@ -564,11 +505,11 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int group_id) if ( pass ) { if ( comm == MPI_COMM_WORLD ) /* test 1 */ - group_filename = FILENAMES[1]; + group_filename = FILENAMES[0]; else if ( group_id == 0 ) /* test 2 group 0 */ - group_filename = FILENAMES[4]; + group_filename = FILENAMES[1]; else /* test 2 group 1 */ - group_filename = FILENAMES[7]; + group_filename = FILENAMES[2]; HDassert(group_filename); if ( h5_fixname(group_filename, H5P_DEFAULT, reloc_data_filename, @@ -742,7 +683,7 @@ test_parallel_read(MPI_Comm comm, int mpi_rank, int group_id) } /* test_parallel_read() */ - + /*------------------------------------------------------------------------- * Function: main * @@ -781,7 +722,7 @@ main( int argc, char **argv) int mpi_rank; int mpi_size; int split_size; - MPI_Comm group_comm = MPI_COMM_WORLD; + MPI_Comm group_comm = MPI_COMM_NULL; /* I don't believe that argv[0] can ever be NULL. * It should thus be safe to dup and save as a check @@ -905,7 +846,6 @@ finish: HDfprintf(stderr, "MPI_Comm_free failed!\n"); } - /* make sure all processes are finished before final report, cleanup * and exit. */ @@ -916,7 +856,6 @@ finish: HDfprintf(stdout, "===================================\n"); if ( nerrs > 0 ) { - HDfprintf(stdout, "***%s detected %d failures***\n", header, nerrs); } else { -- cgit v0.12 From 9364df1c6d6d4661b6c32278268ccbe1640a082c Mon Sep 17 00:00:00 2001 From: Jerome Soumagne Date: Fri, 2 Mar 2018 13:50:23 -0600 Subject: Fix CMake build type if none was specified to be cached Restrict CMAKE_BUILD_TYPE to default ones --- config/cmake_ext_mod/HDFMacros.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index 4097ca9..bdc52b9 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -27,8 +27,12 @@ macro (SET_HDF_BUILD_TYPE) set(HDF_BUILD_TYPE "Release") endif() endif() - if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Release") + if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to 'RelWithDebInfo' as none was specified.") + set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the type of build." FORCE) + # Set the possible values of build type for cmake-gui + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" + "MinSizeRel" "RelWithDebInfo") endif() endmacro () -- cgit v0.12