mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-21 08:39:46 +08:00
7b09290a3a
re: https://github.com/Unidata/netcdf-c/issues/2338 re: https://github.com/Unidata/netcdf-c/issues/2294 In issue https://github.com/Unidata/netcdf-c/issues/2338, Ed Hartnett suggested a better way to install filters to a user defined location -- for Automake, anyway. This PR implements that suggestion. It turns out to be more complicated than it appears, so there are fair number of changes; mostly to shell scripts. Most of the change is in plugins/Makefile.am. NOTE: this PR still does NOT address the use of HDF5_PLUGIN_PATH as the default; this turns out to be complex when dealing with NCZarr. So this will be addressed in a subsequent post 4.9.0 PR. ## Misc. Changes 1. Record the occurrences of incomplete codecs in libnczarr so that they can be included in _Codecs attribute correctly. This allows users to see what missing filters are referenced in the Zarr file. Primarily affects libnczarr/zfilter.[ch]. Also required creating a new no-effect filter: H5Zunknown.c. 2. Move the unknown filter test to a separate test file. 3. Incorporates PR https://github.com/Unidata/netcdf-c/pull/2343
57 lines
1.6 KiB
Bash
Executable File
57 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
|
. ../test_common.sh
|
|
|
|
set -e
|
|
|
|
# Test scoping rules for types and dimensions
|
|
|
|
# Type test cases
|
|
# group_only - type defined in same group as var/attr
|
|
# ancestor_only - type defined in some ancestor group of var/attr
|
|
# ancestor_subgroup - type defined in both ancestor group and subgroup
|
|
# preorder - type defined in some preceding, non ancestor group
|
|
|
|
# Dimension test cases
|
|
# group_only - dim defined in same group as var
|
|
# ancestor_only - dim defined in some ancestor group of var
|
|
# ancestor_subgroup - dim defined in both ancestor group and subgroup
|
|
|
|
TSTS="scope_group_only scope_ancestor_only scope_ancestor_subgroup scope_preorder"
|
|
|
|
setup() {
|
|
${NCGEN} -4 -lb ${srcdir}/$1.cdl
|
|
}
|
|
|
|
testcycle() {
|
|
${NCCOPY} ${execdir}/$1.nc ${execdir}/$1_copy.nc
|
|
${NCDUMP} -h -n $1 ${execdir}/$1_copy.nc > copy_$1.cdl
|
|
diff -wB ${srcdir}/$1.cdl ${execdir}/copy_$1.cdl
|
|
}
|
|
|
|
typescope() {
|
|
ls -l ${execdir}/printfqn* ${execdir}/$1.nc ${execdir}/$1_copy.nc
|
|
REFT=`${execdir}/printfqn -f ${execdir}/$1.nc -v test_variable -t`
|
|
COPYT=`${execdir}/printfqn -f ${execdir}/$1_copy.nc -v test_variable -t`
|
|
if test "x$REFT" != "x$COPYT" ; then
|
|
echo "***Fail: ref=${REFT} copy=${COPYT}"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
dimscope() {
|
|
REFT=`${execdir}/printfqn -f ${execdir}/$1.nc -v test_variable -d`
|
|
COPYT=`${execdir}/printfqn -f ${execdir}/$1_copy.nc -v test_variable -d`
|
|
if test "x$REFT" != "x$COPYT" ; then
|
|
echo "***Fail: ref=${REFT} copy=${COPYT}"
|
|
fi
|
|
}
|
|
|
|
for t in $TSTS ; do setup $t; done
|
|
for t in $TSTS ; do testcycle $t; done
|
|
for t in $TSTS ; do typescope $t; done
|
|
for t in $TSTS ; do dimscope $t; done
|
|
|
|
exit 0
|