summaryrefslogtreecommitdiffstats
path: root/tools/test/h5repack
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 /tools/test/h5repack
parent416f68c6709c9dd47620e89ac6c3a911e77e8b17 (diff)
downloadhdf5-7e8923957fdf18ce95e4947145950e382cf0585a.zip
hdf5-7e8923957fdf18ce95e4947145950e382cf0585a.tar.gz
hdf5-7e8923957fdf18ce95e4947145950e382cf0585a.tar.bz2
HDFFV-10656 Add CHECK_VOL support to CMake
Diffstat (limited to 'tools/test/h5repack')
-rw-r--r--tools/test/h5repack/CMakeTests.cmake58
-rw-r--r--tools/test/h5repack/CMakeVFDTests.cmake65
-rw-r--r--tools/test/h5repack/CMakeVOLTests.cmake55
3 files changed, 139 insertions, 39 deletions
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 ()