File: testcontainerauth.sh

package info (click to toggle)
netcdf-parallel 1%3A4.7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 105,352 kB
  • sloc: ansic: 229,114; sh: 11,180; yacc: 2,561; makefile: 1,390; lex: 1,173; xml: 173; awk: 2
file content (69 lines) | stat: -rw-r--r-- 1,100 bytes parent folder | download | duplicates (8)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh

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

#SHOW=1
#DBG=1
# Choose at most 1
#GDB=1
#VG=1

WD=`pwd`
COOKIES="${WD}/test_auth_cookies"

RC=.daprc

OCLOGFILE=stderr
if test "x$DBG" = x1 ; then
SHOW=1
fi

# Major parameters

PROTO=https
URLSERVER="localhost:8081"
URLPATH="/thredds/dodsC/containerauth/testData2.nc"

if test "x$DBG" = x1 ; then
PARAMS="#log&show=fetch"
fi

OUTPUT="./.output"
if test "x$TEMP" = x ; then
  TEMP="/tmp"
fi
TEMP=`echo "$TEMP" | sed -e "s|/$||"`

show() {
  if test "x$SHOW" = x1 ; then cat $OUTPUT; fi
  if test "x$OUTPUT" != "x"; then rm -f $OUTPUT; fi
}

# Assemble the ncdump command
if test "x$DBG" = x1; then
NCDUMP="$NCDUMP -D1"
fi

if test "x$GDB" = x1 ; then
  NCDUMP="gdb --args $NCDUMP"
fi
if test "x$VG" = x1 ; then
  NCDUMP="valgrind --leak-check=full $NCDUMP"
fi

# Rest of tests assume these defaults
URL="${PROTO}://${URLSERVER}/$URLPATH"

if test "x$DBG" = x1 ; then
URL="$URL$PARAMS"
fi

# Invoke ncdump to extract a file the URL
echo "command: ${NCDUMP} -h ${URL} > $OUTPUT"
${NCDUMP} -h "$URL" > $OUTPUT

show

exit