summaryrefslogtreecommitdiffstats
path: root/tools/misc/testh5mkgrp.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'tools/misc/testh5mkgrp.sh.in')
-rw-r--r--tools/misc/testh5mkgrp.sh.in42
1 files changed, 22 insertions, 20 deletions
diff --git a/tools/misc/testh5mkgrp.sh.in b/tools/misc/testh5mkgrp.sh.in
index a0413e1..2d2e5f7 100644
--- a/tools/misc/testh5mkgrp.sh.in
+++ b/tools/misc/testh5mkgrp.sh.in
@@ -6,12 +6,10 @@
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
-# the files COPYING and Copyright.html. COPYING can be found at the root
-# of the source code distribution tree; Copyright.html can be found at the
-# root level of an installed copy of the electronic HDF5 document set and
-# is linked from the top-level documents page. It can also be found at
-# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
-# access to either file, you may request a copy from help@hdfgroup.org.
+# the COPYING file, which can be found at the root of the source code
+# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
+# If you do not have access to either file, you may request a copy from
+# help@hdfgroup.org.
#
# Tests for the h5mkgrp tool
#
@@ -103,7 +101,7 @@ COPY_TESTFILES_TO_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
@@ -127,7 +125,7 @@ CLEAN_TESTFILES_AND_TESTDIR()
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Testing".
-TESTING()
+TESTING()
{
SPACES=" "
echo "Testing $* $SPACES" |cut -c1-70 |tr -d '\012'
@@ -139,7 +137,7 @@ TESTING()
# Print a line-line message left justified in a field of 70 characters
# beginning with the word "Verifying".
#
-VERIFY_H5LS()
+VERIFY_H5LS()
{
SPACES=" "
echo "Verifying h5ls file structure $* $SPACES" | cut -c1-70 | tr -d '\012'
@@ -151,7 +149,7 @@ VERIFY_H5LS()
# Assumed arguments:
# $* arguments for h5mkgrp.
-TOOLTEST()
+TOOLTEST()
{
TESTING $H5MKGRP $@
(
@@ -176,7 +174,7 @@ TOOLTEST()
# Call the h5ls tool to verify the correct output data in the destination file
#
-H5LSTEST()
+H5LSTEST()
{
expect="$TESTDIR/`basename $1 .h5`.ls"
actual="$TESTDIR/`basename $1 .h5`.out"
@@ -196,9 +194,11 @@ H5LSTEST()
STDERR_FILTER $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 (*.ls) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
echo " PASSED"
else
@@ -220,7 +220,7 @@ H5LSTEST()
# $1 is test file name
# $2 is h5mkgrp options
# $* are groups to create
-RUNTEST()
+RUNTEST()
{
FILEOUT=$1
shift
@@ -249,7 +249,7 @@ RUNTEST()
# $1 is test expected output file
# $2 is h5mkgrp options
# $* are groups to create
-CMPTEST()
+CMPTEST()
{
FILEOUT=$1
expect="$TESTDIR/`basename $1 .h5`.txt"
@@ -265,11 +265,13 @@ CMPTEST()
$RUNSERIAL $H5MKGRP_BIN $@
) >$actual 2>$actual_err
cat $actual_err >> $actual
-
+
if [ ! -f $expect ]; then
# Create the expect file if it doesn't yet exist.
- echo " CREATED"
- cp $actual $expect
+ echo " CREATED"
+ cp $actual $expect
+ echo " Expected result (*.txt) missing"
+ nerrors="`expr $nerrors + 1`"
elif $CMP $expect $actual; then
echo " PASSED"
else
@@ -307,7 +309,7 @@ RUNTEST h5mkgrp_several_v.h5 "-v" one two
RUNTEST h5mkgrp_several_p.h5 "-p" one two
RUNTEST h5mkgrp_several_l.h5 "-l" one two
-# Create various nested groups
+# Create various nested groups
RUNTEST h5mkgrp_nested_p.h5 "-p" /one/two
RUNTEST h5mkgrp_nested_lp.h5 "-lp" /one/two
RUNTEST h5mkgrp_nested_mult_p.h5 "-p" /one/two /three/four