diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-10-11 20:11:39 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-10-11 20:11:39 (GMT) |
commit | fbc86cfb3d503d7e7091c4cc58bd72aa9a97aac7 (patch) | |
tree | 2e8d1075edc764fca8e22f509f97365d73b41880 /tools/h5ls | |
parent | 005444208330c7c4ece3f60278b36802ad93dbba (diff) | |
download | hdf5-fbc86cfb3d503d7e7091c4cc58bd72aa9a97aac7.zip hdf5-fbc86cfb3d503d7e7091c4cc58bd72aa9a97aac7.tar.gz hdf5-fbc86cfb3d503d7e7091c4cc58bd72aa9a97aac7.tar.bz2 |
HDFFV-10297 merge from develop
Also cleaned up some other non-merged changes
Diffstat (limited to 'tools/h5ls')
-rw-r--r-- | tools/h5ls/CMakeTests.cmake | 15 | ||||
-rw-r--r-- | tools/h5ls/h5ls.c | 1 | ||||
-rw-r--r-- | tools/h5ls/h5ls_plugin.sh.in | 16 |
3 files changed, 27 insertions, 5 deletions
diff --git a/tools/h5ls/CMakeTests.cmake b/tools/h5ls/CMakeTests.cmake index a839518..6c9f118 100644 --- a/tools/h5ls/CMakeTests.cmake +++ b/tools/h5ls/CMakeTests.cmake @@ -127,13 +127,21 @@ if (HDF5_ENABLE_USING_MEMCHECKER) add_test (NAME H5LS-${resultfile} COMMAND $<TARGET_FILE:h5ls> ${ARGN}) set_tests_properties (H5LS-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles") - if (${resultcode} STREQUAL "1") + if ("${resultcode}" STREQUAL "1") set_tests_properties (H5LS-${resultfile} PROPERTIES WILL_FAIL "true") endif () if (NOT "${last_test}" STREQUAL "") set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS ${last_test}) endif () else () + # Remove any output file left over from previous test run + add_test ( + NAME H5LS-${resultfile}-clear-objects + COMMAND ${CMAKE_COMMAND} + -E remove + testfiles/${resultfile}.out + testfiles/${resultfile}.out.err + ) add_test ( NAME H5LS-${resultfile} COMMAND "${CMAKE_COMMAND}" @@ -145,6 +153,7 @@ -D "TEST_REFERENCE=${resultfile}.ls" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) + set_tests_properties (H5LS-${resultfile} PROPERTIES DEPENDS H5LS-${resultfile}-clear-objects) endif () endmacro () @@ -152,7 +161,7 @@ if (NOT HDF5_ENABLE_USING_MEMCHECKER) # Remove any output file left over from previous test run add_test ( - NAME H5LS_UD-${testname}-clearall-objects + NAME H5LS_UD-${testname}-clear-objects COMMAND ${CMAKE_COMMAND} -E remove testfiles/${resultfile}.out @@ -171,7 +180,7 @@ -D "TEST_ENV_VALUE=${CMAKE_BINARY_DIR}/plugins" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) - set_tests_properties (H5LS_UD-${testname} PROPERTIES DEPENDS H5LS_UD-${testname}-clearall-objects) + set_tests_properties (H5LS_UD-${testname} PROPERTIES DEPENDS H5LS_UD-${testname}-clear-objects) endif () endmacro () diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index e81a8eb..583f8bf 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1757,7 +1757,6 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name) size_t cd_nelmts; /* filter client number of values */ size_t cd_num; /* filter client data counter */ char f_name[256]; /* filter/file name */ - char dset_name[256]; /* filter/file name */ char s[64]; /* temporary string buffer */ off_t f_offset; /* offset in external file */ hsize_t f_size; /* bytes used in external file */ diff --git a/tools/h5ls/h5ls_plugin.sh.in b/tools/h5ls/h5ls_plugin.sh.in index d7351c1..5fae0c3 100644 --- a/tools/h5ls/h5ls_plugin.sh.in +++ b/tools/h5ls/h5ls_plugin.sh.in @@ -135,12 +135,26 @@ CLEAN_TESTFILES_AND_TESTDIR() fi } +# Print a $* message left justified in a field of 70 characters +# +MESSAGE() { + SPACES=" " + echo "$* $SPACES" | cut -c1-70 | tr -d '\012' +} + # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". # TESTING() { SPACES=" " - echo "Testing $* $SPACES" |cut -c1-70 |tr -d '\012' + echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' +} + +# Print a line-line message left justified in a field of 70 characters +# beginning with the word "Verifying". +# +VERIFY() { + MESSAGE "Verifying $*" } # Source in the output filter function definitions. |