mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
8072d1f6bb
re: issue https://github.com/Unidata/netcdf-c/issues/1151 Modify DAP2 and DAP4 code to handle case when _FillValue type is not same as the parent variable type. Specifically: 1. Define a parameter [fillmismatch] to allow this mismatch; default is to disallow. 2. If allowed, forcibly change the type of the _FillValue to match the parent variable. 3. If allowed Convert the values to match new type 4. Generate a log message 5. if not allowed, then fail Implementing this required some changes to ncdap_test/dapcvt.c Also added test cases. Minor Unrelated Changes: 1. There were a number of warnings about e.g. assigning a const char* to a char*. Fix these 2. In nccopy.1, replace .NP with .IP "n" (re PR https://github.com/Unidata/netcdf-c/pull/1144) 3. fix minor error in ncdump/ocprint
79 lines
1.4 KiB
Bash
Executable File
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}
|
|
BASELINEH=${BASELINEREM}
|
|
|
|
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=
|
|
|