summaryrefslogtreecommitdiffstats
path: root/tools/h5stat/testh5stat.sh.in
diff options
context:
space:
mode:
authorlrknox <lrknox>2017-05-20 02:32:43 (GMT)
committerlrknox <lrknox>2017-05-20 02:32:43 (GMT)
commit3a43f7af3eaf807fbdf4cf26c10eadb67903b4a8 (patch)
treea9af55e96791ecc7845a67a5b2ec6e667a24dd12 /tools/h5stat/testh5stat.sh.in
parent197b461bceee6b066ba7560766644ad2a26c361c (diff)
parentd2db9140b298cf4ffa75255743a709a8b5362135 (diff)
downloadhdf5-3a43f7af3eaf807fbdf4cf26c10eadb67903b4a8.zip
hdf5-3a43f7af3eaf807fbdf4cf26c10eadb67903b4a8.tar.gz
hdf5-3a43f7af3eaf807fbdf4cf26c10eadb67903b4a8.tar.bz2
Merge branch 'hdf5_1_8' of https://bitbucket.hdfgroup.org/scm/~lrknox/hdf5_lrk into hdf5_1_8
Diffstat (limited to 'tools/h5stat/testh5stat.sh.in')
-rw-r--r--tools/h5stat/testh5stat.sh.in60
1 files changed, 31 insertions, 29 deletions
diff --git a/tools/h5stat/testh5stat.sh.in b/tools/h5stat/testh5stat.sh.in
index 147ade1..e77025d 100644
--- a/tools/h5stat/testh5stat.sh.in
+++ b/tools/h5stat/testh5stat.sh.in
@@ -14,8 +14,8 @@
# Tests for the h5stat tool
#
# Modifcations:
-# Vailin Choi; July 2013
-# Add tests for -l, -m, -a options
+# Vailin Choi; July 2013
+# Add tests for -l, -m, -a options
#
srcdir=@srcdir@
@@ -130,10 +130,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
@@ -197,9 +197,11 @@ TOOLTEST() {
cat $actual_err >> $actual
if [ ! -f $expect ]; then
- # Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
+ # Create the expect file if it doesn't yet exist.
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.ddl) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
echo " PASSED"
else
@@ -218,15 +220,15 @@ TOOLTEST() {
# Print a "SKIP" message
SKIP() {
- TESTING $STAT $@
- echo " -SKIP-"
+ TESTING $STAT $@
+ echo " -SKIP-"
}
-
+
##############################################################################
##############################################################################
-### T H E T E S T S ###
+### T H E T E S T S ###
##############################################################################
##############################################################################
# prepare for test
@@ -250,7 +252,7 @@ TOOLTEST h5stat_filters-dT.ddl -dT h5stat_filters.h5
TOOLTEST h5stat_filters-UD.ddl -D h5stat_filters.h5
TOOLTEST h5stat_filters-UT.ddl -T h5stat_filters.h5
#
-# h5stat_tsohm.h5 is a copy of ../../../test/tsohm.h5 generated by tsohm.c
+# h5stat_tsohm.h5 is a copy of ../../../test/tsohm.h5 generated by tsohm.c
# as of release 1.8.7-snap0 (on a 64-bit machine)
TOOLTEST h5stat_tsohm.ddl h5stat_tsohm.h5
# h5stat_newgrat.h5 is generated by h5stat_gentest.c
@@ -258,36 +260,36 @@ TOOLTEST h5stat_newgrat.ddl h5stat_newgrat.h5
TOOLTEST h5stat_newgrat-UG.ddl -G h5stat_newgrat.h5
TOOLTEST h5stat_newgrat-UA.ddl -A h5stat_newgrat.h5
#
-# Tests for -l (--links) option on h5stat_threshold.h5:
-# -l 0 (incorrect threshold value)
-# -g -l 8
-# --links=8
-# --links=20 -g
+# Tests for -l (--links) option on h5stat_threshold.h5:
+# -l 0 (incorrect threshold value)
+# -g -l 8
+# --links=8
+# --links=20 -g
TOOLTEST h5stat_err1_links.ddl -l 0 h5stat_threshold.h5
TOOLTEST h5stat_links1.ddl -g -l 8 h5stat_threshold.h5
TOOLTEST h5stat_links2.ddl --links=8 h5stat_threshold.h5
TOOLTEST h5stat_links3.ddl --links=20 -g h5stat_threshold.h5
#
-# Tests for -l (--links) option on h5stat_newgrat.h5:
-# -g
-# -g -l 40000
+# Tests for -l (--links) option on h5stat_newgrat.h5:
+# -g
+# -g -l 40000
TOOLTEST h5stat_links4.ddl -g h5stat_newgrat.h5
TOOLTEST h5stat_links5.ddl -g -l 40000 h5stat_newgrat.h5
#
# Tests for -m (--dims) option on h5stat_threshold.h5
-# -d --dims=-1 (incorrect threshold value)
-# -gd -m 5
-# -d --di=15
+# -d --dims=-1 (incorrect threshold value)
+# -gd -m 5
+# -d --di=15
TOOLTEST h5stat_err1_dims.ddl -d --dims=-1 h5stat_threshold.h5
TOOLTEST h5stat_dims1.ddl -gd -m 5 h5stat_threshold.h5
TOOLTEST h5stat_dims2.ddl -d --di=15 h5stat_threshold.h5
#
# Tests for -a option on h5stat_threshold.h5
-# -a -2 (incorrect threshold value)
-# --numattrs (without threshold value)
-# -AS -a 10
-# -a 1
-# -A --numattrs=25
+# -a -2 (incorrect threshold value)
+# --numattrs (without threshold value)
+# -AS -a 10
+# -a 1
+# -A --numattrs=25
TOOLTEST h5stat_err1_numattrs.ddl -a -2 h5stat_threshold.h5
TOOLTEST h5stat_err2_numattrs.ddl --numattrs h5stat_threshold.h5
TOOLTEST h5stat_numattrs1.ddl -AS -a 10 h5stat_threshold.h5
@@ -295,7 +297,7 @@ TOOLTEST h5stat_numattrs2.ddl -a 1 h5stat_threshold.h5
TOOLTEST h5stat_numattrs3.ddl -A --numattrs=25 h5stat_threshold.h5
#
# Tests for -a option on h5stat_newgrat.h5
-# -A -a 100
+# -A -a 100
TOOLTEST h5stat_numattrs4.ddl -A -a 100 h5stat_newgrat.h5
#