remotetest

This commit is contained in:
Dennis Heimbigner 2022-11-14 12:51:09 -07:00
parent 2b17c0cc68
commit cc25aac175
35 changed files with 649 additions and 18 deletions

View File

@ -614,21 +614,14 @@ AC_MSG_CHECKING([whether dap use of remotetest server should be enabled])
AC_ARG_ENABLE([dap-remote-tests],
[AS_HELP_STRING([--disable-dap-remote-tests],
[disable dap remote tests])])
# Default off
test "x$enable_dap_remote_tests" = xyes || enable_dap_remote_tests=no
# Default on
test "x$enable_dap_remote_tests" = xno || enable_dap_remote_tests=yes
if test "x$enable_dap" = "xno" ; then
enable_dap_remote_tests=no
fi
AC_MSG_RESULT($enable_dap_remote_tests)
AC_MSG_CHECKING([whether dap use of remotetest server should be enabled])
AC_ARG_ENABLE([dap-remote-tests],
[AS_HELP_STRING([--disable-dap-remote-tests],
[disable dap remote tests])])
test "x$enable_dap_remote_tests" = xno || enable_dap_remote_tests=yes
AC_MSG_RESULT($enable_dap_remote_tests)
AC_MSG_CHECKING([whether use of external servers should be enabled])
AC_MSG_CHECKING([whether use of external (non-unidata) servers should be enabled])
AC_ARG_ENABLE([external-server-tests],
[AS_HELP_STRING([--enable-external-server-tests (default off)],
[enable external server tests])])
@ -667,11 +660,12 @@ if test "x$REMOTETESTSERVERS" = xno ; then
dfaltsvc="remotetest.unidata.ucar.edu"
REMOTETESTSERVERS="${dfaltsvc}"
fi
AC_MSG_RESULT([$svclist])
AC_DEFINE_UNQUOTED([REMOTETESTSERVERS], ["$REMOTETESTSERVERS"], [the testservers for remote tests.])
msg="${REMOTETESTSERVERS}"
if test "x$dfaltsvc" != x ; then
AC_MSG_NOTICE([Using default: --with-testservers=${dfaltsvc}])
msg="${msg} (default)"
fi
AC_MSG_RESULT([${msg}])
AC_DEFINE_UNQUOTED([REMOTETESTSERVERS], ["$REMOTETESTSERVERS"], [the testservers for remote tests.])
# Set the config.h flags
if test "x$enable_dap" = xyes; then

View File

@ -0,0 +1,48 @@
netcdf test_atomic_array {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
opaque(16) opaque16_t ;
dimensions:
d1 = 1 ;
d2 = 2 ;
d3 = 3 ;
d4 = 4 ;
d5 = 5 ;
variables:
ubyte vu8(d2, d3) ;
short v16(d4) ;
uint vu32(d2, d3) ;
double vd(d2) ;
char vc(d2) ;
string vs(d2, d2) ;
opaque16_t vo(d1, d2) ;
cloud_class_t primary_cloud(d5) ;
cloud_class_t primary_cloud:_FillValue = Missing ;
data:
vu8 =
255, 1, 2,
3, 4, 5 ;
v16 = 1, 2, 3, 4 ;
vu32 =
5, 4, 3,
2, 1, 0 ;
vd = 17.9, 1024.8 ;
vc = "@&" ;
vs =
"hello\tworld", "\r\n",
"Καλημέα", "abc" ;
vo =
0X0123456789ABCDEF0000000000000000, 0XABCDEF00000000000000000000000000 ;
primary_cloud = Clear, Stratus, Clear, Cumulonimbus, _ ;
}

View File

@ -0,0 +1,57 @@
netcdf test_atomic_types {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
opaque(16) opaque16_t ;
variables:
byte v8 ;
ubyte vu8 ;
short v16 ;
ushort vu16 ;
int v32 ;
uint vu32 ;
int64 v64 ;
uint64 vu64 ;
float vf ;
double vd ;
char vc ;
string vs ;
opaque16_t vo ;
cloud_class_t primary_cloud ;
cloud_class_t primary_cloud:_FillValue = Missing ;
cloud_class_t secondary_cloud ;
cloud_class_t secondary_cloud:_FillValue = Missing ;
data:
v8 = -128 ;
vu8 = 255 ;
v16 = -32768 ;
vu16 = _ ;
v32 = 2147483647 ;
vu32 = _ ;
v64 = 9223372036854775807 ;
vu64 = 18446744073709551615 ;
vf = 3.141593 ;
vd = 3.14159265358979 ;
vc = "@" ;
vs = "hello\tworld" ;
vo = 0X0123456789ABCDEF0000000000000000 ;
primary_cloud = Stratus ;
secondary_cloud = _ ;
}

View File

@ -0,0 +1,13 @@
netcdf test_enum_1 {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
variables:
cloud_class_t primary_cloud ;
cloud_class_t primary_cloud:_FillValue = Missing ;
data:
primary_cloud = Stratus ;
}

View File

@ -0,0 +1,16 @@
netcdf test_enum_2 {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
group: h {
variables:
cloud_class_t primary_cloud ;
cloud_class_t primary_cloud:_FillValue = Missing ;
data:
primary_cloud = Stratus ;
} // group h
}

View File

@ -0,0 +1,12 @@
netcdf test_enum_3 {
types:
byte enum cloud_class_t {Clear = 0, Stratus = 1, Missing = 127} ;
group: h {
variables:
cloud_class_t primary_cloud ;
data:
primary_cloud = Stratus ;
} // group h
}

View File

@ -0,0 +1,15 @@
netcdf test_enum_array {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
dimensions:
d5 = 5 ;
variables:
cloud_class_t primary_cloud(d5) ;
cloud_class_t primary_cloud:_FillValue = Missing ;
data:
primary_cloud = Clear, Stratus, Clear, Cumulonimbus, _ ;
}

View File

@ -0,0 +1,14 @@
netcdf test_fill {
variables:
ubyte uv8 ;
short v16 ;
int uv32 ;
int uv32:_FillValue = 17 ;
data:
uv8 = 240 ;
v16 = 32700 ;
uv32 = 111000 ;
}

View File

@ -0,0 +1,27 @@
netcdf test_fill_2 {
types:
byte enum cloud_class_t {Clear = 0, Cumulonimbus = 1, Stratus = 2,
Stratocumulus = 3, Cumulus = 4, Altostratus = 5, Nimbostratus = 6,
Altocumulus = 7, Cirrostratus = 8, Cirrocumulus = 9, Cirrus = 10,
Missing = 127} ;
dimensions:
d2 = 2 ;
variables:
cloud_class_t enumvar(d2) ;
cloud_class_t enumvar:_FillValue = Missing ;
int uv32(d2) ;
int uv32:_FillValue = 17 ;
ubyte uv8(d2) ;
ubyte uv8:_FillValue = 120UB ;
short v16(d2) ;
short v16:_FillValue = -37s ;
data:
enumvar = Stratus, _ ;
uv32 = 111000, _ ;
uv8 = 240, _ ;
v16 = 32700, _ ;
}

View File

@ -0,0 +1,35 @@
netcdf test_groups1 {
dimensions:
dim1 = 5 ;
group: g {
dimensions:
dim2 = 3 ;
group: h {
dimensions:
dim3 = 7 ;
variables:
int v1(dim1) ;
float v2(dim2) ;
data:
v1 = -876354855, -1761252264, 1723477387, -46827465, 1475147969 ;
v2 = 12, -100, _ ;
} // group h
group: i {
dimensions:
dim3 = 7 ;
variables:
int v1(dim1) ;
float v3(dim3) ;
data:
v1 = 2, 3, 5, 7, 11 ;
v3 = 23, 29, 19, 31, 17, 37, 13 ;
} // group i
} // group g
}

View File

@ -0,0 +1,24 @@
netcdf test_misc1 {
dimensions:
lon = 4 ;
time = UNLIMITED ; // (0 currently)
lat = 6 ;
unlim = UNLIMITED ; // (3 currently)
variables:
float var(unlim) ;
var:_ChunkSizes = 1024U ;
float lon(lon) ;
string lon:units = "degrees_east" ;
float lat(lat) ;
string lat:units = "degrees_north" ;
// global attributes:
string :title = "example for workshop" ;
data:
var = 0, 1, 3 ;
lon = _, _, _, _ ;
lat = _, _, _, _, _, _ ;
}

View File

@ -0,0 +1,7 @@
netcdf test_one_var {
variables:
int t ;
data:
t = 17 ;
}

View File

@ -0,0 +1,9 @@
netcdf test_one_vararray {
dimensions:
d2 = 2 ;
variables:
int t(d2) ;
data:
t = 17, 37 ;
}

View File

@ -0,0 +1,9 @@
netcdf test_opaque {
types:
opaque(16) opaque16_t ;
variables:
opaque16_t vo1 ;
data:
vo1 = 0X0123456789ABCDEF0000000000000000 ;
}

View File

@ -0,0 +1,13 @@
netcdf test_opaque_array {
types:
opaque(16) opaque16_t ;
dimensions:
d2 = 2 ;
variables:
opaque16_t vo2(d2, d2) ;
data:
vo2 =
0X0123456789ABCDEF0000000000000000, 0XABCDEF00000000000000000000000000,
0XFEDCBA98765432100000000000000000, 0XFEDCBA99999999990000000000000000 ;
}

View File

@ -0,0 +1,12 @@
netcdf test_struct1 {
types:
compound s_t {
int x ;
int y ;
}; // s_t
variables:
s_t s ;
data:
s = {1, -2} ;
}

View File

@ -0,0 +1,19 @@
netcdf test_struct_array {
types:
compound s_t {
int x ;
int y ;
}; // s_t
dimensions:
dx = 4 ;
dy = 3 ;
variables:
s_t s(dx, dy) ;
data:
s =
{1, -1}, {17, 37}, {-32767, 32767},
{-1, 3}, {-2, 2}, {-3, 1},
{-4, 12}, {-8, 8}, {-12, 4},
{-5, 15}, {-10, 10}, {-15, 5} ;
}

View File

@ -0,0 +1,20 @@
netcdf test_struct_nested {
types:
compound x_field1_t {
int x ;
int y ;
}; // x_field1_t
compound x_field2_t {
int x ;
int y ;
}; // x_field2_t
compound x_t {
x_field1_t field1 ;
x_field2_t field2 ;
}; // x_t
variables:
x_t x ;
data:
x = {{1, -2}, {255, 90}} ;
}

View File

@ -0,0 +1,17 @@
netcdf test_struct_nested3 {
types:
compound x_field3_field2_t {
int field1 ;
}; // x_field3_field2_t
compound x_field3_t {
x_field3_field2_t field2 ;
}; // x_field3_t
compound x_t {
x_field3_t field3 ;
}; // x_t
variables:
x_t x ;
data:
x = {{{17}}} ;
}

View File

@ -0,0 +1,12 @@
netcdf test_struct_type {
types:
compound s_t {
int x ;
int y ;
}; // s_t
variables:
s_t s ;
data:
s = {1, -2} ;
}

View File

@ -0,0 +1,9 @@
netcdf test_test {
types:
byte enum enum_t {c1 = 1, c2 = 2, c3 = 3} ;
variables:
enum_t v1 ;
data:
v1 = c1 ;
}

View File

@ -0,0 +1,37 @@
netcdf test_unlim {
dimensions:
lon = 2 ;
time = UNLIMITED ; // (2 currently)
lat = 3 ;
variables:
float lon(lon) ;
string lon:units = "degrees_east" ;
double time(time) ;
time:_ChunkSizes = 512U ;
string time:units = "seconds since 2009-01-01" ;
float lat(lat) ;
string lat:units = "degrees_north" ;
float pr(time, lat, lon) ;
pr:_ChunkSizes = 1U, 3U, 2U ;
string pr:standard_name = "air_pressure_at_sea_level" ;
string pr:units = "hPa" ;
string pr:_edu.ucar.maps = "/time", "/lat", "/lon" ;
// global attributes:
string :title = "example for workshop" ;
data:
lon = _, _ ;
time = _, _ ;
lat = _, _, _ ;
pr =
0, 1,
2, 3,
4, 5,
10, 11,
12, 13,
14, 15 ;
}

View File

@ -0,0 +1,37 @@
netcdf test_unlim1 {
dimensions:
lon = 2 ;
lat = 3 ;
time = UNLIMITED ; // (2 currently)
variables:
float lon(lon) ;
string lon:units = "degrees_east" ;
double time(time) ;
time:_ChunkSizes = 512U ;
string time:units = "seconds since 2009-01-01" ;
float lat(lat) ;
string lat:units = "degrees_north" ;
float pr(time, lat, lon) ;
pr:_ChunkSizes = 1U, 3U, 2U ;
string pr:standard_name = "air_pressure_at_sea_level" ;
string pr:units = "hPa" ;
string pr:_edu.ucar.maps = "/time", "/lat", "/lon" ;
// global attributes:
string :title = "example for workshop" ;
data:
lon = _, _ ;
time = _, _ ;
lat = _, _, _ ;
pr =
0, 1,
2, 3,
4, 5,
10, 11,
12, 13,
14, 15 ;
}

View File

@ -0,0 +1,9 @@
netcdf test_utf8 {
dimensions:
d2 = 2 ;
variables:
string vs(d2) ;
data:
vs = "Καλημέα", "abc" ;
}

View File

@ -0,0 +1,12 @@
netcdf test_vlen1 {
types:
compound x_base_t {
int x ;
}; // x_base_t
x_base_t(*) x_t ;
variables:
x_t x ;
data:
x = {{1}, {3}, {5}, {7}} ;
}

View File

@ -0,0 +1,12 @@
netcdf test_vlen11 {
types:
compound v_base_t {
int v ;
}; // v_base_t
v_base_t(*) v_t ;
variables:
v_t v ;
data:
v = {{4}, {754}} ;
}

View File

@ -0,0 +1,18 @@
netcdf test_vlen2 {
types:
compound x_base_t {
int x ;
}; // x_base_t
x_base_t(*) x_t ;
dimensions:
d3 = 3 ;
d2 = 2 ;
variables:
x_t x(d3, d2) ;
data:
x =
{{1}, {3}, {5}, {7}}, {{100}, {200}},
{{-1}, {-2}}, {{1}, {3}, {5}, {7}},
{{100}, {200}}, {{-1}, {-2}} ;
}

View File

@ -0,0 +1,15 @@
netcdf test_vlen3 {
types:
compound v1_f1_base_t {
int f1 ;
}; // v1_f1_base_t
v1_f1_base_t(*) v1_f1_t ;
compound v1_t {
v1_f1_t f1 ;
}; // v1_t
variables:
v1_t v1 ;
data:
v1 = {{{1}, {3}, {5}, {7}}} ;
}

View File

@ -0,0 +1,17 @@
netcdf test_vlen4 {
types:
compound v1_f1_base_t {
int f1 ;
}; // v1_f1_base_t
v1_f1_base_t(*) v1_f1_t ;
compound v1_t {
v1_f1_t f1(2) ;
}; // v1_t
dimensions:
_Anonymous2 = 2 ;
variables:
v1_t v1 ;
data:
v1 = {{{{1}, {3}, {5}, {7}}, {}}} ;
}

View File

@ -0,0 +1,17 @@
netcdf test_vlen5 {
types:
compound v1_v_base_t {
int v ;
}; // v1_v_base_t
v1_v_base_t(*) v1_v_t ;
compound v1_t {
v1_v_t v ;
}; // v1_t
dimensions:
d2 = 2 ;
variables:
v1_t v1(d2) ;
data:
v1 = {{{1}, {3}, {5}, {7}}}, {{{100}, {200}}} ;
}

View File

@ -0,0 +1,14 @@
netcdf test_vlen6 {
types:
compound v1_base_t {
int v1 ;
}; // v1_base_t
v1_base_t(*) v1_t ;
dimensions:
d = 2 ;
variables:
v1_t v1(d) ;
data:
v1 = {{1}, {3}, {5}, {7}}, {{17}, {19}} ;
}

View File

@ -0,0 +1,14 @@
netcdf test_vlen7 {
types:
compound v1_base_t {
int v1 ;
}; // v1_base_t
v1_base_t(*) v1_t ;
dimensions:
d = 1 ;
variables:
v1_t v1(d) ;
data:
v1 = {{17}, {19}, {21}} ;
}

View File

@ -0,0 +1,17 @@
netcdf test_vlen8 {
types:
compound v1_base_t {
int v1 ;
}; // v1_base_t
v1_base_t(*) v1_t ;
dimensions:
d1 = 2 ;
d2 = 2 ;
variables:
v1_t v1(d1, d2) ;
data:
v1 =
{{1}, {3}, {5}, {7}}, {{17}, {19}},
{{11}, {33}, {55}, {77}}, {{717}, {919}} ;
}

View File

@ -0,0 +1,24 @@
netcdf test_zerodim {
dimensions:
lon = 4 ;
time = UNLIMITED ; // (0 currently)
lat = 6 ;
unlim = UNLIMITED ; // (3 currently)
variables:
float var(unlim) ;
var:_ChunkSizes = 1024U ;
float lon(lon) ;
string lon:units = "degrees_east" ;
float lat(lat) ;
string lat:units = "degrees_north" ;
// global attributes:
string :title = "example for workshop" ;
data:
var = 0, 1, 3 ;
lon = _, _, _, _ ;
lat = _, _, _, _, _, _ ;
}

View File

@ -10,7 +10,7 @@ set -e
echo "test_remote.sh:"
#BIG=1
#NOCSUM=1
#CSUM=1
computetestablefiles
@ -24,13 +24,19 @@ fi
if test "x${RESET}" = x1 ; then rm -fr ${BASELINEREM}/*.ncdump ; fi
for f in $F ; do
URL="[log][show=fetch][dap4]${TESTSERVER}/testfiles/${f}"
FRAG="#dap4&log&show=fetch"
QUERY=""
if test "x$BIG" = x1; then
URL="[ucar.littleendian=0]${URL}"
FRAG="${FRAG}&ucar.littleendian=0"
fi
if test "x$NOCSUM" = x1; then
URL="[ucar.checksummode=none]${URL}"
if test "x$CSUM" = x1 ; then
QUERY="${QUERY}&dap4.checksum=true"
else
QUERY="${QUERY}${QCHAR}&dap4.checksum=false"
fi
# Fix up QUERY
if test "x$QUERY" != x ; then QUERY=`echo -n $QUERY | sed -e 's/^&/?/'` ; fi
URL="${TESTSERVER}/testfiles/${f}${QUERY}${FRAG}"
${NCDUMP} ${DUMPFLAGS} "${URL}" > ${builddir}/results_test_remote/${f}.ncdump
if test "x${TEST}" = x1 ; then
diff -wBb "${BASELINEREM}/${f}.ncdump" "${builddir}/results_test_remote/${f}.ncdump"