2010-06-03 21:24:43 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-03-09 08:01:10 +08:00
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
|
|
|
. ../test_common.sh
|
2022-03-19 11:01:40 +08:00
|
|
|
|
2015-05-17 05:46:39 +08:00
|
|
|
set -e
|
|
|
|
|
2018-03-21 11:31:31 +08:00
|
|
|
. ${srcdir}/tst_utils.sh
|
|
|
|
|
|
|
|
# get the list of test files
|
|
|
|
. ${srcdir}/tst_filelists.sh
|
|
|
|
|
|
|
|
# Test executor
|
|
|
|
dotests() {
|
|
|
|
for x in ${FILETESTS} ; do
|
|
|
|
url="${PARAMS}${FILEURL}/$x"
|
|
|
|
if test "x$quiet" = "x0" ; then echo "*** Testing: ${x} ; url=$url" ; fi
|
|
|
|
# determine if this is an xfailtest
|
|
|
|
isxfail=0
|
|
|
|
if test "x${XFAILTESTS}" != x ; then
|
2023-04-05 08:37:20 +08:00
|
|
|
if IGNORE=`echon " ${XFAILTESTS} " | fgrep " ${x} "`; then isxfail=1; fi
|
2018-03-21 11:31:31 +08:00
|
|
|
fi
|
|
|
|
ok=1
|
2018-10-02 05:51:43 +08:00
|
|
|
if ${NCDUMP} ${DUMPFLAGS} "${url}" | sed 's/\\r//g' > ${x}.dmp ; then ok=$ok; else ok=0; fi
|
2018-03-21 11:31:31 +08:00
|
|
|
# compare with expected
|
|
|
|
if diff -w ${EXPECTED}/${x}.dmp ${x}.dmp ; then ok=$ok; else ok=0; fi
|
|
|
|
processstatus
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
TITLE="DAP to netCDF-3 translation using files"
|
|
|
|
EXPECTED="$expected3"
|
|
|
|
RESULTSDIR="file_results"
|
|
|
|
|
|
|
|
rm -fr ${RESULTSDIR}
|
2021-08-26 03:33:49 +08:00
|
|
|
mkdir -p "${RESULTSDIR}"
|
2010-06-03 21:24:43 +08:00
|
|
|
|
2018-03-21 11:31:31 +08:00
|
|
|
echo "*** Testing $TITLE "
|
|
|
|
echo " Base URL: ${TESTURL}"
|
|
|
|
echo " Client Parameters: ${PARAMS}"
|
2010-06-03 21:24:43 +08:00
|
|
|
|
2018-03-21 11:31:31 +08:00
|
|
|
cd ${RESULTSDIR}
|
|
|
|
dotests file
|
|
|
|
cd ..
|
|
|
|
summarize
|
|
|
|
cleanup
|
|
|
|
doexit
|