2003-05-12 23:56:49 +08:00
|
|
|
#!/bin/sh
|
2003-04-10 08:34:15 +08:00
|
|
|
#
|
2007-02-08 03:56:21 +08:00
|
|
|
# Copyright by The HDF Group.
|
2003-04-10 08:34:15 +08:00
|
|
|
# Copyright by the Board of Trustees of the University of Illinois.
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# 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
|
2007-02-08 03:56:21 +08:00
|
|
|
# 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.
|
2003-04-10 08:34:15 +08:00
|
|
|
#
|
2003-04-04 04:00:42 +08:00
|
|
|
# HDF Utilities Test script
|
|
|
|
# Usage: h5importtestutil.sh [machine-type]
|
|
|
|
|
2012-08-24 00:07:43 +08:00
|
|
|
srcdir=@srcdir@
|
|
|
|
|
2012-07-26 21:54:06 +08:00
|
|
|
# Determine which filters are available
|
|
|
|
USE_FILTER_DEFLATE="@USE_FILTER_DEFLATE@"
|
|
|
|
|
2009-12-26 16:36:37 +08:00
|
|
|
TESTNAME=h5import
|
|
|
|
EXIT_SUCCESS=0
|
|
|
|
EXIT_FAILURE=1
|
|
|
|
|
2013-11-02 05:15:37 +08:00
|
|
|
RM='rm -rf'
|
2011-07-01 05:36:34 +08:00
|
|
|
CP='cp'
|
2012-08-01 23:37:40 +08:00
|
|
|
DIRNAME='dirname'
|
|
|
|
LS='ls'
|
|
|
|
AWK='awk'
|
2011-07-01 05:36:34 +08:00
|
|
|
|
2003-04-04 04:00:42 +08:00
|
|
|
# initialize errors variable
|
2009-12-26 16:36:37 +08:00
|
|
|
nerrors=0
|
2003-04-04 04:00:42 +08:00
|
|
|
|
2011-07-01 05:36:34 +08:00
|
|
|
# source dirs
|
|
|
|
SRC_TOOLS="$srcdir/.."
|
|
|
|
SRC_TOOLS_TESTFILES="$SRC_TOOLS/testfiles"
|
|
|
|
|
|
|
|
# testfiles source dirs for tools
|
|
|
|
SRC_H5LS_TESTFILES="$SRC_TOOLS_TESTFILES"
|
|
|
|
SRC_H5DUMP_TESTFILES="$SRC_TOOLS_TESTFILES"
|
|
|
|
SRC_H5DIFF_TESTFILES="$SRC_TOOLS/h5diff/testfiles"
|
|
|
|
SRC_H5COPY_TESTFILES="$SRC_TOOLS/h5copy/testfiles"
|
|
|
|
SRC_H5REPACK_TESTFILES="$SRC_TOOLS/h5repack/testfiles"
|
|
|
|
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
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
# test files
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# All the test files copy from source directory to test directory
|
|
|
|
# NOTE: Keep this framework to add/remove test files.
|
|
|
|
# Any test files from other tools can be used in this framework.
|
|
|
|
# This list are also used for checking exist.
|
|
|
|
# Comment '#' without space can be used.
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
LIST_HDF5_TEST_FILES="
|
|
|
|
$SRC_H5IMPORT_TESTFILES/binfp64.h5
|
|
|
|
$SRC_H5IMPORT_TESTFILES/binin8.h5
|
|
|
|
$SRC_H5IMPORT_TESTFILES/binin8w.h5
|
|
|
|
$SRC_H5IMPORT_TESTFILES/binin16.h5
|
|
|
|
$SRC_H5IMPORT_TESTFILES/binin32.h5
|
|
|
|
$SRC_H5IMPORT_TESTFILES/binuin16.h5
|
|
|
|
$SRC_H5IMPORT_TESTFILES/binuin32.h5
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtfp32.h5
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtfp64.h5
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtin8.h5
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtin16.h5
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtin32.h5
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtuin16.h5
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtuin32.h5
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtstr.h5
|
2011-07-18 22:25:42 +08:00
|
|
|
$SRC_H5IMPORT_TESTFILES/textpfe.h5
|
2011-07-01 05:36:34 +08:00
|
|
|
"
|
|
|
|
|
|
|
|
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
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtin16.conf
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtin32.conf
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtuin16.conf
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtuin32.conf
|
|
|
|
$SRC_H5IMPORT_TESTFILES/textpfe.conf
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtstr.conf
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtfp32.txt
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtfp64.txt
|
2012-07-03 03:09:37 +08:00
|
|
|
$SRC_H5IMPORT_TESTFILES/txtuin16.txt
|
2011-07-01 05:36:34 +08:00
|
|
|
$SRC_H5IMPORT_TESTFILES/txtuin32.txt
|
2012-07-03 01:35:11 +08:00
|
|
|
$SRC_H5IMPORT_TESTFILES/txtin8.txt
|
2011-07-01 05:36:34 +08:00
|
|
|
$SRC_H5IMPORT_TESTFILES/txtin16.txt
|
|
|
|
$SRC_H5IMPORT_TESTFILES/txtin32.txt
|
2011-07-18 22:25:42 +08:00
|
|
|
$SRC_H5IMPORT_TESTFILES/textpfe64.txt
|
2011-07-01 05:36:34 +08:00
|
|
|
$SRC_H5IMPORT_TESTFILES/txtstr.txt
|
2012-07-20 03:53:17 +08:00
|
|
|
$SRC_H5IMPORT_TESTFILES/dbinfp64.h5.txt
|
|
|
|
$SRC_H5IMPORT_TESTFILES/dbinin8.h5.txt
|
|
|
|
$SRC_H5IMPORT_TESTFILES/dbinin8w.h5.txt
|
|
|
|
$SRC_H5IMPORT_TESTFILES/dbinin16.h5.txt
|
|
|
|
$SRC_H5IMPORT_TESTFILES/dbinin32.h5.txt
|
|
|
|
$SRC_H5IMPORT_TESTFILES/dbinuin16.h5.txt
|
|
|
|
$SRC_H5IMPORT_TESTFILES/dbinuin32.h5.txt
|
|
|
|
$SRC_H5IMPORT_TESTFILES/dtxtstr.h5.txt
|
2011-07-01 05:36:34 +08:00
|
|
|
"
|
|
|
|
|
|
|
|
#
|
|
|
|
# copy test files and expected output files from source dirs to test dir
|
|
|
|
#
|
|
|
|
COPY_TESTFILES="$LIST_HDF5_TEST_FILES $LIST_OTHER_TEST_FILES"
|
|
|
|
|
|
|
|
COPY_TESTFILES_TO_TESTDIR()
|
|
|
|
{
|
|
|
|
# copy test files. Used -f to make sure get a new copy
|
|
|
|
for tstfile in $COPY_TESTFILES
|
|
|
|
do
|
|
|
|
# ignore '#' comment
|
|
|
|
echo $tstfile | tr -d ' ' | grep '^#' > /dev/null
|
|
|
|
RET=$?
|
|
|
|
if [ $RET -eq 1 ]; then
|
2012-08-01 23:37:40 +08:00
|
|
|
# skip cp if srcdir is same as destdir
|
|
|
|
# this occurs when build/test performed in source dir and
|
|
|
|
# make cp fail
|
|
|
|
SDIR=`$DIRNAME $tstfile`
|
|
|
|
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
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo "Error: FAILED to copy $tstfile ."
|
|
|
|
|
|
|
|
# Comment out this to CREATE expected file
|
|
|
|
exit $EXIT_FAILURE
|
|
|
|
fi
|
2011-07-01 05:36:34 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2013-11-02 05:15:37 +08:00
|
|
|
CLEAN_TESTFILES_AND_TESTDIR()
|
|
|
|
{
|
|
|
|
# skip rm if srcdir is same as destdir
|
|
|
|
# this occurs when build/test performed in source dir and
|
|
|
|
# make cp fail
|
|
|
|
SDIR=`$DIRNAME $tstfile`
|
|
|
|
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
|
|
|
|
$RM $TESTDIR
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2003-04-04 04:00:42 +08:00
|
|
|
TESTING() {
|
|
|
|
SPACES=" "
|
|
|
|
echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
|
|
|
|
}
|
|
|
|
|
2012-07-26 21:54:06 +08:00
|
|
|
# Print a "SKIP" message
|
|
|
|
SKIP() {
|
|
|
|
TESTING $TESTNAME $@
|
|
|
|
echo " -SKIP-"
|
|
|
|
}
|
|
|
|
|
2003-04-04 04:00:42 +08:00
|
|
|
TOOLTEST()
|
|
|
|
{
|
|
|
|
err=0
|
2003-05-12 23:56:49 +08:00
|
|
|
$RUNSERIAL ./h5import $*
|
|
|
|
$RUNSERIAL ../h5dump/h5dump $5 >log2
|
2003-04-04 04:00:42 +08:00
|
|
|
|
2003-04-06 01:34:31 +08:00
|
|
|
cd tmp_testfiles
|
2003-05-12 23:56:49 +08:00
|
|
|
$RUNSERIAL ../../h5dump/h5dump $5 >log1
|
2003-04-04 04:00:42 +08:00
|
|
|
cd ..
|
|
|
|
|
2003-04-06 01:34:31 +08:00
|
|
|
cmp -s tmp_testfiles/log1 log2 || err=1
|
|
|
|
rm -f log2 tmp_testfiles/log1
|
2003-04-04 04:00:42 +08:00
|
|
|
if [ $err -eq 1 ]; then
|
2009-12-26 16:36:37 +08:00
|
|
|
nerrors="` expr $nerrors + 1 `";
|
2003-04-04 04:00:42 +08:00
|
|
|
echo "*FAILED*"
|
|
|
|
else
|
|
|
|
echo " PASSED"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2012-07-20 03:53:17 +08:00
|
|
|
# Use h5dump output as input to h5import for binary numbers
|
|
|
|
# Use h5diff to verify results
|
|
|
|
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
|
|
|
|
$CP -f $SRC_H5IMPORT_TESTFILES/d$2.txt 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
|
|
|
|
}
|
|
|
|
|
|
|
|
# Same as TOOLTEST2 except for strings
|
|
|
|
# Use h5dump output as input to h5import for strings
|
|
|
|
# Use h5diff to verify results
|
|
|
|
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
|
|
|
|
$CP -f $SRC_H5IMPORT_TESTFILES/d$2.txt log1
|
|
|
|
|
2012-07-23 23:58:30 +08:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
# Same as TOOLTEST3 except for h5diff uses report mode without warnings
|
|
|
|
# Use h5dump output as input to h5import for strings
|
|
|
|
# Use h5diff to verify results
|
|
|
|
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
|
|
|
|
$CP -f $SRC_H5IMPORT_TESTFILES/d$2.txt log1
|
|
|
|
|
|
|
|
|
2012-07-20 03:53:17 +08:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2003-04-04 04:00:42 +08:00
|
|
|
echo ""
|
|
|
|
echo "=============================="
|
|
|
|
echo "H5IMPORT tests started"
|
|
|
|
echo "=============================="
|
|
|
|
|
|
|
|
if [ -f h5import -a -f h5importtest ]; then
|
|
|
|
#echo "** Testing h5import ***"
|
|
|
|
|
2003-04-06 01:34:31 +08:00
|
|
|
rm -f output.h5 log1 tx* b* *.dat
|
|
|
|
|
2011-07-01 05:36:34 +08:00
|
|
|
# prepare for test
|
|
|
|
COPY_TESTFILES_TO_TESTDIR
|
|
|
|
|
2003-04-06 01:34:31 +08:00
|
|
|
mkdir tmp_testfiles
|
2011-07-01 05:36:34 +08:00
|
|
|
$CP $TESTDIR/*.h5 ./tmp_testfiles/
|
2003-04-04 04:00:42 +08:00
|
|
|
|
2003-05-12 23:56:49 +08:00
|
|
|
$RUNSERIAL ./h5importtest
|
2003-04-04 04:00:42 +08:00
|
|
|
|
2011-07-01 05:36:34 +08:00
|
|
|
################################################
|
2011-07-18 22:25:42 +08:00
|
|
|
### T H E T E S T S
|
2011-07-01 05:36:34 +08:00
|
|
|
################################################
|
|
|
|
|
2003-04-04 04:00:42 +08:00
|
|
|
TESTING "ASCII I32 rank 3 - Output BE " ;
|
2012-07-03 01:35:11 +08:00
|
|
|
TOOLTEST $TESTDIR/txtin32.txt -c $TESTDIR/txtin32.conf -o txtin32.h5
|
2003-04-04 04:00:42 +08:00
|
|
|
|
|
|
|
TESTING "ASCII I16 rank 3 - Output LE - CHUNKED - extended"
|
2011-07-01 05:36:34 +08:00
|
|
|
TOOLTEST $TESTDIR/txtin16.txt -c $TESTDIR/txtin16.conf -o txtin16.h5
|
2008-05-01 03:51:13 +08:00
|
|
|
|
2009-03-12 03:24:01 +08:00
|
|
|
TESTING "ASCII I8 - rank 3 - Output I8 LE-Chunked+Extended+Compressed "
|
2012-07-03 01:35:11 +08:00
|
|
|
TOOLTEST $TESTDIR/txtin8.txt -c $TESTDIR/txtin8.conf -o txtin8.h5
|
2003-04-04 04:00:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
TESTING "ASCII UI16 - rank 2 - Output LE+Chunked+Compressed "
|
2012-07-03 01:35:11 +08:00
|
|
|
TOOLTEST $TESTDIR/txtuin16.txt -c $TESTDIR/txtuin16.conf -o txtuin16.h5
|
2003-04-04 04:00:42 +08:00
|
|
|
|
2012-07-10 01:25:16 +08:00
|
|
|
TESTING "ASCII UI32 - rank 3 - Output BE"
|
|
|
|
TOOLTEST $TESTDIR/txtuin32.txt -c $TESTDIR/txtuin32.conf -o txtuin32.h5
|
|
|
|
|
|
|
|
|
2003-04-04 04:00:42 +08:00
|
|
|
TESTING "ASCII F32 - rank 3 - Output LE "
|
2011-07-01 05:36:34 +08:00
|
|
|
TOOLTEST $TESTDIR/txtfp32.txt -c $TESTDIR/txtfp32.conf -o txtfp32.h5
|
2008-05-01 03:51:13 +08:00
|
|
|
|
2003-04-04 04:00:42 +08:00
|
|
|
TESTING "ASCII F64 - rank 3 - Output BE + CHUNKED+Extended+Compressed "
|
2011-07-01 05:36:34 +08:00
|
|
|
TOOLTEST $TESTDIR/txtfp64.txt -c $TESTDIR/txtfp64.conf -o txtfp64.h5
|
2003-04-04 04:00:42 +08:00
|
|
|
|
2012-07-20 03:53:17 +08:00
|
|
|
|
2003-04-04 04:00:42 +08:00
|
|
|
TESTING "BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed "
|
2011-07-01 05:36:34 +08:00
|
|
|
TOOLTEST binfp64.bin -c $TESTDIR/binfp64.conf -o binfp64.h5
|
2012-07-20 03:53:17 +08:00
|
|
|
TESTING "H5DUMP-BINARY F64 - rank 3 - Output LE+CHUNKED+Extended+Compressed "
|
2012-07-26 21:54:06 +08:00
|
|
|
if test $USE_FILTER_DEFLATE != "yes"; then
|
|
|
|
SKIP "/fp/bin/64-bit" binfp64.h5
|
|
|
|
else
|
|
|
|
TOOLTEST2 "/fp/bin/64-bit" binfp64.h5
|
|
|
|
fi
|
2008-05-01 03:51:13 +08:00
|
|
|
|
2003-04-04 04:00:42 +08:00
|
|
|
|
|
|
|
TESTING "BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed "
|
2012-07-20 03:53:17 +08:00
|
|
|
TOOLTEST binin8.bin -c $TESTDIR/binin8.conf -o binin8.h5
|
|
|
|
TESTING "H5DUMP-BINARY I8 - rank 3 - Output I16LE + Chunked+Extended+Compressed "
|
2012-07-26 21:54:06 +08:00
|
|
|
if test $USE_FILTER_DEFLATE != "yes"; then
|
|
|
|
SKIP "/int/bin/8-bit" binin8.h5
|
|
|
|
else
|
|
|
|
TOOLTEST2 "/int/bin/8-bit" binin8.h5
|
|
|
|
fi
|
2008-05-01 03:51:13 +08:00
|
|
|
|
2012-07-10 01:25:16 +08:00
|
|
|
TESTING "BINARY I16 - rank 3 - Output order LE + CHUNKED + extended "
|
|
|
|
TOOLTEST binin16.bin -c $TESTDIR/binin16.conf -o binin16.h5
|
2012-07-20 03:53:17 +08:00
|
|
|
TESTING "H5DUMP-BINARY I16 - rank 3 - Output order LE + CHUNKED + extended "
|
|
|
|
TOOLTEST2 "/int/bin/16-bit" binin16.h5
|
2003-04-04 04:00:42 +08:00
|
|
|
|
|
|
|
TESTING "BINARY I32 - rank 3 - Output BE + CHUNKED "
|
2011-07-01 05:36:34 +08:00
|
|
|
TOOLTEST binin32.bin -c $TESTDIR/binin32.conf -o binin32.h5
|
2012-07-20 03:53:17 +08:00
|
|
|
TESTING "H5DUMP-BINARY I32 - rank 3 - Output BE + CHUNKED "
|
|
|
|
TOOLTEST2 "/int/bin/32-bit" binin32.h5
|
2008-05-01 03:51:13 +08:00
|
|
|
|
2003-04-04 04:00:42 +08:00
|
|
|
|
|
|
|
TESTING "BINARY UI16 - rank 3 - Output byte BE + CHUNKED "
|
2011-07-01 05:36:34 +08:00
|
|
|
TOOLTEST binuin16.bin -c $TESTDIR/binuin16.conf -o binuin16.h5
|
2012-07-20 03:53:17 +08:00
|
|
|
TESTING "H5DUMP-BINARY UI16 - rank 3 - Output byte BE + CHUNKED "
|
|
|
|
TOOLTEST2 "/int/buin/16-bit" binuin16.h5
|
2003-04-04 04:00:42 +08:00
|
|
|
|
|
|
|
TESTING "BINARY UI32 - rank 3 - Output LE + CHUNKED "
|
2011-07-01 05:36:34 +08:00
|
|
|
TOOLTEST binuin32.bin -c $TESTDIR/binuin32.conf -o binuin32.h5
|
2012-07-20 03:53:17 +08:00
|
|
|
TESTING "H5DUMP-BINARY UI32 - rank 3 - Output LE + CHUNKED "
|
|
|
|
TOOLTEST2 "/int/buin/32-bit" binuin32.h5
|
2008-05-01 03:51:13 +08:00
|
|
|
|
2003-04-04 04:00:42 +08:00
|
|
|
|
2007-08-08 00:19:11 +08:00
|
|
|
TESTING "STR"
|
2011-07-01 05:36:34 +08:00
|
|
|
TOOLTEST $TESTDIR/txtstr.txt -c $TESTDIR/txtstr.conf -o txtstr.h5
|
2012-07-20 03:53:17 +08:00
|
|
|
TESTING "H5DUMP-STR"
|
2012-09-06 03:04:00 +08:00
|
|
|
TOOLTEST4 "/mytext/data" txtstr.h5
|
2008-05-01 03:51:13 +08:00
|
|
|
|
2012-07-10 01:25:16 +08:00
|
|
|
|
2008-05-01 03:51:13 +08:00
|
|
|
TESTING "BINARY I8 CR LF EOF"
|
2011-07-01 05:36:34 +08:00
|
|
|
TOOLTEST binin8w.bin -c $TESTDIR/binin8w.conf -o binin8w.h5
|
2012-07-20 03:53:17 +08:00
|
|
|
TESTING "H5DUMP-BINARY I8 CR LF EOF"
|
|
|
|
TOOLTEST2 "/dataset0" binin8w.h5
|
2008-05-01 03:51:13 +08:00
|
|
|
|
2008-09-26 04:38:21 +08:00
|
|
|
TESTING "ASCII F64 - rank 1 - INPUT-CLASS TEXTFPE "
|
2011-07-18 22:28:11 +08:00
|
|
|
TOOLTEST $TESTDIR/textpfe64.txt -c $TESTDIR/textpfe.conf -o textpfe.h5
|
2008-09-26 04:38:21 +08:00
|
|
|
|
|
|
|
|
2012-07-20 03:53:17 +08:00
|
|
|
rm -f txtin32.txt txtin16.txt txtin8.txt txtuin32.txt txtuin16.txt *.bin *.dmp *.imp *.h5
|
2003-04-06 01:34:31 +08:00
|
|
|
rm -rf tmp_testfiles
|
2003-04-04 04:00:42 +08:00
|
|
|
else
|
2011-07-18 22:25:42 +08:00
|
|
|
echo "** h5import or h5importtest not available ***"
|
|
|
|
nerrors="` expr $nerrors + 1 `";
|
2003-04-04 04:00:42 +08:00
|
|
|
fi
|
|
|
|
|
2013-11-02 05:15:37 +08:00
|
|
|
# Clean up temporary files/directories
|
|
|
|
CLEAN_TESTFILES_AND_TESTDIR
|
|
|
|
|
2003-04-04 04:00:42 +08:00
|
|
|
#
|
|
|
|
# Check errors result
|
2009-12-26 16:36:37 +08:00
|
|
|
if test $nerrors -eq 0 ; then
|
|
|
|
echo "All $TESTNAME tests passed."
|
|
|
|
exit $EXIT_SUCCESS
|
2003-04-04 04:00:42 +08:00
|
|
|
else
|
2009-12-26 16:36:37 +08:00
|
|
|
echo "$TESTNAME tests failed with $nerrors errors."
|
|
|
|
exit $EXIT_FAILURE
|
2003-04-04 04:00:42 +08:00
|
|
|
fi
|