summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-12-20 21:11:17 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-12-20 21:11:27 (GMT)
commit7e8923957fdf18ce95e4947145950e382cf0585a (patch)
treed9b44ca3d4c872e4f4b7175ce0a2558fa13d0177
parent416f68c6709c9dd47620e89ac6c3a911e77e8b17 (diff)
downloadhdf5-7e8923957fdf18ce95e4947145950e382cf0585a.zip
hdf5-7e8923957fdf18ce95e4947145950e382cf0585a.tar.gz
hdf5-7e8923957fdf18ce95e4947145950e382cf0585a.tar.bz2
HDFFV-10656 Add CHECK_VOL support to CMake
-rw-r--r--CMakeLists.txt7
-rw-r--r--MANIFEST8
-rw-r--r--c++/test/CMakeTests.cmake63
-rw-r--r--c++/test/CMakeVFDTests.cmake65
-rw-r--r--c++/test/CMakeVOLTests.cmake19
-rw-r--r--config/cmake/volTest.cmake76
-rw-r--r--examples/CMakeTests.cmake18
-rw-r--r--release_docs/INSTALL_CMake.txt1
-rw-r--r--test/CMakeTests.cmake10
-rw-r--r--test/CMakeVOLTests.cmake322
-rw-r--r--testpar/CMakeTests.cmake20
-rw-r--r--testpar/CMakeVFDTests.cmake57
-rw-r--r--testpar/CMakeVOLTests.cmake19
-rw-r--r--tools/test/h5repack/CMakeTests.cmake58
-rw-r--r--tools/test/h5repack/CMakeVFDTests.cmake65
-rw-r--r--tools/test/h5repack/CMakeVOLTests.cmake55
16 files changed, 767 insertions, 96 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e2fb000..8433163 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -756,6 +756,13 @@ if (BUILD_TESTING)
mark_as_advanced (HDF5_TEST_FHEAP_VFD)
endif ()
+ option (HDF5_TEST_VOL "Execute tests with different VOLs" OFF)
+ mark_as_advanced (HDF5_TEST_VOL)
+ if (HDF5_TEST_VOL)
+ option (HDF5_TEST_FHEAP_VOL "Execute tests with different VOLs" ON)
+ mark_as_advanced (HDF5_TEST_FHEAP_VOL)
+ endif ()
+
option (HDF_TEST_EXPRESS "Control testing framework (0-3)" "0")
mark_as_advanced (HDF_TEST_EXPRESS)
diff --git a/MANIFEST b/MANIFEST
index c3c7ffc..01e0e20 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3207,6 +3207,7 @@
./config/cmake/UseJavaSymlinks.cmake
./config/cmake/userblockTest.cmake
./config/cmake/vfdTest.cmake
+./config/cmake/volTest.cmake
./config/cmake/wait_H5Tinit.cmake
./config/cmake_ext_mod/ConfigureChecks.cmake
@@ -3247,6 +3248,8 @@
./c++/src/CMakeLists.txt
./c++/test/CMakeLists.txt
./c++/test/CMakeTests.cmake
+./c++/test/CMakeVFDTests.cmake
+./c++/test/CMakeVOLTests.cmake
./examples/CMakeLists.txt
./examples/CMakeTests.cmake
./examples/run-all-ex.sh
@@ -3286,10 +3289,13 @@
./test/CMakeLists.txt
./test/CMakeTests.cmake
./test/CMakeVFDTests.cmake
+./test/CMakeVOLTests.cmake
./test/flushrefreshTest.cmake
./test/ShellTests.cmake
./testpar/CMakeLists.txt
./testpar/CMakeTests.cmake
+./testpar/CMakeVFDTests.cmake
+./testpar/CMakeVOLTests.cmake
./tools/CMakeLists.txt
./tools/lib/CMakeLists.txt
./tools/src/CMakeLists.txt
@@ -3322,6 +3328,8 @@
./tools/src/h5repack/CMakeLists.txt
./tools/test/h5repack/CMakeLists.txt
./tools/test/h5repack/CMakeTests.cmake
+./tools/test/h5repack/CMakeVFDTests.cmake
+./tools/test/h5repack/CMakeVOLTests.cmake
./tools/src/h5stat/CMakeLists.txt
./tools/test/h5stat/CMakeLists.txt
./tools/test/h5stat/CMakeTests.cmake
diff --git a/c++/test/CMakeTests.cmake b/c++/test/CMakeTests.cmake
index 6de801e..a1c07f7 100644
--- a/c++/test/CMakeTests.cmake
+++ b/c++/test/CMakeTests.cmake
@@ -47,55 +47,22 @@ else ()
endif ()
set_tests_properties (CPP_testhdf5 PROPERTIES DEPENDS CPP_testhdf5-clear-objects)
-if (HDF5_TEST_VFD)
-
- set (VFD_LIST
- sec2
- stdio
- core
- split
- multi
- family
- )
-
- if (DIRECT_VFD)
- set (VFD_LIST ${VFD_LIST} direct)
- endif ()
+##############################################################################
+##############################################################################
+### V F D T E S T S ###
+##############################################################################
+##############################################################################
- macro (ADD_VFD_TEST vfdname resultcode)
- if (NOT HDF5_ENABLE_USING_MEMCHECKER)
- file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}")
- add_test (
- NAME CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects
- COMMAND ${CMAKE_COMMAND}
- -E remove
- tattr_basic.h5
- tattr_compound.h5
- tattr_dtype.h5
- tattr_multi.h5
- tattr_scalar.h5
- tfattrs.h5
- titerate.h5
- )
- add_test (
- NAME CPP_VFD-${vfdname}-cpp_testhdf5
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=cpp_testhdf5"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects)
- set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES TIMEOUT 30)
- endif ()
- endmacro ()
+if (HDF5_TEST_VFD)
+ include (CMakeVFDTests.cmake)
+endif ()
- # Run test with different Virtual File Driver
- foreach (vfd ${VFD_LIST})
- ADD_VFD_TEST (${vfd} 0)
- endforeach ()
+##############################################################################
+##############################################################################
+### V O L T E S T S ###
+##############################################################################
+##############################################################################
+if (HDF5_TEST_VOL)
+ include (CMakeVOLTests.cmake)
endif ()
diff --git a/c++/test/CMakeVFDTests.cmake b/c++/test/CMakeVFDTests.cmake
new file mode 100644
index 0000000..996a20f
--- /dev/null
+++ b/c++/test/CMakeVFDTests.cmake
@@ -0,0 +1,65 @@
+#
+# 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 ###
+##############################################################################
+##############################################################################
+ set (VFD_LIST
+ sec2
+ stdio
+ core
+ split
+ multi
+ family
+ )
+
+ if (DIRECT_VFD)
+ set (VFD_LIST ${VFD_LIST} direct)
+ endif ()
+
+ macro (ADD_VFD_TEST vfdname resultcode)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}")
+ add_test (
+ NAME CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ tattr_basic.h5
+ tattr_compound.h5
+ tattr_dtype.h5
+ tattr_multi.h5
+ tattr_scalar.h5
+ tfattrs.h5
+ titerate.h5
+ )
+ add_test (
+ NAME CPP_VFD-${vfdname}-cpp_testhdf5
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:cpp_testhdf5>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=cpp_testhdf5"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES DEPENDS CPP_VFD-${vfdname}-cpp_testhdf5-clear-objects)
+ set_tests_properties (CPP_VFD-${vfdname}-cpp_testhdf5 PROPERTIES TIMEOUT 30)
+ endif ()
+ endmacro ()
+
+ # Run test with different Virtual File Driver
+ foreach (vfd ${VFD_LIST})
+ ADD_VFD_TEST (${vfd} 0)
+ endforeach ()
diff --git a/c++/test/CMakeVOLTests.cmake b/c++/test/CMakeVOLTests.cmake
new file mode 100644
index 0000000..be3ecc2
--- /dev/null
+++ b/c++/test/CMakeVOLTests.cmake
@@ -0,0 +1,19 @@
+#
+# 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 ###
+##############################################################################
+##############################################################################
+ set (VOL_LIST
+ )
diff --git a/config/cmake/volTest.cmake b/config/cmake/volTest.cmake
new file mode 100644
index 0000000..27da8a5
--- /dev/null
+++ b/config/cmake/volTest.cmake
@@ -0,0 +1,76 @@
+#
+# 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.
+#
+# volTest.cmake executes a command and captures the output in a file. Command uses specified VOL.
+# Exit status of command can also be compared.
+
+# arguments checking
+if (NOT TEST_PROGRAM)
+ message (FATAL_ERROR "Require TEST_PROGRAM to be defined")
+endif ()
+if (NOT TEST_FOLDER)
+ message ( FATAL_ERROR "Require TEST_FOLDER to be defined")
+endif ()
+if (NOT TEST_VOL)
+ message (FATAL_ERROR "Require TEST_VOL to be defined")
+endif ()
+
+if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT})
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT})
+endif ()
+
+if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+ file (REMOVE ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+endif ()
+
+# if there is not an error reference file add the error output to the stdout file
+#if (NOT TEST_ERRREF)
+# set (ERROR_APPEND 1)
+#endif ()
+
+message (STATUS "USING ${TEST_VOL} ON COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}")
+
+set (ENV{HDF5_VOL_CONNECTOR} "${TEST_VOL}")
+
+# run the test program, capture the stdout/stderr and the result var
+execute_process (
+ COMMAND ${TEST_PROGRAM} ${TEST_ARGS}
+ WORKING_DIRECTORY ${TEST_FOLDER}
+ RESULT_VARIABLE TEST_RESULT
+ OUTPUT_FILE ${TEST_OUTPUT}.out
+ ERROR_FILE ${TEST_OUTPUT}.err
+ OUTPUT_VARIABLE TEST_OUT
+ ERROR_VARIABLE TEST_ERROR
+)
+
+message (STATUS "COMMAND Result: ${TEST_RESULT}")
+
+# if the .err file exists and ERRROR_APPEND is enabled
+if (ERROR_APPEND AND EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.err)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.err TEST_STREAM)
+ file (APPEND ${TEST_FOLDER}/${TEST_OUTPUT}.out "${TEST_STREAM}")
+endif ()
+
+# if the return value is !=${TEST_EXPECT} bail out
+if (NOT "${TEST_RESULT}" STREQUAL "${TEST_EXPECT}")
+ if (NOT TEST_NOERRDISPLAY)
+ if (EXISTS ${TEST_FOLDER}/${TEST_OUTPUT}.out)
+ file (READ ${TEST_FOLDER}/${TEST_OUTPUT}.out TEST_STREAM)
+ message (STATUS "Output USING ${TEST_VOL}:\n${TEST_STREAM}")
+ endif ()
+ endif ()
+ message (FATAL_ERROR "Failed: Test program ${TEST_PROGRAM} exited != ${TEST_EXPECT}.\n${TEST_ERROR}")
+endif ()
+
+message (STATUS "COMMAND Error: ${TEST_ERROR}")
+
+# everything went fine...
+message ("Passed: The ${TEST_PROGRAM} program used vol ${TEST_VOL}")
diff --git a/examples/CMakeTests.cmake b/examples/CMakeTests.cmake
index dd4766a..6b4504b 100644
--- a/examples/CMakeTests.cmake
+++ b/examples/CMakeTests.cmake
@@ -181,9 +181,9 @@
### Windows pops up a modal permission dialog on this test
if (H5_HAVE_PARALLEL AND NOT WIN32)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME EXAMPLES-ph5example COMMAND $<TARGET_FILE:ph5example>)
+ add_test (NAME EXAMPLES_PAR-ph5example COMMAND $<TARGET_FILE:ph5example>)
else ()
- add_test (NAME EXAMPLES-ph5example COMMAND "${CMAKE_COMMAND}"
+ add_test (NAME EXAMPLES_PAR-ph5example COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:ph5example>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -195,14 +195,14 @@
)
endif ()
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (EXAMPLES-ph5example PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (EXAMPLES_PAR-ph5example PROPERTIES DEPENDS ${last_test})
endif ()
- set (last_test "EXAMPLES-ph5example")
+ set (last_test "EXAMPLES_PAR-ph5example")
if (BUILD_SHARED_LIBS)
if (HDF5_ENABLE_USING_MEMCHECKER)
- add_test (NAME EXAMPLES-shared-ph5example COMMAND $<TARGET_FILE:ph5example-shared>)
+ add_test (NAME EXAMPLES_PAR-shared-ph5example COMMAND $<TARGET_FILE:ph5example-shared>)
else ()
- add_test (NAME EXAMPLES-shared-ph5example COMMAND "${CMAKE_COMMAND}"
+ add_test (NAME EXAMPLES_PAR-shared-ph5example COMMAND "${CMAKE_COMMAND}"
-D "TEST_PROGRAM=$<TARGET_FILE:ph5example-shared>"
-D "TEST_ARGS:STRING="
-D "TEST_EXPECT=0"
@@ -213,10 +213,10 @@
-P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
)
endif ()
- set_tests_properties (EXAMPLES-shared-ph5example PROPERTIES WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared)
+ set_tests_properties (EXAMPLES_PAR-shared-ph5example PROPERTIES WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/H5EX-shared)
if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (EXAMPLES-shared-ph5example PROPERTIES DEPENDS ${last_test})
+ set_tests_properties (EXAMPLES_PAR-shared-ph5example PROPERTIES DEPENDS ${last_test})
endif ()
- set (last_test "EXAMPLES-shared-ph5example")
+ set (last_test "EXAMPLES_PAR-shared-ph5example")
endif ()
endif ()
diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt
index edd876a..1c00fde 100644
--- a/release_docs/INSTALL_CMake.txt
+++ b/release_docs/INSTALL_CMake.txt
@@ -651,6 +651,7 @@ HDF5_PACKAGE_EXTLIBS "CPACK - include external libraries"
HDF5_STRICT_FORMAT_CHECKS "Whether to perform strict file format checks" OFF
HDF_TEST_EXPRESS "Control testing framework (0-3)" "0"
HDF5_TEST_VFD "Execute tests with different VFDs" OFF
+HDF5_TEST_VOL "Execute tests with different VOLs" OFF
HDF5_USE_16_API_DEFAULT "Use the HDF5 1.6.x API by default" OFF
HDF5_USE_18_API_DEFAULT "Use the HDF5 1.8.x API by default" OFF
HDF5_USE_110_API_DEFAULT "Use the HDF5 1.10.x API by default" OFF
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake
index 1c26def..26faba6 100644
--- a/test/CMakeTests.cmake
+++ b/test/CMakeTests.cmake
@@ -1127,6 +1127,16 @@ endif ()
##############################################################################
##############################################################################
+### V O L T E S T S ###
+##############################################################################
+##############################################################################
+
+if (HDF5_TEST_VOL)
+ include (CMakeVOLTests.cmake)
+endif ()
+
+##############################################################################
+##############################################################################
### T H E G E N E R A T O R S ###
##############################################################################
##############################################################################
diff --git a/test/CMakeVOLTests.cmake b/test/CMakeVOLTests.cmake
new file mode 100644
index 0000000..39fa2a6
--- /dev/null
+++ b/test/CMakeVOLTests.cmake
@@ -0,0 +1,322 @@
+
+# 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 (VOL_LIST
+ vol_native
+ vol_pass_through1
+ vol_pass_through2
+)
+
+set (vol_native native)
+set (vol_pass_through1 "pass_through under_vol=0\;under_info={}")
+set (vol_pass_through2 "pass_through under_vol=505\;under_info={under_vol=0\;under_info={}}")
+
+foreach (voltest ${VOL_LIST})
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${voltest}")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${voltest}/testfiles")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${voltest}/testfiles/plist_files")
+ if (BUILD_SHARED_LIBS)
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${voltest}-shared")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${voltest}-shared/testfiles")
+ file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${voltest}-shared/testfiles/plist_files")
+ endif ()
+endforeach ()
+
+foreach (voltest ${VOL_LIST})
+ foreach (h5_tfile ${HDF5_TEST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${voltest}/${h5_tfile}" "HDF5_VOLTEST_LIB_files")
+ if (BUILD_SHARED_LIBS)
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}" "${PROJECT_BINARY_DIR}/${voltest}-shared/${h5_tfile}" "HDF5_VOLTEST_LIBSH_files")
+ endif ()
+ endforeach ()
+endforeach ()
+
+foreach (voltest ${VOL_LIST})
+ foreach (ref_file ${HDF5_REFERENCE_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${voltest}/${ref_file}" "HDF5_VOLTEST_LIB_files")
+ if (BUILD_SHARED_LIBS)
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/${ref_file}" "${PROJECT_BINARY_DIR}/${voltest}-shared/${ref_file}" "HDF5_VOLTEST_LIBSH_files")
+ endif ()
+ endforeach ()
+endforeach ()
+
+foreach (voltest ${VOL_LIST})
+ foreach (h5_file ${HDF5_REFERENCE_TEST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${voltest}/${h5_file}" "HDF5_VOLTEST_LIB_files")
+ if (BUILD_SHARED_LIBS)
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/${h5_file}" "${HDF5_TEST_BINARY_DIR}/${voltest}-shared/${h5_file}" "HDF5_VOLTEST_LIBSH_files")
+ endif ()
+ endforeach ()
+endforeach ()
+
+foreach (voltest ${VOL_LIST})
+ foreach (plistfile ${HDF5_REFERENCE_PLIST_FILES})
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${voltest}/testfiles/plist_files/${plistfile}" "HDF5_VOLTEST_LIB_files")
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${voltest}/testfiles/plist_files/def_${plistfile}" "HDF5_VOLTEST_LIB_files")
+ if (BUILD_SHARED_LIBS)
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/${plistfile}" "${PROJECT_BINARY_DIR}/${voltest}-shared/testfiles/plist_files/${plistfile}" "HDF5_VOLTEST_LIBSH_files")
+ HDFTEST_COPY_FILE("${HDF5_TEST_SOURCE_DIR}/testfiles/plist_files/def_${plistfile}" "${PROJECT_BINARY_DIR}/${voltest}-shared/testfiles/plist_files/def_${plistfile}" "HDF5_VOLTEST_LIBSH_files")
+ endif ()
+ endforeach ()
+endforeach ()
+
+add_custom_target(HDF5_VOLTEST_LIB_files ALL COMMENT "Copying files needed by HDF5_VOLTEST_LIB tests" DEPENDS ${HDF5_VOLTEST_LIB_files_list})
+if (BUILD_SHARED_LIBS)
+ add_custom_target(HDF5_VOLTEST_LIBSH_files ALL COMMENT "Copying files needed by HDF5_VOLTEST_LIBSH tests" DEPENDS ${HDF5_VOLTEST_LIBSH_files_list})
+endif ()
+
+##############################################################################
+##############################################################################
+### V O L T E S T S ###
+##############################################################################
+##############################################################################
+
+ set (H5_VOL_SKIP_TESTS
+ cache
+ accum
+ fheap
+ big
+ vol
+ error_test
+ err_compat
+ tcheck_version
+ testmeta
+ links_env
+ )
+ if (NOT CYGWIN)
+ list (REMOVE_ITEM H5_VOL_SKIP_TESTS big cache)
+ endif ()
+
+ # Windows only macro
+ macro (CHECK_VOL_TEST voltest volname volinfo resultcode)
+ if ("${voltest}" STREQUAL "flush1" OR "${voltest}" STREQUAL "flush2")
+ if ("${volname}" STREQUAL "multi" OR "${volname}" STREQUAL "split")
+ if (NOT BUILD_SHARED_LIBS AND NOT ${HDF_CFG_NAME} MATCHES "Debug")
+ add_test (NAME VOL-${volname}-${voltest}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${voltest}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VOL:STRING=${volinfo}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${volname}-${voltest}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}"
+ -P "${HDF_RESOURCES_DIR}/volTest.cmake"
+ )
+ set_tests_properties (VOL-${volname}-${voltest} PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
+ )
+ if (BUILD_SHARED_LIBS)
+ add_test (NAME VOL-${volname}-${test}-shared
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${voltest}-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VOL:STRING=${volinfo}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${volname}-${voltest}-shared"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}-shared"
+ -P "${HDF_RESOURCES_DIR}/volTest.cmake"
+ )
+ set_tests_properties (VOL-${volname}-${voltest}-shared PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}-shared
+ )
+ endif ()
+ else ()
+ add_test (NAME VOL-${volname}-${voltest}
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP VOL-${volname}-${voltest}"
+ )
+ if (BUILD_SHARED_LIBS)
+ add_test (NAME VOL-${volname}-${test}-shared
+ COMMAND ${CMAKE_COMMAND} -E echo "SKIP VOL-${volname}-${voltest}-shared"
+ )
+ endif ()
+ endif ()
+ else ()
+ add_test (NAME VOL-${volname}-${voltest}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${voltest}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VOL:STRING=${volinfo}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${volname}-${voltest}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}"
+ -P "${HDF_RESOURCES_DIR}/volTest.cmake"
+ )
+ set_tests_properties (VOL-${volname}-${voltest} PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
+ )
+ if (BUILD_SHARED_LIBS)
+ add_test (NAME VOL-${volname}-${test}-shared
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${voltest}-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VOL:STRING=${volinfo}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${volname}-${voltest}-shared"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}-shared"
+ -P "${HDF_RESOURCES_DIR}/volTest.cmake"
+ )
+ set_tests_properties (VOL-${volname}-${voltest}-shared PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}-shared
+ )
+ endif ()
+ endif ()
+ else ()
+ add_test (NAME VOL-${volname}-${voltest}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${voltest}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VOL:STRING=${volinfo}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${volname}-${voltest}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}"
+ -P "${HDF_RESOURCES_DIR}/volTest.cmake"
+ )
+ set_tests_properties (VOL-${volname}-${voltest} PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
+ )
+ if (BUILD_SHARED_LIBS AND NOT "${voltest}" STREQUAL "cache")
+ add_test (NAME VOL-${volname}-${voltest}-shared
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${voltest}-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VOL:STRING=${volinfo}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${volname}-${voltest}-shared"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}-shared"
+ -P "${HDF_RESOURCES_DIR}/volTest.cmake"
+ )
+ set_tests_properties (VOL-${volname}-${voltest}-shared PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}-shared
+ )
+ endif ()
+ endif ()
+ endmacro ()
+
+ macro (DO_VOL_TEST voltest volname volinfo resultcode)
+ #message(STATUS "${voltest}-${volname} with ${volinfo}")
+ add_test (NAME VOL-${volname}-${voltest}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${voltest}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VOL:STRING=${volinfo}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${volname}-${voltest}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}"
+ -P "${HDF_RESOURCES_DIR}/volTest.cmake"
+ )
+ set_tests_properties (VOL-${volname}-${voltest} PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
+ )
+ if (BUILD_SHARED_LIBS)
+ add_test (NAME VOL-${volname}-${voltest}-shared
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${voltest}-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VOL:STRING=${volinfo}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${volname}-${voltest}-shared"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}-shared"
+ -P "${HDF_RESOURCES_DIR}/volTest.cmake"
+ )
+ set_tests_properties (VOL-${volname}-${voltest}-shared PROPERTIES
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}-shared"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}-shared
+ )
+ endif ()
+ endmacro ()
+
+ macro (ADD_VOL_TEST volname volinfo resultcode)
+ #message(STATUS "volname=${volname} volinfo=${volinfo}")
+ foreach (test ${H5_TESTS})
+ if (NOT ${test} IN_LIST H5_VOL_SKIP_TESTS)
+ if (WIN32)
+ CHECK_VOL_TEST (${test} ${volname} "${volinfo}" ${resultcode})
+ else ()
+ DO_VOL_TEST (${test} ${volname} "${volinfo}" ${resultcode})
+ endif ()
+ endif ()
+ endforeach ()
+ set_tests_properties (VOL-${volname}-flush2 PROPERTIES DEPENDS VOL-${volname}-flush1)
+ set_tests_properties (VOL-${volname}-flush1 PROPERTIES TIMEOUT 10)
+ set_tests_properties (VOL-${volname}-flush2 PROPERTIES TIMEOUT 10)
+ set_tests_properties (VOL-${volname}-istore PROPERTIES TIMEOUT 1800)
+ if (NOT CYGWIN)
+ set_tests_properties (VOL-${volname}-cache PROPERTIES TIMEOUT 1800)
+ endif ()
+ if (BUILD_SHARED_LIBS)
+ set_tests_properties (VOL-${volname}-flush2-shared PROPERTIES DEPENDS VOL-${volname}-flush1-shared)
+ set_tests_properties (VOL-${volname}-flush1-shared PROPERTIES TIMEOUT 10)
+ set_tests_properties (VOL-${volname}-flush2-shared PROPERTIES TIMEOUT 10)
+ set_tests_properties (VOL-${volname}-istore-shared PROPERTIES TIMEOUT 1800)
+ if (NOT CYGWIN AND NOT WIN32)
+ set_tests_properties (VOL-${volname}-cache-shared PROPERTIES TIMEOUT 1800)
+ endif ()
+ endif ()
+ if (HDF5_TEST_FHEAP_VOL)
+ add_test (NAME VOL-${volname}-fheap
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:fheap>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VOL:STRING=${volinfo}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${volname}-fheap"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}"
+ -P "${HDF_RESOURCES_DIR}/volTest.cmake"
+ )
+ set_tests_properties (VOL-${volname}-fheap PROPERTIES
+ TIMEOUT 1800
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname};HDF5TestExpress=${HDF_TEST_EXPRESS}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}
+ )
+ if (BUILD_SHARED_LIBS)
+ add_test (NAME VOL-${volname}-fheap-shared
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:fheap-shared>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VOL:STRING=${volinfo}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${volname}-fheap-shared"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${volname}-shared"
+ -P "${HDF_RESOURCES_DIR}/volTest.cmake"
+ )
+ set_tests_properties (VOL-${volname}-fheap-shared PROPERTIES
+ TIMEOUT 1800
+ ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${volname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}"
+ WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${volname}-shared
+ )
+ endif ()
+ endif ()
+ endmacro ()
+
+ # Run test with different Virtual File Driver
+ foreach (volname ${VOL_LIST})
+ #message(STATUS "volname=${volname}")
+ foreach (volinfo IN LISTS ${volname})
+ #message(STATUS "${volname} volinfo=${volinfo}")
+ ADD_VOL_TEST (${volname} "${volinfo}" 0)
+ endforeach ()
+ endforeach ()
+
diff --git a/testpar/CMakeTests.cmake b/testpar/CMakeTests.cmake
index 87470f3..ffe4cb5 100644
--- a/testpar/CMakeTests.cmake
+++ b/testpar/CMakeTests.cmake
@@ -27,6 +27,26 @@ endforeach ()
set_property (TEST TEST_PAR_t_pflush1 PROPERTY PASS_REGULAR_EXPRESSION "PASSED")
set_tests_properties (TEST_PAR_t_pflush2 PROPERTIES DEPENDS TEST_PAR_t_pflush1)
+##############################################################################
+##############################################################################
+### V F D T E S T S ###
+##############################################################################
+##############################################################################
+
+if (HDF5_TEST_VFD)
+ include (CMakeVFDTests.cmake)
+endif ()
+
+##############################################################################
+##############################################################################
+### V O L T E S T S ###
+##############################################################################
+##############################################################################
+
+if (HDF5_TEST_VOL)
+ include (CMakeVOLTests.cmake)
+endif ()
+
if (HDF5_TEST_VFD)
set (VFD_LIST
diff --git a/testpar/CMakeVFDTests.cmake b/testpar/CMakeVFDTests.cmake
new file mode 100644
index 0000000..b6b065f
--- /dev/null
+++ b/testpar/CMakeVFDTests.cmake
@@ -0,0 +1,57 @@
+#
+# 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 ###
+##############################################################################
+##############################################################################
+ set (VFD_LIST
+ sec2
+ stdio
+ core
+ split
+ multi
+ family
+ )
+
+ set (H5P_VFD_TESTS
+ t_pflush1
+ t_pflush2
+ )
+
+ if (DIRECT_VFD)
+ set (VFD_LIST ${VFD_LIST} direct)
+ endif ()
+
+ macro (ADD_VFD_TEST vfdname resultcode)
+ if (NOT HDF5_ENABLE_USING_MEMCHECKER)
+ foreach (test ${H5P_VFD_TESTS})
+ add_test (
+ NAME TEST_PAR_VFD-${vfdname}-${test}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:${test}>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=${test}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ endforeach ()
+ endif ()
+ endmacro ()
+
+ # Run test with different Virtual File Driver
+ foreach (vfd ${VFD_LIST})
+ ADD_VFD_TEST (${vfd} 0)
+ endforeach ()
diff --git a/testpar/CMakeVOLTests.cmake b/testpar/CMakeVOLTests.cmake
new file mode 100644
index 0000000..be3ecc2
--- /dev/null
+++ b/testpar/CMakeVOLTests.cmake
@@ -0,0 +1,19 @@
+#
+# 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 ###
+##############################################################################
+##############################################################################
+ set (VOL_LIST
+ )
diff --git a/tools/test/h5repack/CMakeTests.cmake b/tools/test/h5repack/CMakeTests.cmake
index ad468f0..d48f188 100644
--- a/tools/test/h5repack/CMakeTests.cmake
+++ b/tools/test/h5repack/CMakeTests.cmake
@@ -16,39 +16,6 @@
##############################################################################
##############################################################################
- if (HDF5_TEST_VFD)
- set (VFD_LIST
- sec2
- stdio
- core
- split
- multi
- family
- )
-
- if (DIRECT_VFD)
- set (VFD_LIST ${VFD_LIST} direct)
- endif ()
-
- macro (ADD_VFD_TEST vfdname resultcode)
- add_test (
- NAME H5REPACK-VFD-${vfdname}-h5repacktest
- COMMAND "${CMAKE_COMMAND}"
- -D "TEST_PROGRAM=$<TARGET_FILE:h5repacktest>"
- -D "TEST_ARGS:STRING="
- -D "TEST_VFD:STRING=${vfdname}"
- -D "TEST_EXPECT=${resultcode}"
- -D "TEST_OUTPUT=h5repacktest"
- -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
- -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
- )
- if (NOT "${last_test}" STREQUAL "")
- set_tests_properties (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test})
- endif ()
- set (last_test "H5REPACK-VFD-${vfdname}-h5repacktest")
- endmacro ()
- endif ()
-
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
@@ -1459,9 +1426,22 @@ if (BUILD_SHARED_LIBS)
ADD_H5_UD_TEST (plugin_zero 0 h5repack_layout.h5 -v -f UD=250,0,0)
endif ()
- if (HDF5_TEST_VFD)
- # Run test with different Virtual File Driver
- foreach (vfd ${VFD_LIST})
- ADD_VFD_TEST (${vfd} 0)
- endforeach ()
- endif ()
+##############################################################################
+##############################################################################
+### V F D T E S T S ###
+##############################################################################
+##############################################################################
+
+if (HDF5_TEST_VFD)
+ include (CMakeVFDTests.cmake)
+endif ()
+
+##############################################################################
+##############################################################################
+### V O L T E S T S ###
+##############################################################################
+##############################################################################
+
+if (HDF5_TEST_VOL)
+ include (CMakeVOLTests.cmake)
+endif ()
diff --git a/tools/test/h5repack/CMakeVFDTests.cmake b/tools/test/h5repack/CMakeVFDTests.cmake
new file mode 100644
index 0000000..2042f31
--- /dev/null
+++ b/tools/test/h5repack/CMakeVFDTests.cmake
@@ -0,0 +1,65 @@
+#
+# 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 ###
+##############################################################################
+##############################################################################
+
+ set (VFD_LIST
+ sec2
+ stdio
+ core
+ split
+ multi
+ family
+ )
+
+ if (DIRECT_VFD)
+ set (VFD_LIST ${VFD_LIST} direct)
+ endif ()
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ macro (ADD_VFD_TEST vfdname resultcode)
+ add_test (
+ NAME H5REPACK-VFD-${vfdname}-h5repacktest
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5repacktest>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${vfdname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=h5repacktest"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK-VFD-${vfdname}-h5repacktest PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "H5REPACK-VFD-${vfdname}-h5repacktest")
+ endmacro ()
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+
+ # Run test with different Virtual File Driver
+ foreach (vfd ${VFD_LIST})
+ ADD_VFD_TEST (${vfd} 0)
+ endforeach ()
diff --git a/tools/test/h5repack/CMakeVOLTests.cmake b/tools/test/h5repack/CMakeVOLTests.cmake
new file mode 100644
index 0000000..da19d59
--- /dev/null
+++ b/tools/test/h5repack/CMakeVOLTests.cmake
@@ -0,0 +1,55 @@
+#
+# 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 ###
+##############################################################################
+##############################################################################
+
+ set (VOL_LIST
+ )
+
+##############################################################################
+##############################################################################
+### T H E T E S T S M A C R O S ###
+##############################################################################
+##############################################################################
+
+ macro (ADD_VOL_TEST volname resultcode)
+ add_test (
+ NAME H5REPACK-VOL-${volname}-h5repacktest
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5repacktest>"
+ -D "TEST_ARGS:STRING="
+ -D "TEST_VFD:STRING=${volname}"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_OUTPUT=h5repacktest"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}"
+ -P "${HDF_RESOURCES_DIR}/volTest.cmake"
+ )
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5REPACK-VOL-${volname}-h5repacktest PROPERTIES DEPENDS ${last_test})
+ endif ()
+ set (last_test "H5REPACK-VOL-${volname}-h5repacktest")
+ endmacro ()
+
+##############################################################################
+##############################################################################
+### T H E T E S T S ###
+##############################################################################
+##############################################################################
+
+ # Run test with different VOL
+# foreach (vol ${VOL_LIST})
+# ADD_VOL_TEST (${vol} 0)
+# endforeach ()