summaryrefslogtreecommitdiffstats
path: root/tools/test/h5dump
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/h5dump')
-rw-r--r--tools/test/h5dump/CMakeLists.txt3
-rw-r--r--tools/test/h5dump/CMakeTestsVDS.cmake70
-rw-r--r--tools/test/h5dump/errfiles/tall-1.err5
-rw-r--r--tools/test/h5dump/errfiles/tall-2A.err5
-rw-r--r--tools/test/h5dump/errfiles/tall-2A0.err5
-rw-r--r--tools/test/h5dump/errfiles/tall-2B.err5
-rw-r--r--tools/test/h5dump/errfiles/textlink.err10
-rw-r--r--tools/test/h5dump/errfiles/torderlinks1.err5
-rw-r--r--tools/test/h5dump/errfiles/torderlinks2.err5
9 files changed, 103 insertions, 10 deletions
diff --git a/tools/test/h5dump/CMakeLists.txt b/tools/test/h5dump/CMakeLists.txt
index 89c7534..6a12f5e 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.10)
PROJECT (HDF5_TOOLS_TEST_H5DUMP)
#-----------------------------------------------------------------------------
@@ -39,7 +39,6 @@ INCLUDE_DIRECTORIES (${HDF5_TOOLS_DIR}/lib)
# --------------------------------------------------------------------
if (HDF5_BUILD_GENERATORS)
add_executable (h5dumpgentest ${HDF5_TOOLS_TEST_H5DUMP_SOURCE_DIR}/h5dumpgentest.c)
- TARGET_NAMING (h5dumpgentest STATIC)
TARGET_C_PROPERTIES (h5dumpgentest STATIC " " " ")
target_link_libraries (h5dumpgentest ${HDF5_LIB_TARGET} ${HDF5_TOOLS_LIB_TARGET})
set_target_properties (h5dumpgentest PROPERTIES FOLDER generator/tools)
diff --git a/tools/test/h5dump/CMakeTestsVDS.cmake b/tools/test/h5dump/CMakeTestsVDS.cmake
index 3addecf..922e79e 100644
--- a/tools/test/h5dump/CMakeTestsVDS.cmake
+++ b/tools/test/h5dump/CMakeTestsVDS.cmake
@@ -72,6 +72,14 @@
f-3.h5
vds-eiger.h5
)
+ set (HDF5_REFERENCE_PREFIX_VDS
+ 1_vds.h5
+ 2_vds.h5
+ 4_vds.h5
+ 5_vds.h5
+ vds-percival-unlim-maxmin.h5
+ vds-eiger.h5
+ )
set (HDF5_ERROR_REFERENCE_VDS
)
@@ -80,12 +88,21 @@
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/vds/${vds_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}" "h5dump_vds_files")
endforeach ()
+ foreach (vds_h5_file ${HDF5_REFERENCE_PREFIX_VDS})
+ get_filename_component(fname "${vds_h5_file}" NAME)
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/vds/${vds_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/vds/prefix/${fname}" "h5dump_vds_files")
+ endforeach ()
foreach (ddl_vds ${HDF5_REFERENCE_VDS})
get_filename_component(fname "${ddl_vds}" NAME)
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/vds/${ddl_vds}" "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}" "h5dump_vds_files")
endforeach ()
+ foreach (ddl_vds ${HDF5_REFERENCE_VDS})
+ get_filename_component(fname "${ddl_vds}" NAME)
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/vds/${ddl_vds}" "${PROJECT_BINARY_DIR}/testfiles/vds/prefix/${fname}" "h5dump_vds_files")
+ endforeach ()
+
foreach (ddl_vds ${HDF5_ERROR_REFERENCE_VDS})
get_filename_component(fname "${ddl_vds}" NAME)
HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/errfiles/${ddl_vds}" "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}" "h5dump_vds_files")
@@ -134,6 +151,47 @@
endif ()
endmacro ()
+ macro (ADD_H5_VDS_PREFIX_TEST resultfile resultcode)
+ # If using memchecker add tests without using scripts
+ if (HDF5_ENABLE_USING_MEMCHECKER)
+ add_test (NAME H5DUMP_PREFIX-${resultfile} COMMAND $<TARGET_FILE:h5dump> ${ARGN})
+ set_tests_properties (H5DUMP_PREFIX-${resultfile} PROPERTIES
+ ENVIRONMENT "HDF5_VDS_PREFIX=${PROJECT_BINARY_DIR}/testfiles/vds/"
+ WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds/prefix"
+ )
+ if (NOT "${resultcode}" STREQUAL "0")
+ set_tests_properties (H5DUMP_PREFIX-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif ()
+ if (NOT "${last_vds_test}" STREQUAL "")
+ set_tests_properties (H5DUMP_PREFIX-${resultfile} PROPERTIES DEPENDS ${last_VDS_test})
+ endif ()
+ else ()
+ # Remove any output file left over from previous test run
+ add_test (
+ NAME H5DUMP_PREFIX-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${resultfile}.out
+ ${resultfile}.out.err
+ )
+ set_tests_properties (H5DUMP_PREFIX-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds/prefix")
+ add_test (
+ NAME H5DUMP_PREFIX-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5dump>"
+ -D "TEST_ARGS:STRING=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles/vds/prefix"
+ -D "TEST_OUTPUT=${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=${resultfile}.ddl"
+ -D "TEST_ENV_VAR=HDF5_VDS_PREFIX"
+ -D "TEST_ENV_VALUE=${PROJECT_BINARY_DIR}/testfiles/vds/"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5DUMP_PREFIX-${resultfile} PROPERTIES DEPENDS H5DUMP_PREFIX-${resultfile}-clear-objects)
+ endif ()
+ endmacro ()
+
macro (ADD_H5_VDS_LAYOUT resultfile resultcode)
# If using memchecker add tests without using scripts
if (HDF5_ENABLE_USING_MEMCHECKER)
@@ -261,3 +319,15 @@
ADD_H5_VDS_LAYOUT (vds_layout-eiger 0 --enable-error-stack vds-eiger.h5)
ADD_H5_VDS_LAYOUT (vds_layout-maxmin 0 --enable-error-stack vds-percival-unlim-maxmin.h5)
endif ()
+
+ # Data read with prefix
+ if (USE_FILTER_DEFLATE)
+ ADD_H5_VDS_PREFIX_TEST (tvds-1 0 --enable-error-stack 1_vds.h5)
+ ADD_H5_VDS_PREFIX_TEST (tvds-2 0 --enable-error-stack 2_vds.h5)
+ ADD_H5_VDS_PREFIX_TEST (tvds-4 0 --enable-error-stack 4_vds.h5)
+ ADD_H5_VDS_PREFIX_TEST (tvds-5 0 --enable-error-stack 5_vds.h5)
+ ADD_H5_VDS_PREFIX_TEST (vds-first 0 --vds-view-first-missing --enable-error-stack vds-percival-unlim-maxmin.h5)
+ ADD_H5_VDS_PREFIX_TEST (vds-gap1 0 -d /VDS-Eiger --vds-gap-size=1 --enable-error-stack vds-eiger.h5)
+ ADD_H5_VDS_PREFIX_TEST (vds-gap2 0 --vds-gap-size=2 --enable-error-stack vds-eiger.h5)
+ endif ()
+
diff --git a/tools/test/h5dump/errfiles/tall-1.err b/tools/test/h5dump/errfiles/tall-1.err
index 2f9ef71..9733453 100644
--- a/tools/test/h5dump/errfiles/tall-1.err
+++ b/tools/test/h5dump/errfiles/tall-1.err
@@ -23,6 +23,9 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find atom information (already closed?)
- #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile', temp_file_name = 'somefile'
+ #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile'
major: Links
minor: Unable to open file
+ #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile'
+ major: File accessibilty
+ minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/tall-2A.err b/tools/test/h5dump/errfiles/tall-2A.err
index 2f9ef71..9733453 100644
--- a/tools/test/h5dump/errfiles/tall-2A.err
+++ b/tools/test/h5dump/errfiles/tall-2A.err
@@ -23,6 +23,9 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find atom information (already closed?)
- #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile', temp_file_name = 'somefile'
+ #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile'
major: Links
minor: Unable to open file
+ #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile'
+ major: File accessibilty
+ minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/tall-2A0.err b/tools/test/h5dump/errfiles/tall-2A0.err
index 2f9ef71..9733453 100644
--- a/tools/test/h5dump/errfiles/tall-2A0.err
+++ b/tools/test/h5dump/errfiles/tall-2A0.err
@@ -23,6 +23,9 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find atom information (already closed?)
- #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile', temp_file_name = 'somefile'
+ #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile'
major: Links
minor: Unable to open file
+ #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile'
+ major: File accessibilty
+ minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/tall-2B.err b/tools/test/h5dump/errfiles/tall-2B.err
index 2f9ef71..9733453 100644
--- a/tools/test/h5dump/errfiles/tall-2B.err
+++ b/tools/test/h5dump/errfiles/tall-2B.err
@@ -23,6 +23,9 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find atom information (already closed?)
- #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile', temp_file_name = 'somefile'
+ #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'somefile'
major: Links
minor: Unable to open file
+ #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'somefile', temp_file_name = 'somefile'
+ major: File accessibilty
+ minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/textlink.err b/tools/test/h5dump/errfiles/textlink.err
index 665517d..99e8530 100644
--- a/tools/test/h5dump/errfiles/textlink.err
+++ b/tools/test/h5dump/errfiles/textlink.err
@@ -23,9 +23,12 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find atom information (already closed?)
- #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'filename', temp_file_name = 'filename'
+ #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'filename'
major: Links
minor: Unable to open file
+ #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'filename', temp_file_name = 'filename'
+ major: File accessibilty
+ minor: Unable to open file
HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#000: (file name) line (number) in H5Oopen(): unable to open object
major: Object header
@@ -51,6 +54,9 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find atom information (already closed?)
- #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'anotherfile', temp_file_name = 'anotherfile'
+ #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'anotherfile'
major: Links
minor: Unable to open file
+ #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'anotherfile', temp_file_name = 'anotherfile'
+ major: File accessibilty
+ minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/torderlinks1.err b/tools/test/h5dump/errfiles/torderlinks1.err
index fba8822..22b4318 100644
--- a/tools/test/h5dump/errfiles/torderlinks1.err
+++ b/tools/test/h5dump/errfiles/torderlinks1.err
@@ -23,6 +23,9 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find atom information (already closed?)
- #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'fname', temp_file_name = 'fname'
+ #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'fname'
major: Links
minor: Unable to open file
+ #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'fname', temp_file_name = 'fname'
+ major: File accessibilty
+ minor: Unable to open file
diff --git a/tools/test/h5dump/errfiles/torderlinks2.err b/tools/test/h5dump/errfiles/torderlinks2.err
index fba8822..22b4318 100644
--- a/tools/test/h5dump/errfiles/torderlinks2.err
+++ b/tools/test/h5dump/errfiles/torderlinks2.err
@@ -23,6 +23,9 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#007: (file name) line (number) in H5G__traverse_ud(): traversal callback returned invalid ID
major: Symbol table
minor: Unable to find atom information (already closed?)
- #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'fname', temp_file_name = 'fname'
+ #008: (file name) line (number) in H5L__extern_traverse(): unable to open external file, external link file name = 'fname'
major: Links
minor: Unable to open file
+ #009: (file name) line (number) in H5F_prefix_open_file(): unable to open file, file name = 'fname', temp_file_name = 'fname'
+ major: File accessibilty
+ minor: Unable to open file