1#!/bin/sh
2
3if test "x$srcdir" = x ; then srcdir=`pwd`; fi
4. ../test_common.sh
5
6. ${srcdir}/d4test_common.sh
7
8set -e
9
10echo "test_remote.sh:"
11
12#BIG=1
13#NOCSUM=1
14
15F="\
16test_atomic_array.nc \
17test_atomic_types.nc \
18test_enum.nc \
19test_enum_2.nc \
20test_enum_array.nc \
21test_fill.nc \
22test_groups1.nc \
23test_misc1.nc \
24test_one_var.nc \
25test_one_vararray.nc \
26test_opaque.nc \
27test_opaque_array.nc \
28test_struct1.nc \
29test_struct_array.nc \
30test_struct_nested.nc \
31test_struct_nested3.nc \
32test_struct_type.nc \
33test_utf8.nc \
34test_vlen1.nc \
35test_vlen2.nc \
36test_vlen3.nc \
37test_vlen4.nc \
38test_vlen5.nc \
39test_vlen6.nc \
40test_vlen7.nc \
41test_vlen8.nc \
42test_vlen9.nc \
43test_vlen10.nc \
44test_vlen11.nc \
45tst_fills.nc \
46test_struct_nested.hdf5 \
47test_struct_nested3.hdf5 \
48test_vlen3.hdf5 \
49test_vlen4.hdf5 \
50test_vlen5.hdf5 \
51test_anon_dim.syn \
52test_atomic_array.syn \
53test_atomic_types.syn \
54test_sequence_1.syn \
55test_sequence_2.syn \
56test_struct_array.syn \
57"
58
59setresultdir results_test_remote
60
61TESTSERVER=`${execdir}/findtestserver4 dap4 d4ts`
62if test "x$TESTSERVER" = x ; then
63echo "***XFAIL: Cannot find d4ts testserver"
64exit 1
65fi
66
67if test "x${RESET}" = x1 ; then rm -fr ${BASELINER}/*.dmp ; fi
68for f in $F ; do
69    URL="[log][show=fetch][dap4]${TESTSERVER}/testfiles/${f}"
70    if test "x$BIG" = x1; then
71	URL="[ucar.littleendian=0]${URL}"
72    fi
73    if test "x$NOCSUM" = x1; then
74	URL="[ucar.checksummode=none]${URL}"
75    fi
76    if ! ${NCDUMP} ${DUMPFLAGS} "${URL}" > ${builddir}/results_test_remote/${f}.dmp; then
77        failure "${URL}"
78    fi
79    if test "x${TEST}" = x1 ; then
80	if ! diff -wBb "${BASELINEREM}/${f}.dmp" "${builddir}/results_test_remote/${f}.dmp" ; then
81	    failure "diff ${f}.dmp"
82	fi
83    elif test "x${RESET}" = x1 ; then
84	echo "${f}:"
85	cp "${builddir}/results_test_remote/${f}.dmp" "${BASELINEREM}/${f}.dmp"
86    fi
87done
88
89rm -fr ${builddir}/results_test_remote
90
91finish
92
93