Remove autotools files and docs (#5358)

This commit is contained in:
Allen Byrne
2025-03-14 13:28:44 -05:00
committed by GitHub
parent 41a7ef8e1e
commit 1602e1fbfe
226 changed files with 114 additions and 47367 deletions
-37
View File
@@ -1,37 +0,0 @@
#
# Copyright by The HDF Group.
# 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 LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
## Makefile.am
## Run automake to generate a Makefile.in from this file.
##
noinst_PROGRAMS = h5ex_d_rdwr h5ex_d_hyper h5ex_d_chunk h5ex_d_gzip \
h5ex_d_szip h5ex_d_nbit h5ex_d_soint h5ex_d_sofloat h5ex_d_extern \
h5ex_d_compact h5ex_d_unlimadd h5ex_d_unlimmod h5ex_d_unlimgzip \
h5ex_d_checksum h5ex_d_shuffle h5ex_d_transform h5ex_d_fillval h5ex_d_alloc
EXTRA_DIST = tfiles/h5ex_d_rdwr.tst tfiles/h5ex_d_hyper.tst tfiles/h5ex_d_chunk.tst \
tfiles/h5ex_d_gzip.tst tfiles/h5ex_d_szip.tst tfiles/h5ex_d_nbit.tst tfiles/h5ex_d_soint.tst \
tfiles/h5ex_d_sofloat.tst tfiles/h5ex_d_extern.tst tfiles/h5ex_d_compact.tst \
tfiles/h5ex_d_unlimadd.tst tfiles/h5ex_d_unlimmod.tst tfiles/h5ex_d_unlimgzip.tst \
tfiles/h5ex_d_checksum.tst tfiles/h5ex_d_shuffle.tst tfiles/h5ex_d_transform.tst \
tfiles/h5ex_d_fillval.tst tfiles/h5ex_d_alloc.tst \
tfiles/h5ex_d_rdwr.ddl tfiles/h5ex_d_hyper.ddl tfiles/h5ex_d_chunk.ddl \
tfiles/h5ex_d_gzip.ddl tfiles/h5ex_d_szip.ddl tfiles/h5ex_d_nbit.ddl tfiles/h5ex_d_soint.ddl \
tfiles/h5ex_d_sofloat.ddl tfiles/h5ex_d_extern.ddl tfiles/h5ex_d_compact.ddl \
tfiles/h5ex_d_unlimadd.ddl tfiles/h5ex_d_unlimmod.ddl tfiles/h5ex_d_unlimgzip.ddl \
tfiles/h5ex_d_checksum.ddl tfiles/h5ex_d_shuffle.ddl tfiles/h5ex_d_transform.ddl \
tfiles/h5ex_d_fillval.ddl tfiles/h5ex_d_alloc.ddl test.sh
TESTS = test.sh
CLEANFILES = Makefile test.sh
-179
View File
@@ -1,179 +0,0 @@
#! /bin/sh
#
# Copyright by The HDF Group.
# 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 LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
srcdir=@srcdir@
case $CC in
*/*) H5DUMP=`echo $CC | sed -e 's/\/[^/]*$/\/h5dump/'`;
test -x $H5DUMP || H5DUMP=h5dump;;
*) H5DUMP=h5dump;;
esac
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ;;
*c*,* ) ECHO_N=-n ECHO_C= ;;
*) ECHO_N= ECHO_C='\c' ;;
esac
ECHO_N="echo $ECHO_N"
exout() {
$*
}
dumpout() {
$H5DUMP $*
}
# compare current version, required version.
# returns if cur_ver < req_ver is true.
version_compare() {
version_lt=0
if [ ! "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ]; then
version_lt=1
fi
}
H5_LIBVER=@H5_LIBVER@
H5_LIBVER_DIR=@H5_LIBVER_DIR@
topics="alloc checksum chunk compact extern fillval gzip hyper \
rdwr shuffle szip unlimadd unlimgzip unlimmod"
topics18=""
version_compare "$H5_LIBVER" "1.8.0"
# check if HDF5 version is < 1.8.0
if [ "$version_lt" = 1 ]; then
dir16="\/16"
else
dir16=""
topics18="nbit sofloat soint transform"
fi
return_val=0
#Remove external data file from h5ex_d_extern
rm -f h5ex_d_extern.data
for topic in $topics
do
fname=h5ex_d_$topic
$ECHO_N "Testing C/H5D/$fname...$ECHO_C"
exout .$dir16/$fname >tmp.test
status=$?
if test $status -eq 1
then
echo " Unsupported feature"
status=0
else
cmp -s tmp.test $srcdir/tfiles/16/$fname.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
dumpout $fname.h5 >tmp.test
rm -f $fname.h5
cmp -s tmp.test $srcdir/tfiles/16/$fname.ddl
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
fi
return_val=`expr $status + $return_val`
fi
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"
else
# check if HDF5 version is >= 1.10.0 and < 1.10.8
version_compare "$H5_LIBVER" "1.10.0"
if [ "$version_lt" = 0 ]; then
version_compare "$H5_LIBVER" "1.10.8"
if [ "$version_lt" = 1 ]; then
USE_ALT="07"
nbitdir="110"
fi
fi
fi
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 -eq 1
then
echo " Unsupported feature"
status=0
else
if [[ $fname == "h5ex_d_nbit" ]]
then
tdir=$nbitdir
if [[ $USE_ALT == "" ]]
then
### set USE_ALT=07 if not set above
USE_ALT="07"
fi
else
tdir=18
### unset USE_ALT for the other topics
USE_ALT=""
fi
cmp -s tmp.test $srcdir/tfiles/18/$fname.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
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
done
#Remove external data file from h5ex_d_extern
rm -f h5ex_d_extern.data
rm -f tmp.test
echo "$return_val tests failed in C/H5D/"
exit $return_val
-28
View File
@@ -1,28 +0,0 @@
#
# Copyright by The HDF Group.
# 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 LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
## Makefile.am
## Run automake to generate a Makefile.in from this file.
##
noinst_PROGRAMS = h5ex_g_create h5ex_g_iterate h5ex_g_traverse \
h5ex_g_compact h5ex_g_corder h5ex_g_intermediate h5ex_g_phase h5ex_g_visit
EXTRA_DIST = tfiles/h5ex_g_create.ddl tfiles/h5ex_g_iterate.tst tfiles/h5ex_g_traverse.tst \
tfiles/h5ex_g_compact1.ddl tfiles/h5ex_g_compact2.ddl tfiles/h5ex_g_corder.tst \
tfiles/h5ex_g_intermediate.tst tfiles/h5ex_g_phase.tst tfiles/h5ex_g_visit.tst \
h5ex_g_iterate.h5 h5ex_g_traverse.h5 h5ex_g_visit.h5 \
test.sh
TESTS = test.sh
CLEANFILES = Makefile test.sh
-197
View File
@@ -1,197 +0,0 @@
#! /bin/sh
#
# Copyright by The HDF Group.
# 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 LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
srcdir=@srcdir@
case $CC in
*/*) H5DUMP=`echo $CC | sed -e 's/\/[^/]*$/\/h5dump/'`;
test -x $H5DUMP || H5DUMP=h5dump;;
*) H5DUMP=h5dump;;
esac
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ;;
*c*,* ) ECHO_N=-n ECHO_C= ;;
*) ECHO_N= ECHO_C='\c' ;;
esac
ECHO_N="echo $ECHO_N"
exout() {
$*
}
dumpout() {
$H5DUMP $*
}
H5_LIBVER=@H5_LIBVER@
H5_LIBVER_DIR=@H5_LIBVER_DIR@
return_val=0
$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/16/h5ex_g_create.ddl
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
return_val=`expr $status + $return_val`
$ECHO_N "Testing C/H5G/h5ex_g_iterate...$ECHO_C"
if test -f h5ex_g_iterate.h5
then
exout ./h5ex_g_iterate >tmp.test
else
cp $srcdir/h5ex_g_iterate.h5 h5ex_g_iterate.h5
exout ./h5ex_g_iterate >tmp.test
rm -f h5ex_g_iterate.h5
fi
cmp -s tmp.test $srcdir/tfiles/16/h5ex_g_iterate.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
return_val=`expr $status + $return_val`
$ECHO_N "Testing C/H5G/h5ex_g_traverse...$ECHO_C"
if test -f h5ex_g_traverse.h5
then
exout ./h5ex_g_traverse >tmp.test
else
cp $srcdir/h5ex_g_traverse.h5 h5ex_g_traverse.h5
exout ./h5ex_g_traverse >tmp.test
rm -f h5ex_g_traverse.h5
fi
cmp -s tmp.test $srcdir/tfiles/16/h5ex_g_traverse.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
return_val=`expr $status + $return_val`
$ECHO_N "Testing C/H5G/h5ex_g_visit...$ECHO_C"
if test -f h5ex_g_visit.h5
then
exout ./h5ex_g_visit >tmp.test
else
cp $srcdir/h5ex_g_visit.h5 h5ex_g_visit.h5
exout ./h5ex_g_visit >tmp.test
rm -f h5ex_g_visit.h5
fi
cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_visit.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
return_val=`expr $status + $return_val`
$ECHO_N "Testing C/H5G/h5ex_g_compact...$ECHO_C"
exout ./h5ex_g_compact >tmp.test
cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_compact.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
dumpout h5ex_g_compact1.h5 >tmp.test
cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_compact1.ddl
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
dumpout h5ex_g_compact2.h5 >tmp.test
cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_compact2.ddl
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
fi
fi
return_val=`expr $status + $return_val`
rm -f h5ex_g_compact1.h5
rm -f h5ex_g_compact2.h5
$ECHO_N "Testing C/H5G/h5ex_g_phase...$ECHO_C"
exout ./h5ex_g_phase >tmp.test
cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_phase.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
return_val=`expr $status + $return_val`
rm -f h5ex_g_phase.h5
$ECHO_N "Testing C/H5G/h5ex_g_corder...$ECHO_C"
exout ./h5ex_g_corder >tmp.test
cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_corder.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
return_val=`expr $status + $return_val`
rm -f h5ex_g_corder.h5
$ECHO_N "Testing C/H5G/h5ex_g_intermediate...$ECHO_C"
exout ./h5ex_g_intermediate >tmp.test
cmp -s tmp.test $srcdir/tfiles/18/h5ex_g_intermediate.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
return_val=`expr $status + $return_val`
rm -f h5ex_g_intermediate.h5
rm -f tmp.test
echo "$return_val tests failed in C/H5G/"
exit $return_val
-46
View File
@@ -1,46 +0,0 @@
#
# Copyright by The HDF Group.
# 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 LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
## Makefile.am
## Run automake to generate a Makefile.in from this file.
##
noinst_PROGRAMS = h5ex_t_int h5ex_t_intatt h5ex_t_float h5ex_t_floatatt \
h5ex_t_enum h5ex_t_enumatt h5ex_t_bit h5ex_t_bitatt h5ex_t_opaque \
h5ex_t_opaqueatt h5ex_t_array h5ex_t_arrayatt h5ex_t_vlen h5ex_t_vlenatt \
h5ex_t_string h5ex_t_stringatt h5ex_t_vlstring h5ex_t_vlstringatt h5ex_t_cmpd \
h5ex_t_cmpdatt h5ex_t_cpxcmpd h5ex_t_cpxcmpdatt h5ex_t_objref h5ex_t_objrefatt \
h5ex_t_regref h5ex_t_regrefatt h5ex_t_commit h5ex_t_convert
EXTRA_DIST = tfiles/h5ex_t_int.tst tfiles/h5ex_t_intatt.tst tfiles/h5ex_t_float.tst \
tfiles/h5ex_t_floatatt.tst tfiles/h5ex_t_enum.tst tfiles/h5ex_t_enumatt.tst tfiles/h5ex_t_bit.tst \
tfiles/h5ex_t_bitatt.tst tfiles/h5ex_t_opaque.tst tfiles/h5ex_t_opaqueatt.tst tfiles/h5ex_t_array.tst \
tfiles/h5ex_t_arrayatt.tst tfiles/h5ex_t_vlen.tst tfiles/h5ex_t_vlenatt.tst tfiles/h5ex_t_string.tst \
tfiles/h5ex_t_stringatt.tst tfiles/h5ex_t_vlstring.tst tfiles/h5ex_t_vlstringatt.tst \
tfiles/h5ex_t_cmpd.tst tfiles/h5ex_t_cmpdatt.tst tfiles/h5ex_t_cpxcmpd.tst \
tfiles/h5ex_t_cpxcmpdatt.tst tfiles/h5ex_t_objref.tst tfiles/h5ex_t_objrefatt.tst \
tfiles/h5ex_t_regref.tst tfiles/h5ex_t_regrefatt.tst tfiles/h5ex_t_commit.tst \
tfiles/h5ex_t_convert.tst \
tfiles/h5ex_t_int.ddl tfiles/h5ex_t_intatt.ddl tfiles/h5ex_t_float.ddl \
tfiles/h5ex_t_floatatt.ddl tfiles/h5ex_t_enum.ddl tfiles/h5ex_t_enumatt.ddl tfiles/h5ex_t_bit.ddl \
tfiles/h5ex_t_bitatt.ddl tfiles/h5ex_t_opaque.ddl tfiles/h5ex_t_opaqueatt.ddl tfiles/h5ex_t_array.ddl \
tfiles/h5ex_t_arrayatt.ddl tfiles/h5ex_t_vlen.ddl tfiles/h5ex_t_vlenatt.ddl tfiles/h5ex_t_string.ddl \
tfiles/h5ex_t_stringatt.ddl tfiles/h5ex_t_vlstring.ddl tfiles/h5ex_t_vlstringatt.ddl \
tfiles/h5ex_t_cmpd.ddl tfiles/h5ex_t_cmpdatt.ddl tfiles/h5ex_t_cpxcmpd.ddl \
tfiles/h5ex_t_cpxcmpdatt.ddl tfiles/h5ex_t_objref.ddl tfiles/h5ex_t_objrefatt.ddl \
tfiles/h5ex_t_regref.ddl tfiles/h5ex_t_regrefatt.ddl tfiles/h5ex_t_commit.ddl \
tfiles/h5ex_t_convert.ddl test.sh
TESTS = test.sh
CLEANFILES = Makefile test.sh
-201
View File
@@ -1,201 +0,0 @@
#! /bin/sh
#
# Copyright by The HDF Group.
# 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 LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
srcdir=@srcdir@
case $CC in
*/*) H5DUMP=`echo $CC | sed -e 's/\/[^/]*$/\/h5dump/'`;
test -x $H5DUMP || H5DUMP=h5dump;;
*) H5DUMP=h5dump;;
esac
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ;;
*c*,* ) ECHO_N=-n ECHO_C= ;;
*) ECHO_N= ECHO_C='\c' ;;
esac
ECHO_N="echo $ECHO_N"
exout() {
$*
}
dumpout() {
$H5DUMP $*
}
# compare current version, required version.
# returns if cur_ver < req_ver is true.
version_compare() {
version_lt=0
if [ ! "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ]; then
version_lt=1
fi
}
H5_LIBVER=@H5_LIBVER@
H5_LIBVER_DIR=@H5_LIBVER_DIR@
topics="array arrayatt bit bitatt cmpd cmpdatt cpxcmpd cpxcmpdatt enum enumatt float floatatt \
int intatt opaque opaqueatt string stringatt vlstring vlstringatt \
commit"
return_val=0
for topic in $topics
do
fname=h5ex_t_$topic
$ECHO_N "Testing C/H5T/$fname...$ECHO_C"
exout ./$fname >tmp.test
cmp -s tmp.test $srcdir/tfiles/16/$fname.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
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
#######Non-standard tests#######
USE_ALT=""
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
USE_ALT="06"
fi
else
if [ "$H5_LIBVER_DIR" = "18" ]; then
# check if HDF5 version is < 1.8.22
version_compare "$H5_LIBVER" "1.8.22"
if [ "$version_lt" = 1 ]; then
USE_ALT="21"
fi
fi
fi
topics="objref objrefatt regref regrefatt"
for topic in $topics
do
fname=h5ex_t_$topic
$ECHO_N "Testing C/H5T/$fname...$ECHO_C"
exout ./$fname >tmp.test
cmp -s tmp.test $srcdir/tfiles/16/$fname.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
dumpout $fname.h5 >tmp.test
rm -f $fname.h5
version_compare "$H5_LIBVER" "1.10.0"
if [ "$version_lt" = 1 ]; then
cmp -s tmp.test $srcdir/tfiles/18/$fname$USE_ALT.ddl
else
version_compare "$H5_LIBVER" "1.12.0"
if [ "$version_lt" = 1 ]; then
version_compare "$H5_LIBVER" "1.10.7"
if [ "$version_lt" = 1 ]; then
cmp -s tmp.test $srcdir/tfiles/110/$fname$USE_ALT.ddl
else
cmp -s tmp.test $srcdir/tfiles/18/$fname.ddl
fi
else
cmp -s tmp.test $srcdir/tfiles/112/$fname.ddl
fi
fi
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
fi
return_val=`expr $status + $return_val`
done
topics="vlen vlenatt"
for topic in $topics
do
fname=h5ex_t_$topic
$ECHO_N "Testing C/H5T/$fname...$ECHO_C"
exout ./$fname >tmp.test
cmp -s tmp.test $srcdir/tfiles/16/$fname.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
dumpout $fname.h5 >tmp.test
rm -f $fname.h5
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.ddl
fi
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
fi
return_val=`expr $status + $return_val`
done
fname=h5ex_t_convert
$ECHO_N "Testing C/H5T/$fname...$ECHO_C"
exout ./$fname >tmp.test
cmp -s tmp.test $srcdir/tfiles/16/$fname.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
return_val=`expr $status + $return_val`
rm -f tmp.test
echo "$return_val tests failed in C/H5T/"
exit $return_val
-49
View File
@@ -1,49 +0,0 @@
#
# Copyright by The HDF Group.
# 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 LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
## Makefile.am
## Run automake to generate a Makefile.in from this file.
##
noinst_PROGRAMS = \
h5ex_vds \
h5ex_vds-exc \
h5ex_vds-exclim \
h5ex_vds-eiger \
h5ex_vds-simpleIO \
h5ex_vds-percival \
h5ex_vds-percival-unlim \
h5ex_vds-percival-unlim-maxmin
EXTRA_DIST = \
tfiles/h5ex_vds.tst \
tfiles/h5ex_vds-exc.tst \
tfiles/h5ex_vds-exclim.tst \
tfiles/h5ex_vds-eiger.tst \
tfiles/h5ex_vds-simpleIO.tst \
tfiles/h5ex_vds-percival.tst \
tfiles/h5ex_vds-percival-unlim.tst \
tfiles/h5ex_vds-percival-unlim-maxmin.tst \
tfiles/h5ex_vds.ddl \
tfiles/h5ex_vds-exc.ddl \
tfiles/h5ex_vds-exclim.ddl \
tfiles/h5ex_vds-eiger.ddl \
tfiles/h5ex_vds-simpleIO.ddl \
tfiles/h5ex_vds-percival.ddl \
tfiles/h5ex_vds-percival-unlim.ddl \
tfiles/h5ex_vds-percival-unlim-maxmin.ddl \
test.sh
TESTS = test.sh
CLEANFILES = Makefile test.sh
-96
View File
@@ -1,96 +0,0 @@
#! /bin/sh
#
# Copyright by The HDF Group.
# 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 LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
srcdir=@srcdir@
case $CC in
*/*) H5DUMP=`echo $CC | sed -e 's/\/[^/]*$/\/h5dump/'`;
test -x $H5DUMP || H5DUMP=h5dump;;
*) H5DUMP=h5dump;;
esac
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ;;
*c*,* ) ECHO_N=-n ECHO_C= ;;
*) ECHO_N= ECHO_C='\c' ;;
esac
ECHO_N="echo $ECHO_N"
exout() {
$*
}
dumpout() {
$H5DUMP $*
}
# compare current version, required version.
# returns if cur_ver < req_ver is true.
version_compare() {
version_lt=0
if [ ! "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ]; then
version_lt=1
fi
}
H5_LIBVER=@H5_LIBVER@
H5_LIBVER_DIR=@H5_LIBVER_DIR@
topics=""
topics110="vds vds-exc vds-exclim vds-eiger vds-simpleIO vds-percival vds-percival-unlim vds-percival-unlim-maxmin"
return_val=0
version_compare "$H5_LIBVER" "1.10.0"
if [ "$version_lt" = 0 ]; then
for topic in $topics110
do
fname=h5ex_$topic
$ECHO_N "Testing C/H5VDS/$fname...$ECHO_C"
exout ./$fname >tmp.test
status=$?
if test $status -eq 1
then
echo " Unsupported feature"
status=0
else
cmp -s tmp.test $srcdir/tfiles/110/$fname.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
dumpout $fname.h5 >tmp.test
rm -f $fname.h5
cmp -s tmp.test $srcdir/tfiles/110/$fname.ddl
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
fi
return_val=`expr $status + $return_val`
fi
done
fi
rm -f tmp.test
echo "$return_val tests failed in C/H5VDS/"
exit $return_val
-53
View File
@@ -1,53 +0,0 @@
#
# Copyright by The HDF Group.
# 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 LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
## Makefile.am
## Run automake to generate a Makefile.in from this file.
##
noinst_PROGRAMS = h5ex_lite1 h5ex_lite2 h5ex_lite3 h5ex_ptExampleFL \
h5ex_image1 h5ex_image2 \
h5ex_table_01 h5ex_table_02 h5ex_table_03 h5ex_table_04 \
h5ex_table_05 h5ex_table_06 h5ex_table_07 h5ex_table_08 \
h5ex_table_09 h5ex_table_10 h5ex_table_11 h5ex_table_12 \
h5ex_ds1
# ex_lite2 uses a file created by ex_lite1
ex_lite2.chkexe_: ex_lite1.chkexe_
# List dependencies for each program. Normally, automake would take
# care of this for us, but if we tell automake about the programs it
# will try to build them with the normal C compiler, not h5cc. This is
# an inelegant way of solving the problem.
# All programs share the same build rule and a dependency on the main hdf5
# library above.
ex_lite1: $(srcdir)/ex_lite1.c
ex_lite2: $(srcdir)/ex_lite2.c
ex_lite3: $(srcdir)/ex_lite3.c
ptExampleFL: $(srcdir)/ptExampleFL.c
ex_image1: $(srcdir)/ex_image1.c
ex_image2: $(srcdir)/ex_image2.c
ex_table01: $(srcdir)/ex_table01.c
ex_table02: $(srcdir)/ex_table02.c
ex_table03: $(srcdir)/ex_table03.c
ex_table04: $(srcdir)/ex_table04.c
ex_table05: $(srcdir)/ex_table05.c
ex_table06: $(srcdir)/ex_table06.c
ex_table07: $(srcdir)/ex_table07.c
ex_table08: $(srcdir)/ex_table08.c
ex_table09: $(srcdir)/ex_table09.c
ex_table10: $(srcdir)/ex_table10.c
ex_table11: $(srcdir)/ex_table11.c
ex_table12: $(srcdir)/ex_table12.c
TESTS = test.sh
CLEANFILES = Makefile test.sh
-111
View File
@@ -1,111 +0,0 @@
#! /bin/sh
#
# Copyright by The HDF Group.
# 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 LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
srcdir=@srcdir@
case $CC in
*/*) H5DUMP=`echo $CC | sed -e 's/\/[^/]*$/\/h5dump/'`;
test -x $H5DUMP || H5DUMP=h5dump;;
*) H5DUMP=h5dump;;
esac
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ;;
*c*,* ) ECHO_N=-n ECHO_C= ;;
*) ECHO_N= ECHO_C='\c' ;;
esac
ECHO_N="echo $ECHO_N"
exout() {
$*
}
dumpout() {
$H5DUMP $*
}
# compare current version, required version.
# returns if cur_ver < req_ver is true.
version_compare() {
version_lt=0
if [ ! "$(printf '%s\n' "$1" "$2" | sort -V | head -n1)" = "$2" ]; then
version_lt=1
fi
}
H5_LIBVER=@H5_LIBVER@
H5_LIBVER_DIR=@H5_LIBVER_DIR@
topics="h5ex_lite3 h5ex_packet_table_FL \
h5ex_image1 h5ex_image2 \
h5ex_table_01 h5ex_table_02 h5ex_table_03 h5ex_table_04 \
h5ex_table_05 h5ex_table_06 h5ex_table_07 h5ex_table_08 \
h5ex_table_09 h5ex_table_10 h5ex_table_11 h5ex_table_12 \
h5ex_ds1"
return_val=0
for topic in $topics
do
fname=$topic
$ECHO_N "Testing C/H5T/$fname...$ECHO_C"
exout ./$fname >tmp.test
cmp -s tmp.test $srcdir/tfiles/16/$fname.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
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
$ECHO_N "Testing C/HL/h5ex_lite1...$ECHO_C"
exout ./h5ex_lite1 >tmp.test
cmp -s tmp.test $srcdir/tfiles/h5ex_lite1.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
$ECHO_N "Testing C/HL/h5ex_lite2...$ECHO_C"
exout ./h5ex_lite2 >tmp.test
cmp -s tmp.test $srcdir/tfiles/h5ex_lite2.tst
status=$?
if test $status -ne 0
then
echo " FAILED!"
else
echo " Passed"
fi
fi
return_val=`expr $status + $return_val`
rm -f tmp.test
echo "$return_val tests failed in C/H5T/"
exit $return_val
-29
View File
@@ -1,29 +0,0 @@
#
# Copyright by The HDF Group.
# 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 LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
## Makefile.am
## Run automake to generate a Makefile.in from this file.
##
if H5D
DO_H5D=H5D
endif
if H5G
DO_H5G=H5G
endif
if H5T
DO_H5T=H5T
endif
SUBDIRS = $(DO_H5D) $(DO_H5G) $(DO_H5T)
-17
View File
@@ -1,17 +0,0 @@
#
# Copyright by The HDF Group.
# All rights reserved.
#
##
## Makefile.am
## Run automake to generate a Makefile.in from this file.
##
noinst_PROGRAMS = h5slabread h5slabwrite h5efc
EXTRA_DIST =
AM_CPPFLAGS = '-D H5_USE_112_API'
TESTS = test.sh
CLEANFILES = Makefile test.sh
-119
View File
@@ -1,119 +0,0 @@
#
# Copyright by The HDF Group.
# 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 LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
##
## Makefile.am
## Run automake to generate a Makefile.in from this file.
##
#
# HDF5 Library Examples Makefile(.in)
#
include $(top_srcdir)/config/commence.am
INSTALL_SCRIPT_FILES = run-c-ex.sh
INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh
INSTALL_TOP_FILES = README
# Example programs.
# Don't tell automake about them, because if it knew they were programs,
# it would try to compile them instead of using the h5cc script.
# Use the boilerplate in config/examples.am instead.
EXAMPLE_PROG = h5_write h5_read h5_extend_write h5_chunk_read h5_compound \
h5_crtgrpd h5_subset h5_cmprss h5_rdwt h5_crtgrpar h5_extend \
h5_crtatt h5_crtgrp h5_crtdat \
h5_group h5_select h5_attribute h5_mount h5_drivers \
h5_reference_deprec h5_ref_extern h5_ref_compat h5_ref2reg_deprec \
h5_extlink h5_elink_unix2win h5_shared_mesg h5_debug_trace
TEST_SCRIPT=testh5cc.sh
TEST_EXAMPLES_SCRIPT=$(INSTALL_SCRIPT_FILES)
# Install files
# List all file that should be installed in examples directory
INSTALL_FILES = h5_write.c h5_read.c h5_extend_write.c h5_chunk_read.c h5_compound.c \
h5_crtgrpd.c h5_subset.c h5_cmprss.c h5_rdwt.c h5_crtgrpar.c h5_extend.c \
h5_crtatt.c h5_crtgrp.c h5_crtdat.c \
h5_group.c h5_select.c h5_attribute.c h5_mount.c h5_drivers.c \
h5_reference_deprec.c h5_ref_extern.c h5_ref_compat.c h5_ref2reg_deprec.c \
h5_extlink.c h5_elink_unix2win.c h5_shared_mesg.c h5_debug_trace.c
# How to build examples, using installed version of h5cc
if BUILD_PARALLEL_CONDITIONAL
$(EXTRA_PROG): $(H5CC_PP)
$(H5CC_PP) $(H5CCFLAGS) $(CFLAGS) -o $@ $(srcdir)/$@.c;
else
$(EXTRA_PROG): $(H5CC)
$(H5CC) $(H5CCFLAGS) $(CFLAGS) -o $@ $(srcdir)/$@.c;
endif
# Some examples depend on files created by other examples.
h5_read.chkexe_: h5_write.chkexe_
h5_chunk_read.chkexe_: h5_extend_write.chkexe_
h5_crtgrpd.chkexe_: h5_crtgrpar.chkexe_
# h5_rdwt and h5_crtatt both modify the same file created by
# h5_crtdat. Serialize them.
h5_rdwt.chkexe_: h5_crtdat.chkexe_
h5_crtatt.chkexe_: h5_rdwt.chkexe_
# The external link examples demonstrate how to use paths; they need
# directories to be created to do this.
EXTLINK_DIRS=red blue u2w
$(EXTLINK_DIRS):
echo $(mkdir_p) $@
$(mkdir_p) $@
CHECK_CLEANFILES+=$(EXTLINK_DIRS)
# Example directory
# Note: no '/' after DESTDIR. Explanation in commence.am
EXAMPLEDIR=${DESTDIR}$(examplesdir)/c
EXAMPLETOPDIR=${DESTDIR}$(examplesdir)
# List dependencies for each program. Normally, automake would take
# care of this for us, but if we tell automake about the programs it
# will try to build them with the normal C compiler, not h5cc. This is
# an inelegant way of solving the problem.
# All programs share the same build rule and a dependency on the main hdf5
# library above.
h5_chunk_read: $(srcdir)/h5_chunk_read.c
h5_compound: $(srcdir)/h5_compound.c
h5_crtgrpd: $(srcdir)/h5_crtgrpd.c
h5_subset: $(srcdir)/h5_subset.c
h5_cmprss: $(srcdir)/h5_cmprss.c
h5_rdwt: $(srcdir)/h5_rdwt.c
h5_crtgrpar: $(srcdir)/h5_crtgrpar.c
h5_extend: $(srcdir)/h5_extend.c
h5_crtatt: $(srcdir)/h5_crtatt.c
h5_crtgrp: $(srcdir)/h5_crtgrp.c
h5_crtdat: $(srcdir)/h5_crtdat.c
h5_extend_write: $(srcdir)/h5_extend_write.c
h5_group: $(srcdir)/h5_group.c
h5_write: $(srcdir)/h5_write.c
h5_read: $(srcdir)/h5_read.c
h5_select: $(srcdir)/h5_select.c
h5_attribute: $(srcdir)/h5_attribute.c
h5_mount: $(srcdir)/h5_mount.c
h5_ref_compat: $(srcdir)/h5_ref_compat.c
h5_ref_extern: $(srcdir)/h5_ref_extern.c
h5_reference_deprec: $(srcdir)/h5_reference_deprec.c
h5_ref2reg_deprec: $(srcdir)/h5_ref2reg_deprec.c
h5_drivers: $(srcdir)/h5_drivers.c
h5_dtransform: $(srcdir)/h5_dtransform.c
h5_extlink: $(srcdir)/h5_extlink.c $(EXTLINK_DIRS)
h5_elink_unix2win: $(srcdir)/h5_elink_unix2win.c $(EXTLINK_DIRS)
h5_shared_mesg: $(srcdir)/h5_shared_mesg.c
if BUILD_SHARED_SZIP_CONDITIONAL
LD_LIBRARY_PATH=$(LL_PATH)
endif
include $(top_srcdir)/config/examples.am
include $(top_srcdir)/config/conclude.am
-44
View File
@@ -1,44 +0,0 @@
#! /bin/sh
#
# Copyright by The HDF Group.
# 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 LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
# This file: run-hl-ex.sh
# Written by: Larry Knox
# Date: May 11, 2010
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# This script will run the scripts to compile and run the installed hdf5 #
# examples. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
echo "Run c examples"
if ((cd c; sh ./run-c-ex.sh) && \
(if test -d fortran; then
echo "Run fortran examples"
cd fortran; sh ./run-fortran-ex.sh
fi)
(if test -d c++; then
echo "Run c++ examples"
cd c++; sh ./run-c++-ex.sh
fi)
(if test -d hl; then
echo "Run hl examples."
cd hl; sh ./run-hl-ex.sh
fi)); then
echo "Done"
exit 0
else
exit 1
fi
-172
View File
@@ -1,172 +0,0 @@
#! /bin/sh
#
# Copyright by The HDF Group.
# 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 LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
# This file: run-c-ex.sh
# Written by: Larry Knox
# Date: May 11, 2010
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# This script will compile and run the c examples from source files installed #
# in @examplesdir@/c using h5cc or h5pc. The order for running #
# programs with RunTest in the MAIN section below is taken from the Makefile. #
# The order is important since some of the test programs use data files created #
# by earlier test programs. Any future additions should be placed accordingly. #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Initializations
EXIT_SUCCESS=0
EXIT_FAILURE=1
#
# Try to derive the path to the installation $prefix established
# by ./configure relative to the examples directory established by
# ./configure. If successful, set `prefix_relto_examplesdir` to the
# relative path. Otherwise, set `prefix_relto_examplesdir` to the
# absolute installation $prefix.
#
# This script uses the value of `prefix` in the user's environment, if
# it is set, below. The content of $() is evaluated in a sub-shell, so
# if `prefix` is set in the user's environment, the shell statements in
# $() won't clobbered it.
#
prefix_relto_examplesdir=$(
prefix=@prefix@
examplesdir=@examplesdir@
if [ ${examplesdir##${prefix}/} != ${examplesdir} ]; then
echo $(echo ${examplesdir##${prefix}/} | \
sed 's,[^/][^/]*,..,g')
else
echo $prefix
fi
)
# Where the tool is installed.
# default is relative path to installed location of the tools
prefix="${prefix:-../${prefix_relto_examplesdir}}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
AR="@AR@"
RANLIB="@RANLIB@"
if [ "$PARALLEL" = no ]; then
H5TOOL="h5cc" # The tool name
else
H5TOOL="h5pcc" # The tool name
fi
H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary
#### Run test ####
RunTest()
{
TEST_EXEC=$1
Test=$1".c"
echo
echo "################# $1 #################"
${H5TOOL_BIN} -o $TEST_EXEC $Test
if [ $? -ne 0 ]
then
echo "messed up compiling $Test"
exit 1
fi
./$TEST_EXEC
}
################## MAIN ##################
if ! test -d red; then
mkdir red
fi
if ! test -d blue; then
mkdir blue
fi
if ! test -d u2w; then
mkdir u2w
fi
# Run tests
if [ $? -eq 0 ]
then
if (RunTest h5_crtdat &&\
rm h5_crtdat &&\
RunTest h5_extend &&\
rm h5_extend &&\
RunTest h5_rdwt &&\
rm h5_rdwt &&\
RunTest h5_crtatt &&\
rm h5_crtatt &&\
RunTest h5_crtgrp &&\
rm h5_crtgrp &&\
RunTest h5_crtgrpar &&\
rm h5_crtgrpar &&\
RunTest h5_crtgrpd &&\
rm h5_crtgrpd &&\
RunTest h5_subset &&\
rm h5_subset &&\
RunTest h5_cmprss &&\
rm h5_cmprss &&\
RunTest h5_write &&\
rm h5_write &&\
RunTest h5_read &&\
rm h5_read &&\
RunTest h5_extend_write &&\
rm h5_extend_write &&\
RunTest h5_chunk_read &&\
rm h5_chunk_read &&\
RunTest h5_compound &&\
rm h5_compound &&\
RunTest h5_group &&\
rm h5_group &&\
RunTest h5_select &&\
rm h5_select &&\
RunTest h5_attribute &&\
rm h5_attribute &&\
RunTest h5_mount &&\
rm h5_mount &&\
RunTest h5_reference_deprec &&\
rm h5_reference_deprec &&\
RunTest h5_ref_extern &&\
rm h5_ref_extern &&\
RunTest h5_ref_compat &&\
rm h5_ref_compat &&\
RunTest h5_drivers &&\
rm h5_drivers &&\
RunTest h5_ref2reg_deprec &&\
rm h5_ref2reg_deprec &&\
RunTest h5_extlink &&\
rm h5_extlink &&\
RunTest h5_elink_unix2win &&\
rm h5_elink_unix2win &&\
OLD_DEBUG_STRING=$HDF5_DEBUG &&\
export HDF5_DEBUG="+all +trace +ttimes" &&\
RunTest h5_debug_trace &&\
HDF5_DEBUG=$OLD_DEBUG_STRING &&\
rm h5_debug_trace &&\
RunTest h5_shared_mesg &&\
rm h5_shared_mesg); then
EXIT_VALUE=${EXIT_SUCCESS}
else
EXIT_VALUE=${EXIT_FAILURE}
fi
fi
# Cleanup
rm *.o
rm *.h5
rm -rf red blue u2w
echo
exit $EXIT_VALUE
-571
View File
@@ -1,571 +0,0 @@
#! /bin/sh
#
# Copyright by The HDF Group.
# 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 LICENSE file, which can be found at the root of the source code
# distribution tree, or in https://www.hdfgroup.org/licenses.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
# Tests for the h5cc compiler tool
srcdir=@srcdir@
# Initializations
TESTNAME=h5cc
EXIT_SUCCESS=0
EXIT_FAILURE=1
# Where the tool is installed.
prefix="${prefix:-@prefix@}"
PARALLEL=@PARALLEL@ # Am I in parallel mode?
AR="@AR@"
RANLIB="@RANLIB@"
if [ "$PARALLEL" = no ]; then
H5TOOL="h5cc" # The tool name
else
H5TOOL="h5pcc" # The tool name
fi
H5TOOL_BIN="${prefix}/bin/${H5TOOL}" # The path of the tool binary
CMP='cmp -s'
DIFF='diff -c'
nerrors=$EXIT_SUCCESS
verbose=${HDF5_VERBOSE:-1} # 0: none; 1: default; 2: chatty; 3: everything
test $verbose -gt 2 && set -x
H5_NO_DEPRECATED_SYMBOLS=`grep '#define H5_NO_DEPRECATED_SYMBOLS ' ../src/H5pubconf.h`
H5_USE_16_API_DEFAULT=`grep '#define H5_USE_16_API_DEFAULT ' ../src/H5pubconf.h`
H5_USE_18_API_DEFAULT=`grep '#define H5_USE_18_API_DEFAULT ' ../src/H5pubconf.h`
H5_USE_110_API_DEFAULT=`grep '#define H5_USE_110_API_DEFAULT ' ../src/H5pubconf.h`
H5_USE_112_API_DEFAULT=`grep '#define H5_USE_112_API_DEFAULT ' ../src/H5pubconf.h`
H5_USE_114_API_DEFAULT=`grep '#define H5_USE_114_API_DEFAULT ' ../src/H5pubconf.h`
H5_USE_116_API_DEFAULT=`grep '#define H5_USE_116_API_DEFAULT ' ../src/H5pubconf.h`
H5_USE_118_API_DEFAULT=`grep '#define H5_USE_118_API_DEFAULT ' ../src/H5pubconf.h`
# setup my machine information.
myos=`uname -s`
myhostnama=`uname -n`
# Generate some source files and library for tests.
suffix=c # source file suffix
hdf5main=${H5TOOL}_hdf5main.$suffix
hdf5main_o=${H5TOOL}_hdf5main.o
v16main=${H5TOOL}_v16main.$suffix
v16main_o=${H5TOOL}_v16main.o
v18main=${H5TOOL}_v18main.$suffix
v18main_o=${H5TOOL}_v18main.o
v110main=${H5TOOL}_v110main.$suffix
v110main_o=${H5TOOL}_v110main.o
v112main=${H5TOOL}_v112main.$suffix
v112main_o=${H5TOOL}_v112main.o
v114main=${H5TOOL}_v114main.$suffix
v114main_o=${H5TOOL}_v114main.o
appmain=${H5TOOL}_appmain.$suffix
appmain_o=${H5TOOL}_appmain.o
prog1=${H5TOOL}_prog1.$suffix
prog1_o=${H5TOOL}_prog1.o
prog2=${H5TOOL}_prog2.$suffix
prog2_o=${H5TOOL}_prog2.o
args=${H5TOOL}_args.$suffix
args_o=${H5TOOL}_args.o
applib=libapp${H5TOOL}.a
# short hands
# Caution: if some *.h5 files must be cleaned here, list them by names.
# Don't use the wildcard form of *.h5 as it will wipe out even *.h5 generated
# by other test programs. This will cause a racing condition error when
# parallel make (e.g., gmake -j 4) is used.
temp_SRC="$hdf5main $v16main $v18main $v110main $v112main $v114main $appmain $prog1 $prog2"
temp_OBJ=`echo $temp_SRC | sed -e "s/\.${suffix}/.o/g"`
temp_FILES="a.out $applib"
# Generate appmain:
# An application Main that calls hdf5 and application's own functions.
cat > $appmain <<EOF
#include "hdf5.h"
#define H5FILE_NAME "tmp.h5"
extern void sub1(void);
extern void sub2(void);
int
main (void)
{
hid_t file; /* file and dataset handles */
/*
* Create a new file using H5F_ACC_TRUNC access,
* default file creation properties, and default file
* access properties.
*/
sub1();
sub2();
file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
H5Fclose(file);
printf("HDF5 C Sample program ran successfully. File %s generated.\n", H5FILE_NAME);
remove(H5FILE_NAME);
return 0;
}
EOF
# generate prog1
cat > $prog1 <<EOF
#include <stdio.h>
void
sub1(void)
{
printf("in sub1\n");
}
EOF
# generate prog2
cat > $prog2 <<EOF
#include <stdio.h>
void
sub2(void)
{
printf("in sub2\n");
}
EOF
# Generate HDF5 Main Program:
# An HDF5 sample program that calls hdf5 functions.
cat > $hdf5main <<EOF
#include "hdf5.h"
#define H5FILE_NAME "tmp.h5"
int
main (void)
{
hid_t file; /* file and dataset handles */
/*
* Create a new file using H5F_ACC_TRUNC access,
* default file creation properties, and default file
* access properties.
*/
file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
H5Fclose(file);
printf("HDF5 C Sample program ran successfully. File %s generated.\n", H5FILE_NAME);
remove(H5FILE_NAME);
return 0;
}
EOF
# Generate HDF5 v1.6 Main Program:
# This makes unique V1.6 API calls.
cat > $v16main <<EOF
/* This is a V1.6 API calls example Program. */
#include "hdf5.h"
#define H5FILE_NAME "tmp.h5"
int
main (void)
{
hid_t file, group, group1; /* file and group handles */
file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
group = H5Gcreate(file, "/Group", 0);
group1 = H5Gcreate1(file, "/Group1.6", 0);
H5Gclose(group1);
H5Gclose(group);
H5Fclose(file);
printf("HDF5 C program created with V1.6 API ran successfully. "
"File %s generated.\n", H5FILE_NAME);
remove(H5FILE_NAME);
return 0;
}
EOF
# Generate HDF5 v1.8 Main Program:
# This makes unique V1.8 API calls.
cat > $v18main <<EOF
/* This is a V1.8 API calls example Program. */
#include "hdf5.h"
#define H5FILE_NAME "tmp.h5"
int
main (void)
{
hid_t file, group, group2; /* file and group handles */
file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
group = H5Gcreate(file, "/Group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
group2 = H5Gcreate2(file, "/Group1.8", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
H5Gclose(group2);
H5Gclose(group);
H5Fclose(file);
printf("HDF5 C program created with V1.8 API ran successfully. "
"File %s generated.\n", H5FILE_NAME);
remove(H5FILE_NAME);
return 0;
}
EOF
# Generate HDF5 v1.10 Main Program:
# This makes unique V1.10 API calls.
cat > $v110main <<EOF
/* This is a V1.10 API calls example Program. */
#include "hdf5.h"
#define H5FILE_NAME "tmp.h5"
int
main (void)
{
hid_t file, group, group2, dset, dset2; /* file and group handles */
file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
group = H5Gcreate(file, "/Group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
group2 = H5Gcreate2(file, "/Group1.8", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
dset = H5Dopen(group, "Dataset", H5P_DEFAULT);
dset2 = H5Dopen2(group2, "Dataset2", H5P_DEFAULT);
H5Dclose(dset);
H5Dclose(dset2);
H5Gclose(group2);
H5Gclose(group);
H5Fclose(file);
printf("HDF5 C program created with V1.10 API ran successfully. "
"File %s generated.\n", H5FILE_NAME);
remove(H5FILE_NAME);
return 0;
}
EOF
# Generate HDF5 v1.12 Main Program:
# This makes unique V1.12 API calls.
cat > $v112main <<EOF
/* This is a V1.12 API calls example Program. */
#include "hdf5.h"
#define H5FILE_NAME "tmp.h5"
#define SPACE1_RANK 3
int
main (void)
{
hid_t sid; /* Dataspace ID */
hid_t fapl = -1; /* File access property list ID */
int rank; /* Logical rank of dataspace */
hsize_t dims[] = {3, 3, 15};
size_t sbuf_size=0;
herr_t ret; /* Generic return value */
hsize_t start[] = {0, 0, 0};
hsize_t stride[] = {2, 5, 3};
hsize_t count[] = {2, 2, 2};
hsize_t block[] = {1, 3, 1};
/* Create the file access property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
/* Set low/high bounds in the fapl */
ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_EARLIEST,
H5F_LIBVER_LATEST);
/* Create the dataspace */
sid = H5Screate_simple(SPACE1_RANK, dims, NULL);
/* Set the hyperslab selection */
ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block);
/* Encode simple dataspace in a buffer with the fapl setting */
ret = H5Sencode(sid, NULL, &sbuf_size, fapl);
/* Encode simple dataspace in a buffer with the fapl setting */
ret = H5Sencode2(sid, NULL, &sbuf_size, fapl);
printf("HDF5 C program created with V1.12 API ran successfully. ");
/* "File %s generated.\n", H5FILE_NAME);
remove(H5FILE_NAME); */
return 0;
}
EOF
# Generate HDF5 v1.14 Main Program:
# This makes unique V1.14 API calls.
cat > $v114main <<EOF
/* This is a V1.14 API calls example Program. */
#include "hdf5.h"
#define H5FILE_NAME "tmp.h5"
#define SPACE1_RANK 3
int
main (void)
{
hid_t sid; /* Dataspace ID */
hid_t fapl = -1; /* File access property list ID */
int rank; /* Logical rank of dataspace */
hsize_t dims[] = {3, 3, 15};
size_t sbuf_size=0;
herr_t ret; /* Generic return value */
hsize_t start[] = {0, 0, 0};
hsize_t stride[] = {2, 5, 3};
hsize_t count[] = {2, 2, 2};
hsize_t block[] = {1, 3, 1};
/* Create the file access property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
/* Set low/high bounds in the fapl */
ret = H5Pset_libver_bounds(fapl, H5F_LIBVER_EARLIEST,
H5F_LIBVER_LATEST);
/* Create the dataspace */
sid = H5Screate_simple(SPACE1_RANK, dims, NULL);
/* Set the hyperslab selection */
ret = H5Sselect_hyperslab(sid, H5S_SELECT_SET, start, stride, count, block);
/* Encode simple dataspace in a buffer with the fapl setting */
ret = H5Sencode(sid, NULL, &sbuf_size, fapl);
/* Encode simple dataspace in a buffer with the fapl setting */
ret = H5Sencode2(sid, NULL, &sbuf_size, fapl);
printf("HDF5 C program created with V1.14 API ran successfully. ");
/* "File %s generated.\n", H5FILE_NAME);
remove(H5FILE_NAME); */
return 0;
}
EOF
# Generate args:
# An application main that test misc command line arguments being passed.
cat > $args <<EOF
#include "hdf5.h"
#define H5FILE_NAME "check_args.h5"
int
main (void)
{
char c = SGL_QUOTE; /* 'H' */
char *s = DBL_QUOTE; /* "HDF" */
int val = MISC; /* 42 */
hid_t file; /* file and dataset handles */
file = H5Fcreate(H5FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
H5Fclose(file);
printf("HDF5 C Sample program ran successfully. File %s generated.\n", H5FILE_NAME);
remove(H5FILE_NAME);
return 0;
}
EOF
# Parse option
# None
# Print a line-line message left justified in a field of 71 characters
# beginning with the word "Testing".
#
TESTING() {
SPACES=" "
echo "Testing $* $SPACES" | cut -c1-71 | tr -d '\012'
}
# Debug printing
# Change : to echo to print the debug statement
DPRINT() {
: $*
}
# Run a test and print PASS or *FAIL*. If a test fails then increment
# the `nerrors' global variable and (if $verbose is set) display the
# failed output. The actual output is not removed if $HDF5_NOCLEANUP is
# defined.
#
TOOLTEST() {
out=test_$H5TOOL_$$.out
err=test_$H5TOOL_$$.err
# Run test.
TESTING $H5TOOL $@
$H5TOOL_BIN $@ > $out 2>&1
result=$?
if [ $result = 0 ]; then
echo " PASSED"
test $verbose -gt 1 && \
( echo "========== results ==========="; cat $out;
echo "===============================================") |sed 's/^/ /'
else
echo "*FAILED*"
nerrors="`expr $nerrors + 1`"
test $verbose -gt 0 && \
( echo "========== results ==========="; cat $out;
echo "===============================================") |sed 's/^/ /'
fi
# Clean up output file
if test -z "$HDF5_NOCLEANUP"; then
rm -f $out
fi
}
# Print a "SKIP" message
SKIP() {
TESTING $H5TOOL $@
echo " -SKIP-"
}
##############################################################################
### T H E T E S T S ###
##############################################################################
#
# Group 1: HDF5 program that calls HDF5 APIs.
echo "***"Simple Compile and Link in one step.
TOOLTEST $hdf5main
# Application program that calls HDF5 and its own functions.
TOOLTEST $appmain $prog1 $prog2
# Repeat with -shlib option
echo "***"Simple Compile and Link with -shlib in one step.
TOOLTEST -shlib $hdf5main
# Application program that calls HDF5 and its own functions.
TOOLTEST -shlib $appmain $prog1 $prog2
# Group 2: Compile, then link.
echo "***"Compile and Link in two steps.
TOOLTEST -c $hdf5main
TOOLTEST $hdf5main_o
TOOLTEST -c $appmain $prog1 $prog2
TOOLTEST $appmain_o $prog1_o $prog2_o
# Repeat with -shlib option
echo "***"Compile and Link with -shlib in two steps.
TOOLTEST -c $hdf5main
TOOLTEST -shlib $hdf5main_o
TOOLTEST -c $appmain $prog1 $prog2
TOOLTEST -shlib $appmain_o $prog1_o $prog2_o
# Group3: Build external library, then link with it.
echo "***"Build external library and link with it.
TOOLTEST -c $prog1 $prog2
$AR cru $applib $prog1_o $prog2_o
$RANLIB $applib
TOOLTEST $appmain $applib
TOOLTEST $appmain_o $applib
# Repeat with -shlib option
echo "***"Build external library and link with it using -shlib.
TOOLTEST -c $prog1 $prog2
$AR cru $applib $prog1_o $prog2_o
$RANLIB $applib
TOOLTEST -shlib $appmain $applib
TOOLTEST -shlib $appmain_o $applib
# Group 4: Just preprocess, no compile, no link.
echo "***"Just preprocess, no compile, no link.
TOOLTEST -E $hdf5main
TOOLTEST -E $appmain $prog1 $prog2
# Group5: Version compatibility tests.
echo "***"Version compatibility tests.
# 20200610 Updated for versions 1.10 - 1.14.
# If H5_NO_DEPRECATED_SYMBOLS;
# then versions v18main, v110main, and v112main work.
# -DH5_USE_<N>_API_DEFAULT flags cannot be used with H5_NO_DEPRECATED_SYMBOLS;
# else if H5_USE_16_API_DEFAULT;
# then v16main works.
# else v18main works and -DH5_USE_16_API_DEFAULT v16main also works.
# As new versions with versioned functions are added, they will work with and
# should be added to H5_NO_DEPRECATED_SYMBOLS and to the else section, with and
# without the -DH5_USE_<N>_API_DEFAULT flag. A new H5_USE_<N>_API_DEFAULT section
# should also be added.
#
if [ -n "$H5_USE_16_API_DEFAULT" ]; then
echo "H5_USE_16_API_DEFAULT is defined."
elif [ -n "$H5_USE_18_API_DEFAULT" ]; then
echo "H5_USE_18_API_DEFAULT is defined."
elif [ -n "$H5_USE_110_API_DEFAULT" ]; then
echo "H5_USE_110_API_DEFAULT is defined."
elif [ -n "$H5_USE_112_API_DEFAULT" ]; then
echo "H5_USE_112_API_DEFAULT is defined."
elif [ -n "$H5_USE_114_API_DEFAULT" ]; then
echo "H5_USE_114_API_DEFAULT is defined."
elif [ -n "$H5_USE_116_API_DEFAULT" ]; then
echo "H5_USE_116_API_DEFAULT is defined."
elif [ -n "$H5_USE_118_API_DEFAULT" ]; then
echo "H5_USE_118_API_DEFAULT is defined."
else
echo "No H5 API_DEFAULT is defined."
fi
if [ -n "$H5_NO_DEPRECATED_SYMBOLS" ]; then
echo "H5_NO_DEPRECATED_SYMBOLS is defined."
else
echo "H5_NO_DEPRECATED_SYMBOLS is not defined."
fi
if [ -n "$H5_NO_DEPRECATED_SYMBOLS" ]; then
echo "Skipping $v16main test"
TOOLTEST $v18main
TOOLTEST $v18main
TOOLTEST $v110main
TOOLTEST $v112main
TOOLTEST $v114main
elif [ -n "$H5_USE_16_API_DEFAULT" ]; then
echo "Testing HDF5 with 16_API_DEFAULT"
TOOLTEST $v16main
elif [ -n "$H5_USE_18_API_DEFAULT" ]; then
echo "Testing HDF5 with 18_API_DEFAULT"
TOOLTEST -DH5_USE_16_API_DEFAULT $v16main
TOOLTEST $v18main
elif [ -n "$H5_USE_110_API_DEFAULT" ]; then
echo "Testing HDF5 with 110_API_DEFAULT"
TOOLTEST -DH5_USE_16_API_DEFAULT $v16main
TOOLTEST -DH5_USE_18_API_DEFAULT $v18main
TOOLTEST $v110main
elif [ -n "$H5_USE_112_API_DEFAULT" ]; then
echo "Testing HDF5 with 112_API_DEFAULT"
TOOLTEST -DH5_USE_16_API_DEFAULT $v16main
TOOLTEST -DH5_USE_18_API_DEFAULT $v18main
TOOLTEST -DH5_USE_110_API_DEFAULT $v110main
TOOLTEST $v112main
elif [ -n "$H5_USE_114_API_DEFAULT" ]; then
echo "Testing HDF5 with 114_API_DEFAULT"
TOOLTEST -DH5_USE_16_API_DEFAULT $v16main
TOOLTEST -DH5_USE_18_API_DEFAULT $v18main
TOOLTEST -DH5_USE_110_API_DEFAULT $v110main
TOOLTEST -DH5_USE_112_API_DEFAULT $v112main
TOOLTEST $v114main
elif [ -n "$H5_USE_116_API_DEFAULT" ]; then
echo "Testing HDF5 with 116_API_DEFAULT"
TOOLTEST -DH5_USE_16_API_DEFAULT $v16main
TOOLTEST -DH5_USE_18_API_DEFAULT $v18main
TOOLTEST -DH5_USE_110_API_DEFAULT $v110main
TOOLTEST -DH5_USE_112_API_DEFAULT $v112main
TOOLTEST -DH5_USE_114_API_DEFAULT $v114main
TOOLTEST $v116main
else
echo "Testing HDF5 with 118_API_DEFAULT"
TOOLTEST -DH5_USE_16_API_DEFAULT $v16main
TOOLTEST -DH5_USE_18_API_DEFAULT $v18main
TOOLTEST -DH5_USE_110_API_DEFAULT $v110main
TOOLTEST -DH5_USE_112_API_DEFAULT $v112main
TOOLTEST -DH5_USE_114_API_DEFAULT $v114main
TOOLTEST -DH5_USE_116_API_DEFAULT $v116main
TOOLTEST $v18main
TOOLTEST $v110main
TOOLTEST $v112main
TOOLTEST $v114main
TOOLTEST $v116main
fi
# Group 6: # HDF5 program that depends on input args.
echo "***"Simple Compile and Link in one step with user-supplied arguments.
TOOLTEST -DSGL_QUOTE=\'H\' -DDBL_QUOTE=\"HDF\" -DMISC=42 $args
##############################################################################
# END
##############################################################################
# Clean up file
if test -z "$HDF5_NOCLEANUP"; then
rm -f $temp_SRC $temp_OBJ $temp_FILES
fi
if test $nerrors -eq 0 ; then
echo "All $TESTNAME tests passed."
exit $EXIT_SUCCESS
else
echo "$TESTNAME tests failed with $nerrors errors."
exit $EXIT_FAILURE
fi