netcdf-c/dap4_test/test_raw.sh
Dennis Heimbigner d1d2808919 Additional DAP4 fixes
This change-set modifies PR https://github.com/Unidata/netcdf-c/pull/2555
to add the changes listed below. Most of these changes are required
by changes to the Java remotetest.unidata.ucar.edu server.

## DAP4 Related Changes
* Add tests *dap4_test/test_constraints.sh* and *dap4_test/test_hyrax.sh*.
* Provide explicit list of remotetest files to test.
* Cleanup local checksum computing and verification.
* Define a temporary Hyrax hack flag to deal with the way Hyrax handles checksums and add "#hyrax" fragment flag for it.
* Add a hack to get past an LGTM problem with using "http:".
* Improve debug support.

## Other Changes
* Cleanup the recipe in *docs/nczarr.md* for building *aws-sdk-cpp* library.
2023-01-18 19:47:29 -07:00

66 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
. ../test_common.sh
. ${srcdir}/d4test_common.sh
set -e
echo "test_raw.sh:"
computetestablefiles
# Do cleanup on the baseline file
baseclean() {
if test $# != 2 ; then
echo "simplify: too few args"
else
rm -f $2
while read -r iline; do
oline=`echo $iline | tr "'" '"'`
echo "$oline" >> $2
done < $1
fi
}
# Do cleanup on the result file
resultclean() {
if test $# != 2 ; then
echo "simplify: too few args"
else
rm -f $2
while read -r iline; do
oline=`echo $iline | sed -e 's|^\(netcdf.*\)[.]nc\(.*\)$|\\1\\2|'`
echo "$oline" >> $2
done < $1
fi
}
setresultdir results_test_raw
if test "x${RESET}" = x1 ; then rm -fr ${BASELINERAW}/*.ncdump ; fi
for f in $F ; do
echo "testing: $f"
URL="file://${RAWTESTFILES}/${f}?dap4.checksum=false#log&dap4"
if ! ${NCDUMP} ${DUMPFLAGS} "${URL}" > ${builddir}/results_test_raw/${f}.ncdump; then
failure "${URL}"
fi
if test "x${TEST}" = x1 ; then
if ! diff -wBb ${BASELINERAW}/${f}.ncdump ${builddir}/results_test_raw/${f}.ncdump ; then
failure "diff ${f}.ncdump"
fi
elif test "x${RESET}" = x1 ; then
echo "${f}:"
cp ${builddir}/results_test_raw/${f}.ncdump ${BASELINERAW}/${f}.ncdump
elif test "x${DIFF}" = x1 ; then
echo "hdrtest: ${f}"
baseclean
if ! diff -wBb ${BASELINERAW}/${f}.ncdump ${BASELINE}/${f}.ncdump ; then
failure diff -wBb ${BASELINERAW}/${f}.ncdump ${BASELINE}/${f}.ncdump
fi
fi
done
finish