summaryrefslogtreecommitdiffstats
path: root/tools/test/h5ls
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-12-20 21:11:17 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-12-20 21:11:17 (GMT)
commitb1223dd653e65e076af92b2dfe236f3704da81c8 (patch)
tree2be2721723cc0d8d87e9d32f729a0a35b0a5cfde /tools/test/h5ls
parentb25f123f5f5e25c1447a6a02861cb7c7265c12f2 (diff)
parente94ed99c5bf7c4ae5df56f75606ef1b486e16bb2 (diff)
downloadhdf5-b1223dd653e65e076af92b2dfe236f3704da81c8.zip
hdf5-b1223dd653e65e076af92b2dfe236f3704da81c8.tar.gz
hdf5-b1223dd653e65e076af92b2dfe236f3704da81c8.tar.bz2
Merge pull request #826 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'e94ed99c5bf7c4ae5df56f75606ef1b486e16bb2': Add HD prefix HDFFV-9724 Remove VDS file cache functionality Removed incorrect MPI text Par example needs to link with mpi libs Because of MPI requirements in library ALWAYS add include path Cleanup comments and if() in TRY blocks Skip test if 1.6 API HDFFV-9724 Add ENV VAR to vds test HDFFV-9724 Copy efc_open search from Lextern_traverse Add prefix dir to the clear command HDFFV-9724 Add H5LS prefix test with ${ORIGIN} Add h5dump VDS prefix tests HDFFV-9724 combine efc and vds into one function Correct var name Fix VDS file cache var names Remove return from void functions Added java wrappers and tests HDFFV-9724 Initial changes and test Changed reference from dl to CMake variable H5detect and H5make_libsettings need include folder
Diffstat (limited to 'tools/test/h5ls')
-rw-r--r--tools/test/h5ls/CMakeTestsVDS.cmake55
-rw-r--r--tools/test/h5ls/vds_prefix/tvds-1.ls14
-rw-r--r--tools/test/h5ls/vds_prefix/tvds-2.ls13
-rw-r--r--tools/test/h5ls/vds_prefix/tvds-3_1.ls14
-rw-r--r--tools/test/h5ls/vds_prefix/tvds-3_2.ls13
-rw-r--r--tools/test/h5ls/vds_prefix/tvds-4.ls9
-rw-r--r--tools/test/h5ls/vds_prefix/tvds-5.ls11
7 files changed, 129 insertions, 0 deletions
diff --git a/tools/test/h5ls/CMakeTestsVDS.cmake b/tools/test/h5ls/CMakeTestsVDS.cmake
index 5df61bb..f25bd98 100644
--- a/tools/test/h5ls/CMakeTestsVDS.cmake
+++ b/tools/test/h5ls/CMakeTestsVDS.cmake
@@ -61,6 +61,17 @@
get_filename_component(fname "${listfiles}" NAME)
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/vds/${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}" "h5ls_vds_files")
endforeach ()
+
+ foreach (listfiles ${LIST_HDF5_TEST_FILES})
+ get_filename_component(fname "${listfiles}" NAME)
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/vds/${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/vds/prefix/${fname}" "h5ls_vds_files")
+ endforeach ()
+
+ foreach (listfiles ${LIST_OTHER_TEST_FILES})
+ get_filename_component(fname "${listfiles}" NAME)
+ HDFTEST_COPY_FILE("${HDF5_TOOLS_TEST_H5LS_SOURCE_DIR}/vds_prefix/${listfiles}" "${PROJECT_BINARY_DIR}/testfiles/vds/prefix/${fname}" "h5ls_vds_files")
+ endforeach ()
+
add_custom_target(h5ls_vds_files ALL COMMENT "Copying files needed by h5ls_vds tests" DEPENDS ${h5ls_vds_files_list})
##############################################################################
@@ -104,6 +115,43 @@
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 H5LS_PREFIX-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN})
+ set_tests_properties (H5LS_PREFIX-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds/prefix")
+ if ("${resultcode}" STREQUAL "1")
+ set_tests_properties (H5LS_PREFIX-${resultfile} PROPERTIES WILL_FAIL "true")
+ endif ()
+ if (NOT "${last_test}" STREQUAL "")
+ set_tests_properties (H5LS_PREFIX-${resultfile} PROPERTIES DEPENDS ${last_test})
+ endif ()
+ else ()
+ add_test (
+ NAME H5LS_PREFIX-${resultfile}-clear-objects
+ COMMAND ${CMAKE_COMMAND}
+ -E remove
+ ${resultfile}.out
+ ${resultfile}.out.err
+ )
+ set_tests_properties (H5LS_PREFIX-${resultfile}-clear-objects PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds/prefix")
+ add_test (
+ NAME H5LS_PREFIX-${resultfile}
+ COMMAND "${CMAKE_COMMAND}"
+ -D "TEST_PROGRAM=$<TARGET_FILE:h5ls>"
+ -D "TEST_ARGS=${ARGN}"
+ -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/testfiles"
+ -D "TEST_OUTPUT=vds/prefix/${resultfile}.out"
+ -D "TEST_EXPECT=${resultcode}"
+ -D "TEST_REFERENCE=vds/prefix/${resultfile}.ls"
+ -D "TEST_ENV_VAR=HDF5_VDS_PREFIX"
+ -D "TEST_ENV_VALUE=\${ORIGIN}"
+ -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake"
+ )
+ set_tests_properties (H5LS_PREFIX-${resultfile} PROPERTIES DEPENDS H5LS_PREFIX-${resultfile}-clear-objects)
+ endif ()
+ endmacro ()
+
##############################################################################
##############################################################################
### T H E T E S T S ###
@@ -155,3 +203,10 @@
ADD_H5_VDS_TEST (tvds-4 0 -w80 -v -S 4_vds.h5)
ADD_H5_VDS_TEST (tvds-5 0 -w80 -v -S 5_vds.h5)
+ ADD_H5_VDS_PREFIX_TEST (tvds-1 0 -w80 -v -S vds/prefix/1_vds.h5)
+ ADD_H5_VDS_PREFIX_TEST (tvds-2 0 -w80 -v -S vds/prefix/2_vds.h5)
+ ADD_H5_VDS_PREFIX_TEST (tvds-3_1 0 -w80 -v -S vds/prefix/3_1_vds.h5)
+ ADD_H5_VDS_PREFIX_TEST (tvds-3_2 0 -w80 -v -S vds/prefix/3_2_vds.h5)
+ ADD_H5_VDS_PREFIX_TEST (tvds-4 0 -w80 -v -S vds/prefix/4_vds.h5)
+ ADD_H5_VDS_PREFIX_TEST (tvds-5 0 -w80 -v -S vds/prefix/5_vds.h5)
+
diff --git a/tools/test/h5ls/vds_prefix/tvds-1.ls b/tools/test/h5ls/vds_prefix/tvds-1.ls
new file mode 100644
index 0000000..2830d1a
--- /dev/null
+++ b/tools/test/h5ls/vds_prefix/tvds-1.ls
@@ -0,0 +1,14 @@
+Opened "vds/prefix/1_vds.h5" with sec2 driver.
+vds_dset Dataset {5/Inf, 18/18, 8/8}
+ Location: 1:800
+ Links: 1
+ Maps: {6} Source {
+ 1_a.h5 /source_dset
+ 1_b.h5 /source_dset
+ 1_c.h5 /source_dset
+ 1_d.h5 /source_dset
+ 1_e.h5 /source_dset
+ 1_f.h5 /source_dset
+ }
+ Storage: 2880 logical bytes, 0 allocated bytes
+ Type: 32-bit little-endian integer
diff --git a/tools/test/h5ls/vds_prefix/tvds-2.ls b/tools/test/h5ls/vds_prefix/tvds-2.ls
new file mode 100644
index 0000000..5c6f9d3
--- /dev/null
+++ b/tools/test/h5ls/vds_prefix/tvds-2.ls
@@ -0,0 +1,13 @@
+Opened "vds/prefix/2_vds.h5" with sec2 driver.
+vds_dset Dataset {6/Inf, 8/8, 14/14}
+ Location: 1:800
+ Links: 1
+ Maps: {5} Source {
+ 2_a.h5 /source_dset
+ 2_b.h5 /source_dset
+ 2_c.h5 /source_dset
+ 2_d.h5 /source_dset
+ 2_e.h5 /source_dset
+ }
+ Storage: 2688 logical bytes, 0 allocated bytes
+ Type: 32-bit little-endian integer
diff --git a/tools/test/h5ls/vds_prefix/tvds-3_1.ls b/tools/test/h5ls/vds_prefix/tvds-3_1.ls
new file mode 100644
index 0000000..f4c8e78
--- /dev/null
+++ b/tools/test/h5ls/vds_prefix/tvds-3_1.ls
@@ -0,0 +1,14 @@
+Opened "vds/prefix/3_1_vds.h5" with sec2 driver.
+vds_dset Dataset {5/Inf, 25/25, 8/8}
+ Location: 1:800
+ Links: 1
+ Maps: {6} Source {
+ 1_a.h5 /source_dset
+ 1_b.h5 /source_dset
+ 1_c.h5 /source_dset
+ 1_d.h5 /source_dset
+ 1_e.h5 /source_dset
+ 1_f.h5 /source_dset
+ }
+ Storage: 4000 logical bytes, 0 allocated bytes
+ Type: 32-bit little-endian integer
diff --git a/tools/test/h5ls/vds_prefix/tvds-3_2.ls b/tools/test/h5ls/vds_prefix/tvds-3_2.ls
new file mode 100644
index 0000000..5a7e2d8
--- /dev/null
+++ b/tools/test/h5ls/vds_prefix/tvds-3_2.ls
@@ -0,0 +1,13 @@
+Opened "vds/prefix/3_2_vds.h5" with sec2 driver.
+vds_dset Dataset {6/Inf, 13/13, 19/19}
+ Location: 1:800
+ Links: 1
+ Maps: {5} Source {
+ 2_a.h5 /source_dset
+ 2_b.h5 /source_dset
+ 2_c.h5 /source_dset
+ 2_d.h5 /source_dset
+ 2_e.h5 /source_dset
+ }
+ Storage: 5928 logical bytes, 0 allocated bytes
+ Type: 32-bit little-endian integer
diff --git a/tools/test/h5ls/vds_prefix/tvds-4.ls b/tools/test/h5ls/vds_prefix/tvds-4.ls
new file mode 100644
index 0000000..c22d3a4
--- /dev/null
+++ b/tools/test/h5ls/vds_prefix/tvds-4.ls
@@ -0,0 +1,9 @@
+Opened "vds/prefix/4_vds.h5" with sec2 driver.
+vds_dset Dataset {9/Inf, 4/4, 4/4}
+ Location: 1:800
+ Links: 1
+ Maps: {1} Source {
+ 4_%b.h5 /source_dset
+ }
+ Storage: 576 logical bytes, 0 allocated bytes
+ Type: 32-bit little-endian integer
diff --git a/tools/test/h5ls/vds_prefix/tvds-5.ls b/tools/test/h5ls/vds_prefix/tvds-5.ls
new file mode 100644
index 0000000..efba8dc
--- /dev/null
+++ b/tools/test/h5ls/vds_prefix/tvds-5.ls
@@ -0,0 +1,11 @@
+Opened "vds/prefix/5_vds.h5" with sec2 driver.
+vds_dset Dataset {9/Inf, 4/4, 4/4}
+ Location: 1:800
+ Links: 1
+ Maps: {3} Source {
+ 5_a.h5 /source_dset
+ 5_b.h5 /source_dset
+ 5_c.h5 /source_dset
+ }
+ Storage: 576 logical bytes, 0 allocated bytes
+ Type: 32-bit little-endian integer