diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2016-05-04 16:35:59 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2016-05-04 16:35:59 (GMT) |
commit | f962c3d963b16a37170f9173070b8a04b7b939e0 (patch) | |
tree | 5001ca5eaae9884c3f0cfe1b2cef887f8a936f32 | |
parent | ca8465513df4d24bb4d941c00b2b90d4f592c28e (diff) | |
download | hdf5-f962c3d963b16a37170f9173070b8a04b7b939e0.zip hdf5-f962c3d963b16a37170f9173070b8a04b7b939e0.tar.gz hdf5-f962c3d963b16a37170f9173070b8a04b7b939e0.tar.bz2 |
[svn-r29883] Convert import test script to standard used by other test scripts.
-rw-r--r-- | tools/h5import/h5importtestutil.sh.in | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/tools/h5import/h5importtestutil.sh.in b/tools/h5import/h5importtestutil.sh.in index e50ddac..f2694a0 100644 --- a/tools/h5import/h5importtestutil.sh.in +++ b/tools/h5import/h5importtestutil.sh.in @@ -13,8 +13,7 @@ # 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. # -# HDF Utilities Test script -# Usage: h5importtestutil.sh [machine-type] +# Tests for the h5import tool srcdir=@srcdir@ @@ -25,6 +24,15 @@ TESTNAME=h5import EXIT_SUCCESS=0 EXIT_FAILURE=1 +DUMPER=../h5dump/h5dump # The tool name +DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary + +H5DIFF=../h5diff/h5diff # The h5diff tool name +H5DIFF_BIN=`pwd`/$H5DIFF # The path of the h5diff tool binary + +H5IMPORT=h5import # The h5import tool name +H5IMPORT_BIN=`pwd`/$H5IMPORT # The path of the h5import tool binary + RM='rm -rf' CP='cp' DIRNAME='dirname' @@ -161,6 +169,9 @@ CLEAN_TESTFILES_AND_TESTDIR() fi } +# Print a line-line message left justified in a field of 70 characters +# beginning with the word "Testing". +# TESTING() { SPACES=" " echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' @@ -175,11 +186,11 @@ SKIP() { TOOLTEST() { err=0 -$RUNSERIAL ./h5import $* -$RUNSERIAL ../h5dump/h5dump $5 >log2 +$RUNSERIAL $H5IMPORT_BIN $* +$RUNSERIAL $DUMPER_BIN $5 >log2 cd tmp_testfiles -$RUNSERIAL ../../h5dump/h5dump $5 >log1 +$RUNSERIAL $DUMPER_BIN $5 >log1 cd .. cmp -s tmp_testfiles/log1 log2 || err=1 @@ -197,9 +208,9 @@ fi TOOLTEST2() { err=0 -$RUNSERIAL ../h5dump/h5dump -p -d $1 -o d$2.bin -b tmp_testfiles/$2 > d$2.dmp -$RUNSERIAL ./h5import d$2.bin -c d$2.dmp -o d$2 > d$2.imp -$RUNSERIAL ../h5diff/h5diff -v d$2 tmp_testfiles/$2 $1 $1 > log2 +$RUNSERIAL $DUMPER_BIN -p -d $1 -o d$2.bin -b tmp_testfiles/$2 > d$2.dmp +$RUNSERIAL $H5IMPORT_BIN d$2.bin -c d$2.dmp -o d$2 > d$2.imp +$RUNSERIAL $H5DIFF_BIN -v d$2 tmp_testfiles/$2 $1 $1 > log2 $CP -f $SRC_H5IMPORT_TESTFILES/d$2.txt log1 cmp -s log1 log2 || err=1 @@ -218,9 +229,9 @@ fi TOOLTEST3() { err=0 -$RUNSERIAL ../h5dump/h5dump -p -d $1 -o d$2.bin -y --width=1 tmp_testfiles/$2 > d$2.dmp -$RUNSERIAL ./h5import d$2.bin -c d$2.dmp -o d$2 > d$2.imp -$RUNSERIAL ../h5diff/h5diff -v d$2 tmp_testfiles/$2 $1 $1 > log2 +$RUNSERIAL $DUMPER_BIN -p -d $1 -o d$2.bin -y --width=1 tmp_testfiles/$2 > d$2.dmp +$RUNSERIAL $H5IMPORT_BIN d$2.bin -c d$2.dmp -o d$2 > d$2.imp +$RUNSERIAL $H5DIFF_BIN -v d$2 tmp_testfiles/$2 $1 $1 > log2 $CP -f $SRC_H5IMPORT_TESTFILES/d$2.txt log1 cmp -s log1 log2 || err=1 @@ -239,9 +250,9 @@ fi TOOLTEST4() { err=0 -$RUNSERIAL ../h5dump/h5dump -p -d $1 -o d$2.bin -y --width=1 tmp_testfiles/$2 > d$2.dmp -$RUNSERIAL ./h5import d$2.bin -c d$2.dmp -o d$2 > d$2.imp -$RUNSERIAL ../h5diff/h5diff -r d$2 tmp_testfiles/$2 $1 $1 > log2 +$RUNSERIAL $DUMPER_BIN -p -d $1 -o d$2.bin -y --width=1 tmp_testfiles/$2 > d$2.dmp +$RUNSERIAL $H5IMPORT_BIN d$2.bin -c d$2.dmp -o d$2 > d$2.imp +$RUNSERIAL $H5DIFF_BIN -r d$2 tmp_testfiles/$2 $1 $1 > log2 $CP -f $SRC_H5IMPORT_TESTFILES/d$2.txt log1 @@ -260,7 +271,6 @@ echo "==============================" echo "H5IMPORT tests started" echo "==============================" -if [ -f h5import -a -f h5importtest ]; then #echo "** Testing h5import ***" rm -f output.h5 log1 tx* b* *.dat @@ -359,10 +369,6 @@ TOOLTEST $TESTDIR/textpfe64.txt -c $TESTDIR/textpfe.conf -o textpfe.h5 rm -f txtin32.txt txtin16.txt txtin8.txt txtuin32.txt txtuin16.txt *.bin *.dmp *.imp *.h5 rm -rf tmp_testfiles -else - echo "** h5import or h5importtest not available ***" - nerrors="` expr $nerrors + 1 `"; -fi # Clean up temporary files/directories CLEAN_TESTFILES_AND_TESTDIR |