File: tst_ncdap3.sh

package info (click to toggle)
netcdf 1:4.7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 104,952 kB
  • sloc: ansic: 228,683; sh: 10,980; yacc: 2,561; makefile: 1,319; lex: 1,173; xml: 173; awk: 2
file content (48 lines) | stat: -rwxr-xr-x 1,082 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh

if test "x$SETX" = x1 ; then set -x ; fi

if test "x$srcdir" = x ; then srcdir=`pwd`; fi
. ../test_common.sh
set -e

. ${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
  if ${NCDUMP} ${DUMPFLAGS} "${url}" | sed 's/\\r//g' > ${x}.dmp ; then ok=$ok; else ok=0; fi
  # 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}"

echo "*** Testing $TITLE "
echo "        Base URL: ${TESTURL}"
echo "        Client Parameters: ${PARAMS}"

cd ${RESULTSDIR}
dotests file
cd ..
summarize
cleanup
doexit