2010-06-03 21:24:43 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2018-03-21 11:31:31 +08:00
|
|
|
if test "x$SETX" = x1 ; then set -x ; fi
|
|
|
|
|
2017-03-09 08:01:10 +08:00
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
|
|
|
. ../test_common.sh
|
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
|
|
|
|
if IGNORE=`echo -n " ${XFAILTESTS} " | fgrep " ${x} "`; then isxfail=1; fi
|
|
|
|
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}
|
|
|
|
mkdir "${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
|