summaryrefslogtreecommitdiffstats
path: root/tools/test/h5ls/testh5ls.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test/h5ls/testh5ls.sh.in')
-rw-r--r--tools/test/h5ls/testh5ls.sh.in59
1 files changed, 33 insertions, 26 deletions
diff --git a/tools/test/h5ls/testh5ls.sh.in b/tools/test/h5ls/testh5ls.sh.in
index e2a72ba..15282f6 100644
--- a/tools/test/h5ls/testh5ls.sh.in
+++ b/tools/test/h5ls/testh5ls.sh.in
@@ -17,6 +17,9 @@
srcdir=@srcdir@
+USE_FILTER_SZIP="@USE_FILTER_SZIP@"
+USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@"
+
TESTNAME=h5ls
EXIT_SUCCESS=0
EXIT_FAILURE=1
@@ -180,10 +183,10 @@ COPY_TESTFILES_TO_TESTDIR()
INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'`
INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'`
if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then
- $CP -f $tstfile $TESTDIR
+ $CP -f $tstfile $TESTDIR
if [ $? -ne 0 ]; then
echo "Error: FAILED to copy $tstfile ."
-
+
# Comment out this to CREATE expected file
exit $EXIT_FAILURE
fi
@@ -238,10 +241,10 @@ TOOLTEST() {
# any unexpected output from that stream too.
TESTING $H5LS $@
(
- cd $TESTDIR
+ cd $TESTDIR
$RUNSERIAL $H5LS_BIN "$@"
- ) >$actual 2>$actual_err
-
+ ) >$actual 2>$actual_err
+
exitcode=$?
# save actual and actual_err in case they are needed later.
cp $actual $actual_sav
@@ -250,37 +253,37 @@ 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.
+ # Create the expect file if it doesn't yet exist.
echo " CREATED"
cp $actual $expect
elif $CMP $expect $actual; then
echo " PASSED"
else
echo "*FAILED*"
- echo " Expected result differs from actual result"
- nerrors="`expr $nerrors + 1`"
- test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
+ echo " Expected result differs from actual result"
+ nerrors="`expr $nerrors + 1`"
+ test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
- rm -f $actual $actual_err $actual_sav $actual_err_sav
+ rm -f $actual $actual_err $actual_sav $actual_err_sav
fi
}
##############################################################################
##############################################################################
-### T H E T E S T S ###
+### T H E T E S T S ###
##############################################################################
##############################################################################
# prepare for test
@@ -339,7 +342,7 @@ TOOLTEST textlinksrc-3-old.ls 0 -w80 -Er textlinksrc.h5/ext_link1
TOOLTEST textlinksrc-6-old.ls 0 -w80 -E textlinksrc.h5
TOOLTEST textlinksrc-7-old.ls 0 -w80 -E textlinksrc.h5/ext_link1
-# tests for no-dangling-links
+# tests for no-dangling-links
# if this option is given on dangling link, h5ls should return exit code 1
# when used alone , expect to print out help and return exit code 1
TOOLTEST textlinksrc-nodangle-1.ls 1 -w80 --no-dangling-links textlinksrc.h5
@@ -374,7 +377,7 @@ TOOLTEST tnestcomp-4.ls 0 -w80 -r -d -l -S tnestedcomp.h5
# test for loop detection
TOOLTEST tloop-1.ls 0 -w80 -r -d tloop.h5
-# test for string
+# test for string
TOOLTEST tstr-1.ls 0 -w80 -r -d tstr.h5
# test test file created from lib SAF team
@@ -405,22 +408,26 @@ fi
# test for non-existing file
TOOLTEST nosuchfile.ls 1 nosuchfile.h5
-# test for variable length data types in verbose mode
+# test for variable length data types in verbose mode
if test $WORDS_BIGENDIAN != "yes"; then
TOOLTEST tvldtypes2le.ls 0 -v tvldtypes1.h5
else
TOOLTEST tvldtypes2be.ls 0 -v tvldtypes1.h5
-fi
+fi
-# test for dataset region references data types in verbose mode
+# test for dataset region references data types in verbose mode
if test $WORDS_BIGENDIAN != "yes"; then
TOOLTEST tdataregle.ls 0 -v tdatareg.h5
else
TOOLTEST tdataregbe.ls 0 -v tdatareg.h5
-fi
+fi
# test for file with datasets that use Fixed Array chunk indices
+if test $USE_FILTER_DEFLATE = "yes" ; then
+ # data read internal filters
+ TOOLTEST tdset_idx.ls 0 -w80 -d tdset_idx.h5
+fi
echo "***skip testing tdset_idx.h5"
TOOLTEST tdset_idx.ls 0 -w80 -d tdset_idx.h5