summaryrefslogtreecommitdiffstats
path: root/tools/h5ls
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-03-19 14:26:04 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-03-19 14:26:04 (GMT)
commit19206f5687a4366f077ae47ae8e206f4a972144f (patch)
tree1022864b6b9015dcb035f33775d3fb0da24cddf2 /tools/h5ls
parentb1a2c642a7105d808f884a27111236dd77df3ce0 (diff)
downloadhdf5-19206f5687a4366f077ae47ae8e206f4a972144f.zip
hdf5-19206f5687a4366f077ae47ae8e206f4a972144f.tar.gz
hdf5-19206f5687a4366f077ae47ae8e206f4a972144f.tar.bz2
[svn-r22088] HDFFV-7957(7958): Correct use of ERROR_STACK for h5dump and tools.
Tested: local linux after week in trunk
Diffstat (limited to 'tools/h5ls')
-rw-r--r--tools/h5ls/CMakeLists.txt6
-rw-r--r--tools/h5ls/testh5ls.sh.in30
2 files changed, 24 insertions, 12 deletions
diff --git a/tools/h5ls/CMakeLists.txt b/tools/h5ls/CMakeLists.txt
index 599202f..0dec21c 100644
--- a/tools/h5ls/CMakeLists.txt
+++ b/tools/h5ls/CMakeLists.txt
@@ -98,6 +98,7 @@ IF (BUILD_TESTING)
${HDF5_TOOLS_SRC_DIR}/testfiles/tgroup-3.ls
${HDF5_TOOLS_SRC_DIR}/testfiles/thlink-1.ls
${HDF5_TOOLS_SRC_DIR}/testfiles/tloop-1.ls
+ ${HDF5_TOOLS_SRC_DIR}/testfiles/tmultifile.ls
${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-1.ls
${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-2.ls
${HDF5_TOOLS_SRC_DIR}/testfiles/tnestcomp-3.ls
@@ -354,6 +355,11 @@ IF (BUILD_TESTING)
# when used file with no dangling links - expected exit code 0
ADD_H5_TEST (thlinks-nodangle-1 0 -w80 --follow-symlinks --no-dangling-links thlink.h5)
+# test for wildcards in filename (does not work with cmake)
+# ADD_H5_TEST (tstarfile 0 -w80 t*link.h5)
+# ADD_H5_TEST (tqmarkfile 0 -w80 t?link.h5)
+ ADD_H5_TEST (tmultifile 0 -w80 thlink.h5 tslink.h5)
+
# tests for hard links
ADD_H5_TEST (thlink-1 0 -w80 thlink.h5)
diff --git a/tools/h5ls/testh5ls.sh.in b/tools/h5ls/testh5ls.sh.in
index e2c204b..23b4ab3 100644
--- a/tools/h5ls/testh5ls.sh.in
+++ b/tools/h5ls/testh5ls.sh.in
@@ -25,13 +25,13 @@ H5LS_BIN=`pwd`/$H5LS # The path of the tool binary
CMP='cmp -s'
DIFF='diff -c'
CP='cp'
-NLINES=20 # Max. lines of output to display if test fails
+NLINES=20 # Max. lines of output to display if test fails
WORDS_BIGENDIAN="@WORDS_BIGENDIAN@"
nerrors=0
verbose=yes
-h5haveexitcode=yes # default is yes
+h5haveexitcode=yes # default is yes
# The build (current) directory might be different than the source directory.
if test -z "$srcdir"; then
srcdir=.
@@ -131,6 +131,7 @@ $SRC_H5LS_TESTFILES/tgroup-2.ls
$SRC_H5LS_TESTFILES/tgroup-3.ls
$SRC_H5LS_TESTFILES/thlink-1.ls
$SRC_H5LS_TESTFILES/tloop-1.ls
+$SRC_H5LS_TESTFILES/tmultifile.ls
$SRC_H5LS_TESTFILES/tnestcomp-1.ls
$SRC_H5LS_TESTFILES/tnestcomp-2.ls
$SRC_H5LS_TESTFILES/tnestcomp-3.ls
@@ -210,7 +211,7 @@ TOOLTEST() {
# any unexpected output from that stream too.
TESTING $H5LS $@
(
- cd $TESTDIR
+ cd $TESTDIR
$RUNSERIAL $H5LS_BIN "$@"
) >$actual 2>$actual_err
@@ -222,15 +223,15 @@ TOOLTEST() {
STDERR_FILTER $actual_err
cat $actual_err >> $actual
if [ $h5haveexitcode = 'yes' -a $exitcode -ne $retvalexpect ]; then
- echo "*FAILED*"
- nerrors="`expr $nerrors + 1`"
- if [ yes = "$verbose" ]; then
- echo "test returned with exit code $exitcode"
- echo "test output: (up to $NLINES lines)"
- head -$NLINES $actual
- echo "***end of test output***"
- echo ""
- fi
+ echo "*FAILED*"
+ nerrors="`expr $nerrors + 1`"
+ if [ yes = "$verbose" ]; then
+ echo "test returned with exit code $exitcode"
+ echo "test output: (up to $NLINES lines)"
+ head -$NLINES $actual
+ echo "***end of test output***"
+ echo ""
+ fi
elif [ ! -f $expect ]; then
# Create the expect file if it doesn't yet exist.
echo " CREATED"
@@ -322,6 +323,11 @@ TOOLTEST tsoftlinks-nodangle-1.ls 1 -w80 --follow-symlinks --no-dangling-links t
# when used file with no dangling links - expected exit code 0
TOOLTEST thlinks-nodangle-1.ls 0 -w80 --follow-symlinks --no-dangling-links thlink.h5
+# test for wildcards in filename (does not work with cmake)
+# this h5ls test script does not pass the filename properly like the h5dump test script???
+#TOOLTEST tstarfile 0 -w80 t*link.h5
+#TOOLTEST tqmarkfile 0 -w80 t?link.h5
+TOOLTEST tmultifile 0 -w80 thlink.h5 tslink.h5
# tests for hard links
TOOLTEST thlink-1.ls 0 -w80 thlink.h5