summaryrefslogtreecommitdiffstats
path: root/tools/h5import/h5importtestutil.sh.in
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2017-12-01 18:41:26 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2017-12-01 18:41:26 (GMT)
commitb8c6b68c35fa2be23ef488a1d81097ff3ed55000 (patch)
treec3429ee577e454526c8704d66a84f0c45b7959a1 /tools/h5import/h5importtestutil.sh.in
parent23a702e7bad93fc4f14eab07678c75d276e2d0ad (diff)
parent60f76980aab92f0e0730170b99a2363acd3c97fa (diff)
downloadhdf5-b8c6b68c35fa2be23ef488a1d81097ff3ed55000.zip
hdf5-b8c6b68c35fa2be23ef488a1d81097ff3ed55000.tar.gz
hdf5-b8c6b68c35fa2be23ef488a1d81097ff3ed55000.tar.bz2
Merge pull request #811 in HDFFV/hdf5 from hdf5_1_8_20 to 1.8/masterhdf5-1_8_20
* commit '60f76980aab92f0e0730170b99a2363acd3c97fa': (108 commits) Update version numbers and remove empty sections in RELEASE.txt. Restore line 1154: C2Cppfunction_map.mht to HTML_EXTRA_FILES. Update version for 1.8.20 release. Fixed documentation warnings HDFFV-10329 Correct LINK INTERFACE and VS20013 compile Switch default build mode from development to production. Increment version string to pre2. Add RELEASE.txt note for HDFFV-10274. (cherry picked from commit f7a7d0a00613cba997212fa8032091629a678797) Initialize hid_t variables in test_Attr_bug9. (cherry picked from commit 97bc393449f3fe02c5992872ab2842e12f611ef0) Fix HDFFV-10274. When deleting all (or almost all) of the messages in an object header chunk, where the total amount deleted was greater than 64K, an error would occur due to an off by one error in the code that handled that case. Fixed this and added a test case. (cherry picked from commit 1b2c2ca9a6a7d7e1fcd5c3302e203f2e2dabf0af) Fix linking of libs Changed file path to relative. iAdd NAG to supported compilers in RELEASE.txt. Add description to RELEASE.txt for HDFFV-10323 Correct issue number Set version to 1.8.20-pre1 Update supported and tested platforms in RELEASE.txt. HDFFV-10321 Merge from 1.8 Incremented lib file .so numbers: revision for all except c++ for code change; current incremented, revision and age set to 0 for c++ due to symbols added and removed. updated issues related to Fortran Incremented lib file .so numbers: revision for all except c++ for dcode change; current incremented, revision and age set to 0 for c++ due to symbols added and removed. ...
Diffstat (limited to 'tools/h5import/h5importtestutil.sh.in')
-rw-r--r--tools/h5import/h5importtestutil.sh.in146
1 files changed, 88 insertions, 58 deletions
diff --git a/tools/h5import/h5importtestutil.sh.in b/tools/h5import/h5importtestutil.sh.in
index b724957..2ad7866 100644
--- a/tools/h5import/h5importtestutil.sh.in
+++ b/tools/h5import/h5importtestutil.sh.in
@@ -22,6 +22,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'
@@ -74,16 +83,11 @@ $SRC_H5IMPORT_TESTFILES/txtuin16.h5
$SRC_H5IMPORT_TESTFILES/txtuin32.h5
$SRC_H5IMPORT_TESTFILES/txtstr.h5
$SRC_H5IMPORT_TESTFILES/textpfe.h5
+$SRC_TOOLS_TESTFILES/tall.h5
+$SRC_TOOLS_TESTFILES/tintsattrs.h5
"
LIST_OTHER_TEST_FILES="
-$SRC_H5IMPORT_TESTFILES/binfp64.conf
-$SRC_H5IMPORT_TESTFILES/binin8.conf
-$SRC_H5IMPORT_TESTFILES/binin8w.conf
-$SRC_H5IMPORT_TESTFILES/binin16.conf
-$SRC_H5IMPORT_TESTFILES/binin32.conf
-$SRC_H5IMPORT_TESTFILES/binuin16.conf
-$SRC_H5IMPORT_TESTFILES/binuin32.conf
$SRC_H5IMPORT_TESTFILES/txtfp32.conf
$SRC_H5IMPORT_TESTFILES/txtfp64.conf
$SRC_H5IMPORT_TESTFILES/txtin8.conf
@@ -110,6 +114,9 @@ $SRC_H5IMPORT_TESTFILES/dbinin32.h5.txt
$SRC_H5IMPORT_TESTFILES/dbinuin16.h5.txt
$SRC_H5IMPORT_TESTFILES/dbinuin32.h5.txt
$SRC_H5IMPORT_TESTFILES/dtxtstr.h5.txt
+$SRC_H5IMPORT_TESTFILES/tall_fp32.ddl
+$SRC_H5IMPORT_TESTFILES/tall_i32.ddl
+$SRC_H5IMPORT_TESTFILES/tintsattrs_u32.ddl
"
#
@@ -133,10 +140,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
@@ -175,11 +182,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 +204,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 NATIVE 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 +225,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 +246,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
@@ -255,12 +262,32 @@ else
fi
}
-echo ""
+# Same as TOOLTEST2 except for subsets
+# Use h5dump output as input to h5import for binary numbers
+# Use h5dump to verify results
+TOOLTEST5()
+{
+err=0
+$RUNSERIAL $DUMPER_BIN -p -d $3 $4 -o d-$1.bin -b NATIVE tmp_testfiles/$2 > d-$1.dmp
+$RUNSERIAL $H5IMPORT_BIN d-$1.bin -c d-$1.dmp -o d-$1.h5 > d-$1.imp
+$RUNSERIAL $DUMPER_BIN -p d-$1.h5 > log2
+$CP -f $SRC_H5IMPORT_TESTFILES/$1.ddl log1
+
+cmp -s log1 log2 || err=1
+rm -f log1 log2
+if [ $err -eq 1 ]; then
+nerrors="` expr $nerrors + 1 `";
+ echo "*FAILED*"
+else
+ echo " PASSED"
+fi
+}
+
+echo ""
echo "=============================="
echo "H5IMPORT tests started"
echo "=============================="
-if [ -f h5import -a -f h5importtest ]; then
#echo "** Testing h5import ***"
rm -f output.h5 log1 tx* b* *.dat
@@ -280,30 +307,30 @@ $RUNSERIAL ./h5importtest
TESTING "ASCII I32 rank 3 - Output BE " ;
TOOLTEST $TESTDIR/txtin32.txt -c $TESTDIR/txtin32.conf -o txtin32.h5
-TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended"
+TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended"
TOOLTEST $TESTDIR/txtin16.txt -c $TESTDIR/txtin16.conf -o txtin16.h5
-TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed "
+TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed "
TOOLTEST $TESTDIR/txtin8.txt -c $TESTDIR/txtin8.conf -o txtin8.h5
-TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed "
+TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed "
TOOLTEST $TESTDIR/txtuin16.txt -c $TESTDIR/txtuin16.conf -o txtuin16.h5
-TESTING "ASCII UI32 - rank 3 - Output BE"
+TESTING "ASCII UI32 - rank 3 - Output BE"
TOOLTEST $TESTDIR/txtuin32.txt -c $TESTDIR/txtuin32.conf -o txtuin32.h5
-TESTING "ASCII F32 - rank 3 - Output LE "
+TESTING "ASCII F32 - rank 3 - Output LE "
TOOLTEST $TESTDIR/txtfp32.txt -c $TESTDIR/txtfp32.conf -o txtfp32.h5
-TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed "
+TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed "
TOOLTEST $TESTDIR/txtfp64.txt -c $TESTDIR/txtfp64.conf -o txtfp64.h5
-TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed "
-TOOLTEST binfp64.bin -c $TESTDIR/binfp64.conf -o binfp64.h5
-TESTING "H5DUMP-BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed "
+TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed "
+TOOLTEST binfp64.bin -c binfp64.conf -o binfp64.h5
+TESTING "H5DUMP-BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed "
if test $USE_FILTER_DEFLATE != "yes"; then
SKIP "/fp/bin/64-bit" binfp64.h5
else
@@ -311,58 +338,61 @@ else
fi
-TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed "
-TOOLTEST binin8.bin -c $TESTDIR/binin8.conf -o binin8.h5
-TESTING "H5DUMP-BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed "
+TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed "
+TOOLTEST binin8.bin -c binin8.conf -o binin8.h5
+TESTING "H5DUMP-BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed "
if test $USE_FILTER_DEFLATE != "yes"; then
SKIP "/int/bin/8-bit" binin8.h5
else
TOOLTEST2 "/int/bin/8-bit" binin8.h5
fi
-TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended "
-TOOLTEST binin16.bin -c $TESTDIR/binin16.conf -o binin16.h5
-TESTING "H5DUMP-BINARY I16 - rank 3 - Output order LE + CHUNKED + extended "
+TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended "
+TOOLTEST binin16.bin -c binin16.conf -o binin16.h5
+TESTING "H5DUMP-BINARY I16 - rank 3 - Output order LE + CHUNKED + extended "
TOOLTEST2 "/int/bin/16-bit" binin16.h5
-TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED "
-TOOLTEST binin32.bin -c $TESTDIR/binin32.conf -o binin32.h5
-TESTING "H5DUMP-BINARY I32 - rank 3 - Output BE + CHUNKED "
+TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED "
+TOOLTEST binin32.bin -c binin32.conf -o binin32.h5
+TESTING "H5DUMP-BINARY I32 - rank 3 - Output BE + CHUNKED "
TOOLTEST2 "/int/bin/32-bit" binin32.h5
-TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED "
-TOOLTEST binuin16.bin -c $TESTDIR/binuin16.conf -o binuin16.h5
-TESTING "H5DUMP-BINARY UI16 - rank 3 - Output byte BE + CHUNKED "
+TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED "
+TOOLTEST binuin16.bin -c binuin16.conf -o binuin16.h5
+TESTING "H5DUMP-BINARY UI16 - rank 3 - Output byte BE + CHUNKED "
TOOLTEST2 "/int/buin/16-bit" binuin16.h5
-TESTING "BINARY UI32 - rank 3 - Output LE + CHUNKED "
-TOOLTEST binuin32.bin -c $TESTDIR/binuin32.conf -o binuin32.h5
-TESTING "H5DUMP-BINARY UI32 - rank 3 - Output LE + CHUNKED "
+TESTING "BINARY UI32 - rank 3 - Output LE + CHUNKED "
+TOOLTEST binuin32.bin -c binuin32.conf -o binuin32.h5
+TESTING "H5DUMP-BINARY UI32 - rank 3 - Output LE + CHUNKED "
TOOLTEST2 "/int/buin/32-bit" binuin32.h5
-TESTING "STR"
+TESTING "STR"
TOOLTEST $TESTDIR/txtstr.txt -c $TESTDIR/txtstr.conf -o txtstr.h5
-TESTING "H5DUMP-STR"
+TESTING "H5DUMP-STR"
TOOLTEST4 "/mytext/data" txtstr.h5
-TESTING "BINARY I8 CR LF EOF"
-TOOLTEST binin8w.bin -c $TESTDIR/binin8w.conf -o binin8w.h5
-TESTING "H5DUMP-BINARY I8 CR LF EOF"
+TESTING "BINARY I8 CR LF EOF"
+TOOLTEST binin8w.bin -c binin8w.conf -o binin8w.h5
+TESTING "H5DUMP-BINARY I8 CR LF EOF"
TOOLTEST2 "/dataset0" binin8w.h5
-TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE "
+TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE "
TOOLTEST $TESTDIR/textpfe64.txt -c $TESTDIR/textpfe.conf -o textpfe.h5
+TESTING "Binary Subset FP"
+TOOLTEST5 tall_fp32 tall.h5 "/g2/dset2.2" "--start=1,1 --stride=2,3 --count=1,2 --block=1,1"
+TESTING "Binary Subset INT"
+TOOLTEST5 tall_i32 tall.h5 "/g1/g1.1/dset1.1.1" "--start=1,1 --stride=2,3 --count=3,2 --block=1,1"
+TESTING "Binary Subset UINT"
+TOOLTEST5 tintsattrs_u32 tintsattrs.h5 "/DU32BITS" "--start=1,1 --stride=2,3 --count=3,2 --block=1,1"
+
-rm -f txtin32.txt txtin16.txt txtin8.txt txtuin32.txt txtuin16.txt *.bin *.dmp *.imp *.h5
+rm -f txtin32.txt txtin16.txt txtin8.txt txtuin32.txt txtuin16.txt *.bin *.dmp *.conf *.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