netcdf-c/dap4_test/d4test_common.sh
Dennis Heimbigner 65414eeaa4 Fix some protocol differences between netcdf-c and the Hyrax server.
re: Partly addresses issue https://github.com/Unidata/netcdf-c/issues/1712.

1. Turn on Hyrax Hack to accept Hyrax style attribute containers.
2. Support Url type as alias for String.
3. Accept the special attribute, "__DAP4_Checksum_CRC32",
   to control per-variable checksums.
4. Make _DAP4_xxx attributes be reserved and only accessible
   by name (ala _SuperBlock attribute).
5. Fix handling of checksums. There is a hack in the code
   that uses an extra flag in the chunk header to indicate
   that all variables have checksums. This violates the spec
   and will be removed once it is possible to regenerate the
   test cases.

Note that checksumming with the Hyrax test server has not
been tested. This, along with some other probable inconsistencies,
needs fixing when OPeNDAP and Unidata can agree on the proper
specification. Testing will be included.
2020-05-30 17:36:25 -06:00

79 lines
1.4 KiB
Bash
Executable File

if test $# = 0 ; then
TEST=1
else
for arg in "$@"; do
case "${arg}" in
test) TEST=1 ;;
reset) RESET=1 ;;
diff) DIFF=1 ;;
cdl) CDLDIFF=1 ;;
log) ;;
*) echo unknown argument $arg ;;
esac
done
fi
# Define input paths
WD=`pwd`
cd ${srcdir}/daptestfiles; DAPTESTFILES=`pwd` ; cd ${WD}
cd ${srcdir}/dmrtestfiles; DMRTESTFILES=`pwd` ; cd ${WD}
cd ${srcdir}/cdltestfiles; CDLTESTFILES=`pwd` ; cd ${WD}
cd ${srcdir}/baseline; BASELINE=`pwd` ; cd ${WD}
cd ${srcdir}/baselineraw; BASELINERAW=`pwd` ; cd ${WD}
cd ${srcdir}/baselineremote; BASELINEREM=`pwd` ; cd ${WD}
#cd ${srcdir}/baselinehyrax; BASELINEH=`pwd` ; cd ${WD}
setresultdir() {
rm -fr ${builddir}/$1
mkdir -p ${builddir}/$1
}
FAILURES=
failure() {
echo "*** Fail: $1"
FAILURES=1
if test "x$2" != x ; then
exit 1
fi
}
PUSHD() {
pushd $1 >>/dev/null
}
POPD() {
popd >>/dev/null
}
filesexist() {
for x in "$@" ; do
if ! test -e $x ; then
failure "missing file: $x"
fi
done
}
finish() {
if test "x$FAILURES" = x1 ; then
echo "*** Fail"
exit 1
else
echo "*** Pass"
exit 0
fi
}
# Return the complete set of arguments minus any found in $SUPPRESS
suppress() {
local args="$@"
suppress=
for a in $args; do
for s in $SUPPRESS; do if test "x$a" != "x$s" ; then suppress="$suppress $a"; fi; done
done
}
VG="valgrind --leak-check=full --error-exitcode=1 --num-callers=100"
if test "x$USEVG" = x ; then VG=; fi
DUMPFLAGS=