summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/testh5dumpxml.sh.in
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2013-02-18 19:03:53 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2013-02-18 19:03:53 (GMT)
commit1629fd1ee78c33fdfd8328eef520a7e10aa945a8 (patch)
tree492cbade970f0660eb3436c5bcde3e712e30e37e /tools/h5dump/testh5dumpxml.sh.in
parent79bc86c220bfc7de65f1fe5e5c49088d9cfbd659 (diff)
downloadhdf5-1629fd1ee78c33fdfd8328eef520a7e10aa945a8.zip
hdf5-1629fd1ee78c33fdfd8328eef520a7e10aa945a8.tar.gz
hdf5-1629fd1ee78c33fdfd8328eef520a7e10aa945a8.tar.bz2
[svn-r23301]
Diffstat (limited to 'tools/h5dump/testh5dumpxml.sh.in')
-rw-r--r--tools/h5dump/testh5dumpxml.sh.in30
1 files changed, 17 insertions, 13 deletions
diff --git a/tools/h5dump/testh5dumpxml.sh.in b/tools/h5dump/testh5dumpxml.sh.in
index 374f504..a70d31c 100644
--- a/tools/h5dump/testh5dumpxml.sh.in
+++ b/tools/h5dump/testh5dumpxml.sh.in
@@ -50,8 +50,8 @@ SRC_H5JAM_TESTFILES="$SRC_TOOLS/h5jam/testfiles"
SRC_H5STAT_TESTFILES="$SRC_TOOLS/h5stat/testfiles"
SRC_H5IMPORT_TESTFILES="$SRC_TOOLS/h5import/testfiles"
-TESTDIR=./testfiles
-test -d $TESTDIR || mkdir $TESTDIR
+TESTDIR=./testfiles/xml
+test -d $TESTDIR || mkdir -p $TESTDIR
######################################################################
# test files
@@ -223,6 +223,9 @@ TESTING() {
echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
}
+# Source in the output filter function definitions.
+. $srcdir/../../bin/output_filter.sh
+
# Run a test and print PASS or *FAIL*. If a test fails then increment
# the `nerrors' global variable and (if $verbose is set) display the
# difference between the actual output and the expected output. The
@@ -232,18 +235,17 @@ TESTING() {
# non-zero value.
#
TOOLTEST() {
- expect="$srcdir/../testfiles/$1"
- actual="../testfiles/`basename $1 .ddl`.out"
- actual_err="../testfiles/`basename $1 .ddl`.err"
+ expect="$TESTDIR/$1"
+ actual="$TESTDIR/`basename $1 .xml`.out"
+ actual_err="$TESTDIR/`basename $1 .xml`.err"
shift
- # Run test.
- TESTING $DUMPER $@
- (
- cd $srcdir/../testfiles
- $RUNSERIAL $DUMPER_BIN $@
- ) >$actual 2>$actual_err
- cat $actual_err >> $actual
+ # Run test.
+ TESTING $DUMPER $@
+ (
+ cd $TESTDIR
+ $RUNSERIAL $DUMPER_BIN "$@"
+ ) >$actual 2>$actual_err
if [ ! -f $expect ]; then
@@ -254,7 +256,7 @@ TOOLTEST() {
echo " PASSED"
else
echo "*FAILED*"
- echo " Expected result (*.ddl) differs from actual result (*.out)"
+ echo " Expected result (*.xml) differs from actual result (*.out)"
nerrors="`expr $nerrors + 1`"
test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /'
fi
@@ -277,6 +279,8 @@ SKIP() {
### T H E T E S T S ###
##############################################################################
##############################################################################
+# prepare for test
+COPY_TESTFILES_TO_TESTDIR
# test XML
TOOLTEST tall.h5.xml --xml tall.h5