summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2018-12-31 06:24:42 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2018-12-31 06:24:42 (GMT)
commita3faa926536712804fd079b65bf233458f2abac7 (patch)
tree82cf6081a1c9057fb2e7f1a17ffccc8356421f88 /config
parent64eb1489de409b08026faa112fd1baad98ef1bcc (diff)
parent905c3ca3d7736b151ff0889290c0c9e377988f26 (diff)
downloadhdf5-a3faa926536712804fd079b65bf233458f2abac7.zip
hdf5-a3faa926536712804fd079b65bf233458f2abac7.tar.gz
hdf5-a3faa926536712804fd079b65bf233458f2abac7.tar.bz2
Merge branch 'develop' into openmpi_tweaks
Diffstat (limited to 'config')
-rw-r--r--config/cmake/ConfigureChecks.cmake9
-rw-r--r--config/cmake/H5pubconf.h.in3
-rw-r--r--config/cmake/libhdf5.settings.cmake.in1
-rw-r--r--config/cmake/volTest.cmake76
4 files changed, 76 insertions, 13 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 6d1e3ce..459346e 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -28,15 +28,6 @@ if (HDF5_STRICT_FORMAT_CHECKS)
endif ()
MARK_AS_ADVANCED (HDF5_STRICT_FORMAT_CHECKS)
-#-----------------------------------------------------------------------------
-# Option for --enable-metadata-trace-file
-#-----------------------------------------------------------------------------
-option (HDF5_METADATA_TRACE_FILE "Enable metadata trace file collection" OFF)
-if (HDF5_METADATA_TRACE_FILE)
- set (${HDF_PREFIX}_METADATA_TRACE_FILE 1)
-endif ()
-MARK_AS_ADVANCED (HDF5_METADATA_TRACE_FILE)
-
# ----------------------------------------------------------------------
# Decide whether the data accuracy has higher priority during data
# conversions. If not, some hard conversions will still be prefered even
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 2ddb740..c42d93a 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -466,9 +466,6 @@
/* Define to enable internal memory allocation sanity checking. */
/* #cmakedefine H5_MEMORY_ALLOC_SANITY_CHECK @H5_MEMORY_ALLOC_SANITY_CHECK@ ** Define in CMakeLists.txt */
-/* Define if the metadata trace file code is to be compiled in */
-#cmakedefine H5_METADATA_TRACE_FILE @H5_METADATA_TRACE_FILE@
-
/* Define if we can violate pointer alignment restrictions */
#cmakedefine H5_NO_ALIGNMENT_RESTRICTIONS @H5_NO_ALIGNMENT_RESTRICTIONS@
diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in
index 6a489e7..9a534df 100644
--- a/config/cmake/libhdf5.settings.cmake.in
+++ b/config/cmake/libhdf5.settings.cmake.in
@@ -79,7 +79,6 @@ Parallel Filtered Dataset Writes: @PARALLEL_FILTERED_WRITES@
API Tracing: @HDF5_ENABLE_TRACE@
Using memory checker: @HDF5_ENABLE_USING_MEMCHECKER@
Memory allocation sanity checks: @HDF5_MEMORY_ALLOC_SANITY_CHECK@
- Metadata trace file: @METADATATRACEFILE@
Function Stack Tracing: @HDF5_ENABLE_CODESTACK@
Strict File Format Checks: @HDF5_STRICT_FORMAT_CHECKS@
Optimization Instrumentation: @HDF5_Enable_Instrument@
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}")