2017-03-09 08:01:10 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if test "x$srcdir" = "x"; then srcdir=`dirname $0`; fi
|
|
|
|
export srcdir;
|
|
|
|
|
2021-01-15 12:39:08 +08:00
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
|
|
|
. ../test_common.sh
|
2017-03-09 08:01:10 +08:00
|
|
|
|
2020-05-31 07:36:25 +08:00
|
|
|
. ${srcdir}/d4test_common.sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
echo "test_hyrax.sh:"
|
|
|
|
|
2021-01-15 12:39:08 +08:00
|
|
|
FRAG="#checksummode=ignore"
|
2017-03-09 08:01:10 +08:00
|
|
|
|
|
|
|
F="\
|
2021-01-15 12:39:08 +08:00
|
|
|
nc4_test_files/nc4_nc_classic_comp.nc \
|
|
|
|
nc4_test_files/nc4_unsigned_types_comp.nc \
|
|
|
|
nc4_test_files/nc4_strings_comp.nc \
|
|
|
|
nc4_test_files/ref_tst_compounds.nc \
|
|
|
|
hyrax/RSS/amsre/bmaps_v05/y2006/m01/amsre_20060131v5.dat?dap4.ce=time_a \
|
2017-03-09 08:01:10 +08:00
|
|
|
"
|
|
|
|
|
|
|
|
failure() {
|
|
|
|
echo "*** Fail: $1"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2018-06-27 03:58:45 +08:00
|
|
|
setresultdir results_test_hyrax
|
2017-03-09 08:01:10 +08:00
|
|
|
|
2021-01-15 12:39:08 +08:00
|
|
|
if test "x${RESET}" = x1 ; then rm -fr ${BASELINEH}/*.hyrax ; fi
|
2017-03-09 08:01:10 +08:00
|
|
|
for f in $F ; do
|
2021-01-15 12:39:08 +08:00
|
|
|
constraint=`echo "$f" | cut -d '?' -f2`
|
|
|
|
unconstrained=`echo "$f" | cut -d '?' -f1`
|
|
|
|
base=`basename $unconstrained`
|
|
|
|
prefix=`dirname $unconstrained`
|
|
|
|
if test "x$constraint" = "x$unconstrained" ; then
|
|
|
|
URL="dap4://test.opendap.org:8080/opendap/${prefix}/${base}${FRAG}"
|
|
|
|
else
|
|
|
|
URL="dap4://test.opendap.org:8080/opendap/${prefix}/${base}?$constraint${FRAG}"
|
|
|
|
fi
|
2017-03-09 08:01:10 +08:00
|
|
|
echo "testing: $URL"
|
2021-01-15 12:39:08 +08:00
|
|
|
if ! ${NCDUMP} "${URL}" > ./results_test_hyrax/${base}.hyrax; then
|
2017-03-09 08:01:10 +08:00
|
|
|
failure "${URL}"
|
|
|
|
fi
|
|
|
|
if test "x${TEST}" = x1 ; then
|
2021-01-15 12:39:08 +08:00
|
|
|
if ! diff -wBb ${BASELINEH}/${base}.hyrax ./results_test_hyrax/${base}.hyrax ; then
|
|
|
|
failure "diff ${base}.hyrax"
|
2017-03-09 08:01:10 +08:00
|
|
|
fi
|
|
|
|
elif test "x${RESET}" = x1 ; then
|
|
|
|
echo "${f}:"
|
2021-01-15 12:39:08 +08:00
|
|
|
cp ./results_test_hyrax/${base}.hyrax ${BASELINEH}/${base}.hyrax
|
2017-03-09 08:01:10 +08:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "*** Pass"
|
|
|
|
exit 0
|
2017-04-04 11:39:44 +08:00
|
|
|
|