summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2007-10-02 18:34:30 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2007-10-02 18:34:30 (GMT)
commitb2b63b3c75e14e55a4243751a5f22e8fbdbefb3e (patch)
treecba70c0db83b2827011e4742199b4c47b7b2dce9 /tools
parentd0bcb06e7a415ab6ce952095f55d85088750bd0c (diff)
downloadhdf5-b2b63b3c75e14e55a4243751a5f22e8fbdbefb3e.zip
hdf5-b2b63b3c75e14e55a4243751a5f22e8fbdbefb3e.tar.gz
hdf5-b2b63b3c75e14e55a4243751a5f22e8fbdbefb3e.tar.bz2
[svn-r14173]
bug fix the binary option expects a full path in -o TOOLTEST tbin1.ddl -d integer -o $TESTDIR/out1.bin -b LE tbinary.h5 and it prints it in the expected output , making it absolutely not portable Solution: made a special macro function TOOLTEST1 identical to TOOLTEST except that it does not print the Expected output header ############################# Expected output for 'h5dump -d integer -o /home/pvn/kagiso/build_hdf5/tools/h5dump/../testfiles/out1.bin -b LE tbinary.h5' ############################# Tested : linux
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump/testh5dump.sh.in47
-rw-r--r--tools/testfiles/tbin1.ddl3
-rw-r--r--tools/testfiles/tbin2.ddl3
-rw-r--r--tools/testfiles/tbin3.ddl3
-rw-r--r--tools/testfiles/tbin4.ddl3
5 files changed, 43 insertions, 16 deletions
diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in
index 791c8be..140dfce 100644
--- a/tools/h5dump/testh5dump.sh.in
+++ b/tools/h5dump/testh5dump.sh.in
@@ -102,6 +102,45 @@ TOOLTEST() {
}
+# same as TOOLTEST but does not print the header Expected output
+# used for the binary tests that expect a full path in -o
+TOOLTEST1() {
+
+ expect="$srcdir/../testfiles/$1"
+ actual="../testfiles/`basename $1 .ddl`.out"
+ actual_err="../testfiles/`basename $1 .ddl`.err"
+ shift
+
+ # Run test.
+ TESTING $DUMPER $@
+ (
+
+ cd $srcdir/../testfiles
+ $RUNSERIAL $DUMPER_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
+ elif $CMP $expect $actual; then
+ echo " PASSED"
+ else
+ echo "*FAILED*"
+ echo " Expected result (*.ddl) differs from actual result (*.out)"
+ 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
+ # fi
+
+}
+
+
# Print a "SKIP" message
SKIP() {
TESTING $DUMPER $@
@@ -416,15 +455,15 @@ TOOLTEST tnullspace.ddl tnullspace.h5
TOOLTEST tvms.ddl tvms.h5
# test for binary output
-TOOLTEST tbin1.ddl -d integer -o $TESTDIR/out1.bin -b LE tbinary.h5
-TOOLTEST tbin2.ddl -d float -o $TESTDIR/out2.bin -b BE tbinary.h5
+TOOLTEST1 tbin1.ddl -d integer -o $TESTDIR/out1.bin -b LE tbinary.h5
+TOOLTEST1 tbin2.ddl -d float -o $TESTDIR/out2.bin -b BE tbinary.h5
# the MEMORY test can be validated with h5import/h5diff
-TOOLTEST tbin3.ddl -d integer -o $TESTDIR/out3.bin -b MEMORY tbinary.h5
+TOOLTEST1 tbin3.ddl -d integer -o $TESTDIR/out3.bin -b MEMORY tbinary.h5
IMPORTTEST $TESTDIR/out3.bin -c out3.h5import -o $TESTDIR/out3.h5
DIFFTEST tbinary.h5 $TESTDIR/out3.h5 /integer /integer
-TOOLTEST tbin4.ddl -d double -o $TESTDIR/out4.bin -b FILE tbinary.h5
+TOOLTEST1 tbin4.ddl -d double -o $TESTDIR/out4.bin -b FILE tbinary.h5
# Clean up binary output files
if test -z "$HDF5_NOCLEANUP"; then
diff --git a/tools/testfiles/tbin1.ddl b/tools/testfiles/tbin1.ddl
index 860e6ef..ed43e69 100644
--- a/tools/testfiles/tbin1.ddl
+++ b/tools/testfiles/tbin1.ddl
@@ -1,6 +1,3 @@
-#############################
-Expected output for 'h5dump -d integer -o /home/pvn/kagiso/build_hdf5/tools/h5dump/../testfiles/out1.bin -b LE tbinary.h5'
-#############################
HDF5 "tbinary.h5" {
DATASET "integer" {
DATATYPE H5T_STD_I32LE
diff --git a/tools/testfiles/tbin2.ddl b/tools/testfiles/tbin2.ddl
index 0d37612..4cc33c6 100644
--- a/tools/testfiles/tbin2.ddl
+++ b/tools/testfiles/tbin2.ddl
@@ -1,6 +1,3 @@
-#############################
-Expected output for 'h5dump -d float -o /home/pvn/kagiso/build_hdf5/tools/h5dump/../testfiles/out2.bin -b BE tbinary.h5'
-#############################
HDF5 "tbinary.h5" {
DATASET "float" {
DATATYPE H5T_IEEE_F32LE
diff --git a/tools/testfiles/tbin3.ddl b/tools/testfiles/tbin3.ddl
index 734605f..ed43e69 100644
--- a/tools/testfiles/tbin3.ddl
+++ b/tools/testfiles/tbin3.ddl
@@ -1,6 +1,3 @@
-#############################
-Expected output for 'h5dump -d integer -o /home/pvn/kagiso/build_hdf5/tools/h5dump/../testfiles/out3.bin -b MEMORY tbinary.h5'
-#############################
HDF5 "tbinary.h5" {
DATASET "integer" {
DATATYPE H5T_STD_I32LE
diff --git a/tools/testfiles/tbin4.ddl b/tools/testfiles/tbin4.ddl
index 7576001..89849e4 100644
--- a/tools/testfiles/tbin4.ddl
+++ b/tools/testfiles/tbin4.ddl
@@ -1,6 +1,3 @@
-#############################
-Expected output for 'h5dump -d double -o /home/pvn/kagiso/build_hdf5/tools/h5dump/../testfiles/out4.bin -b FILE tbinary.h5'
-#############################
HDF5 "tbinary.h5" {
DATASET "double" {
DATATYPE H5T_IEEE_F64LE