Skip to content

Commit

Permalink
Fix test scripts and update java tests
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF committed Nov 22, 2023
1 parent 72b3c1b commit 43e2721
Show file tree
Hide file tree
Showing 11 changed files with 138 additions and 186 deletions.
4 changes: 2 additions & 2 deletions HDF5Examples/C/H5D/test.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ else
version_compare "$H5_LIBVER" "1.10.8"
if [ "$version_lt" = 1 ]; then
USE_ALT="07"
nbitdir="110"
fi
nbitdir="110"
fi

for topic in $topics18
Expand All @@ -130,7 +130,7 @@ do
echo " Unsupported feature"
status=0
else
if [[ $fname == "h5ex_d_nbit"]]
if [[ $fname == "h5ex_d_nbit" ]]
then
tdir=$nbitdir
if [[ $USE_ALT == "" ]]
Expand Down
6 changes: 3 additions & 3 deletions HDF5Examples/C/H5G/test.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ $ECHO_N "Testing C/H5G/h5ex_g_create...$ECHO_C"
./h5ex_g_create
dumpout h5ex_g_create.h5 >tmp.test
rm -f h5ex_g_create.h5
cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_create.ddl
cmp -s tmp.test $srcdir/tfiles/16/h5ex_g_create.ddl
status=$?
if test $status -ne 0
then
Expand All @@ -70,7 +70,7 @@ else
exout ./h5ex_g_iterate >tmp.test
rm -f h5ex_g_iterate.h5
fi
cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_iterate.tst
cmp -s tmp.test $srcdir/tfiles/16/h5ex_g_iterate.tst
status=$?
if test $status -ne 0
then
Expand All @@ -90,7 +90,7 @@ else
exout ./h5ex_g_traverse >tmp.test
rm -f h5ex_g_traverse.h5
fi
cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_traverse.tst
cmp -s tmp.test $srcdir/tfiles/16/h5ex_g_traverse.tst
status=$?
if test $status -ne 0
then
Expand Down
41 changes: 21 additions & 20 deletions HDF5Examples/C/H5T/test.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,22 @@ do
then
echo " FAILED!"
else
dumpout $fname.h5 >tmp.test
rm -f $fname.h5
cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
if [[ $fname == "h5ex_t_cpxcmpd" || $fname == "h5ex_t_cpxcmpdatt" ]]
then
targ="-n"
else
targ=""
fi
dumpout $targ $fname.h5 >tmp.test
rm -f $fname.h5
cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
fi
return_val=`expr $status + $return_val`
done
Expand All @@ -87,13 +93,7 @@ done
#######Non-standard tests#######

USE_ALT=""
if [ "$H5_LIBVER_DIR" = "114" ]; then
# check if HDF5 version is < 1.14.3
version_compare "$H5_LIBVER" "1.10.3"
if [ "$version_lt" = 1 ]; then
USE_ALT="02"
fi
elif [ "$H5_LIBVER_DIR" = "110" ]; then
if [ "$H5_LIBVER_DIR" = "110" ]; then
# check if HDF5 version is < 1.10.7
version_compare "$H5_LIBVER" "1.10.7"
if [ "$version_lt" = 1 ]; then
Expand Down Expand Up @@ -159,13 +159,14 @@ do
then
echo " FAILED!"
else
dumpout -n $fname.h5 >tmp.test
dumpout $fname.h5 >tmp.test
rm -f $fname.h5
version_compare "$H5_LIBVER" "1.14.0"
version_compare "$H5_LIBVER" "1.14.3"
if [ "$version_lt" = 1 ]; then
cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl
else
cmp -s tmp.test $srcdir/tfiles/114/$fname$USE_ALT.ddl
cmp -s tmp.test $srcdir/tfiles/114/$fname.ddl
fi
status=$?
if test $status -ne 0
then
Expand Down
11 changes: 0 additions & 11 deletions HDF5Examples/C/H5T/tfiles/114/h5ex_t_vlen02.ddl

This file was deleted.

17 changes: 0 additions & 17 deletions HDF5Examples/C/H5T/tfiles/114/h5ex_t_vlenatt02.ddl

This file was deleted.

96 changes: 44 additions & 52 deletions HDF5Examples/FORTRAN/H5D/test.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ do
cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl
status=$?
if test $status -ne 0
then
# test to see if the only difference is because of big-endian and little-endian
\diff tmp.test $srcdir/tfiles/18/$fname.ddl > tmp.diff
then
# test to see if the only difference is because of big-endian and little-endian
diff tmp.test $srcdir/tfiles/18/$fname.ddl > tmp.diff
echo " "
NumOfFinds=`grep -c "DATATYPE" tmp.diff`
NumOfFinds=`expr $NumOfFinds \* 2`
Expand All @@ -137,80 +137,72 @@ done

#######Non-standard tests#######
USE_ALT=""
### Set default tfiles directory for tests
nbitdir="18"
version_compare "$H5_LIBVER" "1.8.23"
# check if HDF5 version is < 1.8.23
if [ "$version_lt" = 1 ]; then
USE_ALT="22"
nbitdir="18"
else
# check if HDF5 version is < 1.10.8
version_compare "$H5_LIBVER" "1.10.8"
if [ "$version_lt" = 1 ]; then
USE_ALT="07"
nbitdir="110"
fi
nbitdir="110"
fi

fname=h5ex_d_nbit
$ECHO_N "Testing FORTRAN/H5D/$fname...$ECHO_C"
exout ./$fname >tmp.test
status=$?
if test $status -eq 1
then
echo " Unsupported feature"
else
cmp -s tmp.test $srcdir/tfiles/18/$fname.tst
topics="nbit"
for topic in $topics18
do
fname=h5ex_d_$topic
$ECHO_N "Testing C/H5D/$fname...$ECHO_C"
exout ./$fname >tmp.test
status=$?
if test $status -ne 0
if test $status -eq 1
then
echo " FAILED!"
echo " Unsupported feature"
status=0
else
dumpout $fname.h5 >tmp.test
rm -f $fname.h5
cmp -s tmp.test $srcdir/tfiles/$nbitdir/$fname$USE_ALT.ddl
status=$?
if test $status -ne 0
if [[ $fname == "h5ex_d_nbit" ]]
then
echo " FAILED!"
tdir=$nbitdir
if [[ $USE_ALT == "" ]]
then
### set USE_ALT=07 if not set above
USE_ALT="07"
fi
else
echo " Passed"
tdir=18
### unset USE_ALT for the other topics
USE_ALT=""
fi
return_val=`expr $status + $return_val`
fi
return_val=`expr $status + $return_val`
fi

#Remove external data file from h5ex_d_extern
rm -f h5ex_d_extern.data


fname=h5ex_d_transform
$ECHO_N "Testing FORTRAN/H5D/$fname...$ECHO_C"
exout ./$fname >tmp.test
status=$?
if test $status -eq 1
then
echo " Unsupported feature"
else
cmp -s tmp.test $srcdir/tfiles/$H5_LIBVER_DIR/$fname.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
dumpout -n $fname.h5 >tmp.test
rm -f $fname.h5
cmp -s tmp.test $srcdir/tfiles/$H5_LIBVER_DIR/$fname$USE_ALT.ddl
cmp -s tmp.test $srcdir/tfiles/18/$fname.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
if [[ $fname == "h5ex_d_transform" ]]
then
targ="-n"
else
targ=""
fi
dumpout $targ $fname.h5 >tmp.test
rm -f $fname.h5
cmp -s tmp.test $srcdir/tfiles/$tdir/$fname$USE_ALT.ddl
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
fi
return_val=`expr $status + $return_val`
fi
return_val=`expr $status + $return_val`
fi
done


rm -f tmp.test
Expand Down
Loading

0 comments on commit 43e2721

Please sign in to comment.