From 68d810d0d28668b3845cd9186b8947b47f7454e0 Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Fri, 29 Oct 2021 07:48:52 -0500 Subject: 1.10 Merge Consolidate VFD create list macro #1132 (#1140) * Merge Consolidate VFD create list macro #1132 * Split dir create into separate macro * fix VFD settings --- CMakeLists.txt | 3 +++ c++/test/CMakeVFDTests.cmake | 3 +-- config/cmake/ConfigureChecks.cmake | 2 +- config/cmake/HDF5Macros.cmake | 4 ++++ test/CMakeLists.txt | 6 +++--- test/CMakeVFDTests.cmake | 4 ++-- testpar/CMakeVFDTests.cmake | 3 +-- tools/test/h5dump/CMakeVFDTests.cmake | 3 +-- tools/test/h5repack/CMakeVFDTests.cmake | 3 +-- 9 files changed, 17 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8036522..b3daf95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -919,6 +919,9 @@ if (BUILD_TESTING) if (HDF5_TEST_VFD) option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON) mark_as_advanced (HDF5_TEST_FHEAP_VFD) + + # Initialize the list of VFDs to be used for testing and create a test folder for each VFD + H5_SET_VFD_LIST() endif () option (HDF_TEST_EXPRESS "Control testing framework (0-3)" "0") diff --git a/c++/test/CMakeVFDTests.cmake b/c++/test/CMakeVFDTests.cmake index d525bb5..ced9b0c 100644 --- a/c++/test/CMakeVFDTests.cmake +++ b/c++/test/CMakeVFDTests.cmake @@ -15,8 +15,7 @@ ### T E S T I N G ### ############################################################################## ############################################################################## - -H5_SET_VFD_LIST() +H5_CREATE_VFD_DIR() ############################################################################## ############################################################################## diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index b652d16..6403989 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -197,7 +197,7 @@ endif () # Header-check flags set in config/cmake_ext_mod/ConfigureChecks.cmake # ---------------------------------------------------------------------- option (HDF5_ENABLE_MIRROR_VFD "Build the Mirror Virtual File Driver" OFF) -if (H5FD_ENABLE_MIRROR_VFD) +if (HDF5_ENABLE_MIRROR_VFD) if ( ${HDF_PREFIX}_HAVE_NETINET_IN_H AND ${HDF_PREFIX}_HAVE_NETDB_H AND ${HDF_PREFIX}_HAVE_ARPA_INET_H AND diff --git a/config/cmake/HDF5Macros.cmake b/config/cmake/HDF5Macros.cmake index b3cf015..8b8b334 100644 --- a/config/cmake/HDF5Macros.cmake +++ b/config/cmake/HDF5Macros.cmake @@ -60,6 +60,7 @@ macro (H5_SET_LIB_OPTIONS libtarget libname libtype libpackage) endif () endmacro () +# Initialize the list of VFDs to be used for testing and create a test folder for each VFD macro (H5_SET_VFD_LIST) set (VFD_LIST sec2 @@ -92,7 +93,10 @@ macro (H5_SET_VFD_LIST) if (H5_HAVE_WINDOWS) set (VFD_LIST ${VFD_LIST} windows) endif () +endmacro () +# Initialize the list of VFDs to be used for testing and create a test folder for each VFD +macro (H5_CREATE_VFD_DIR) foreach (vfdtest ${VFD_LIST}) file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}") endforeach () diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c4c83ed..e6345de 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -464,9 +464,9 @@ if (HDF5_ENABLE_FORMATTERS) clang_format (HDF5_TEST_thread_id_FORMAT thread_id) endif () -if (HDF5_BUILD_UTILS) -#-- Adding test for mirror_vfd -add_executable (mirror_vfd ${mirror_vfd_SOURCES}) +if (HDF5_BUILD_UTILS) # requires mirror server + #-- Adding test for mirror_vfd + add_executable (mirror_vfd ${mirror_vfd_SOURCES}) target_include_directories (mirror_vfd PRIVATE "${HDF5_SRC_DIR};${HDF5_SRC_BINARY_DIR};$<$:${MPI_C_INCLUDE_DIRS}>") if (NOT BUILD_SHARED_LIBS) TARGET_C_PROPERTIES (mirror_vfd STATIC) diff --git a/test/CMakeVFDTests.cmake b/test/CMakeVFDTests.cmake index 4a83c11..22bad5d 100644 --- a/test/CMakeVFDTests.cmake +++ b/test/CMakeVFDTests.cmake @@ -16,9 +16,9 @@ ############################################################################## ############################################################################## # included from CMakeTests.cmake +H5_CREATE_VFD_DIR() -H5_SET_VFD_LIST() - +# create more test folders for each VFD foreach (vfdtest ${VFD_LIST}) file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles") file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdtest}/testfiles/plist_files") diff --git a/testpar/CMakeVFDTests.cmake b/testpar/CMakeVFDTests.cmake index 4cda27b..d6a4025 100644 --- a/testpar/CMakeVFDTests.cmake +++ b/testpar/CMakeVFDTests.cmake @@ -15,14 +15,13 @@ ### T E S T I N G ### ############################################################################## ############################################################################## +H5_CREATE_VFD_DIR() set (H5P_VFD_TESTS t_pflush1 t_pflush2 ) -H5_SET_VFD_LIST() - macro (ADD_VFD_TEST vfdname resultcode) if (NOT HDF5_ENABLE_USING_MEMCHECKER) foreach (h5_test ${H5P_VFD_TESTS}) diff --git a/tools/test/h5dump/CMakeVFDTests.cmake b/tools/test/h5dump/CMakeVFDTests.cmake index 6a70b85..7ab8c1f 100644 --- a/tools/test/h5dump/CMakeVFDTests.cmake +++ b/tools/test/h5dump/CMakeVFDTests.cmake @@ -15,8 +15,7 @@ ### T E S T I N G ### ############################################################################## ############################################################################## - -H5_SET_VFD_LIST() +H5_CREATE_VFD_DIR() # -------------------------------------------------------------------- # Copy all the HDF5 files from the source directory into the test directory diff --git a/tools/test/h5repack/CMakeVFDTests.cmake b/tools/test/h5repack/CMakeVFDTests.cmake index 78d752c..f8ac10b 100644 --- a/tools/test/h5repack/CMakeVFDTests.cmake +++ b/tools/test/h5repack/CMakeVFDTests.cmake @@ -15,8 +15,7 @@ ### T E S T I N G ### ############################################################################## ############################################################################## - -H5_SET_VFD_LIST() +H5_CREATE_VFD_DIR() ############################################################################## ############################################################################## -- cgit v0.12