mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Merge pull request #2631 from DennisHeimbigner/distcheck.dmh
Fix a distcheck failure with nczarr_test/run_interop.sh
This commit is contained in:
commit
0034e31e58
@ -7,9 +7,9 @@ This file contains a high-level description of this package's evolution. Release
|
||||
|
||||
## 4.9.2 - TBD
|
||||
|
||||
|
||||
* Fix 'make distcheck' error in run_interop.sh. See [Github #????](https://github.com/Unidata/netcdf-c/pull/????).
|
||||
* Update `nc-config` to remove inclusion from automatically-detected `nf-config` and `ncxx-config` files, as the wrong files could be included in the output. This is in support of [GitHub #2274](https://github.com/Unidata/netcdf-c/issues/2274).
|
||||
* [Bug Fix] Update H5FDhttp.[ch] to work with HDF5 version 1.14.0. See [Github #2615](https://github.com/Unidata/netcdf-c/pull/2615).
|
||||
* Update H5FDhttp.[ch] to work with HDF5 version 1.14.0. See [Github #2615](https://github.com/Unidata/netcdf-c/pull/2615).
|
||||
|
||||
## 4.9.1 - February 2, 2023
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "H5Ipublic.h"
|
||||
|
||||
#if H5_VERSION_GE(1,14,0)
|
||||
#define H5_VFD_HTTP ((H5FD_class_value_t)(H5_VFD_MAX - 2))
|
||||
#define H5_VFD_HTTP ((H5FD_class_value_t)(514))
|
||||
#define H5FD_HTTP (H5FDperform_init(H5FD_http_init))
|
||||
#else
|
||||
#define H5FD_HTTP (H5FD_http_init())
|
||||
|
@ -164,7 +164,8 @@ ref_string.cdl ref_string_nczarr.baseline ref_string_zarr.baseline ref_scalar.cd
|
||||
ref_nulls_nczarr.baseline ref_nulls_zarr.baseline ref_nulls.cdl
|
||||
|
||||
# Interoperability files
|
||||
EXTRA_DIST += ref_power_901_constants_orig.zip ref_power_901_constants.cdl ref_quotes_orig.zip ref_quotes.cdl
|
||||
EXTRA_DIST += ref_power_901_constants_orig.zip ref_power_901_constants.cdl ref_quotes_orig.zip ref_quotes.cdl \
|
||||
ref_zarr_test_data.cdl.gz
|
||||
|
||||
CLEANFILES = ut_*.txt ut*.cdl tmp*.nc tmp*.cdl tmp*.txt tmp*.dmp tmp*.zip tmp*.nc tmp*.dump tmp*.tmp tmp_ngc.c ref_zarr_test_data.cdl tst_*.nc.zip ref_quotes.zip ref_power_901_constants.zip
|
||||
|
||||
|
@ -17,35 +17,35 @@ UB="${NCZARR_S3_TEST_BUCKET}"
|
||||
|
||||
testcasefile() {
|
||||
zext=file
|
||||
ref=$1
|
||||
base=$1
|
||||
mode=$2
|
||||
metaonly=$3
|
||||
if test "x$metaonly" = xmetaonly ; then flags="-h"; fi
|
||||
fileargs ${execdir}/$ref "mode=$mode,$zext"
|
||||
rm -f tmp_${ref}_${zext}.cdl
|
||||
${NCDUMP} $flags $fileurl > tmp_${ref}_${zext}.cdl
|
||||
diff -b ${srcdir}/${ref}.cdl tmp_${ref}_${zext}.cdl
|
||||
fileargs ${builddir}/ref_$base "mode=$mode,$zext"
|
||||
rm -f tmp_${base}_${zext}.cdl
|
||||
${NCDUMP} $flags $fileurl > tmp_${base}_${zext}.cdl
|
||||
diff -b ${srcdir}/ref_${base}.cdl tmp_${base}_${zext}.cdl
|
||||
}
|
||||
|
||||
testcasezip() {
|
||||
zext=zip
|
||||
ref=$1
|
||||
base=$1
|
||||
mode=$2
|
||||
fileargs $ref "mode=$mode,$zext"
|
||||
rm -f tmp_${ref}_${zext}.cdl
|
||||
${NCDUMP} -h $flags $fileurl > tmp_${ref}_${zext}.cdl
|
||||
diff -b ${srcdir}/${ref}.cdl tmp_${ref}_${zext}.cdl
|
||||
fileargs ${builddir}/ref_$base "mode=$mode,$zext"
|
||||
rm -f tmp_${base}_${zext}.cdl
|
||||
${NCDUMP} -h $flags $fileurl > tmp_${base}_${zext}.cdl
|
||||
diff -b ${srcdir}/ref_${base}.cdl tmp_${base}_${zext}.cdl
|
||||
}
|
||||
|
||||
testcases3() {
|
||||
zext=s3
|
||||
zarr=$1
|
||||
ref=$2
|
||||
mode=$3
|
||||
rm -f tmp_${zarr}_${zext}.cdl
|
||||
url="https://${UH}/${UB}/${zarr}#mode=${mode},s3"
|
||||
${NCDUMP} $url > tmp_${zarr}_${zext}.cdl
|
||||
diff -b ${srcdir}/${ref}.cdl tmp_${zarr}_${zext}.cdl
|
||||
base=$1
|
||||
mode=$2
|
||||
rm -f tmp_${base}_${zext}.cdl
|
||||
url="https://${UH}/${UB}/${base}.zarr#mode=${mode},s3"
|
||||
${NCDUMP} $url > tmp_${base}_${zext}.cdl
|
||||
# Find the proper ref file
|
||||
diff -b ${builddir}/ref_${base}.cdl tmp_${base}_${zext}.cdl
|
||||
}
|
||||
|
||||
testallcases() {
|
||||
@ -54,27 +54,35 @@ case "$zext" in
|
||||
file)
|
||||
# need to unpack
|
||||
rm -fr ref_power_901_constants ref_power_901_constants.file
|
||||
unzip ${srcdir}/ref_power_901_constants_orig.zip > /dev/null
|
||||
mv ref_power_901_constants ref_power_901_constants.file
|
||||
testcasefile ref_power_901_constants zarr metaonly; # test xarray as default
|
||||
if ! test -f ${builddir}/ref_power_901_constants_orig.zip ; then
|
||||
cp -f ${srcdir}/ref_power_901_constants_orig.zip ${builddir}/ref_power_901_constants_orig.zip
|
||||
fi
|
||||
unzip ${builddir}/ref_power_901_constants_orig.zip > /dev/null
|
||||
mv ${builddir}/ref_power_901_constants ${builddir}/ref_power_901_constants.file
|
||||
testcasefile power_901_constants zarr metaonly; # test xarray as default
|
||||
;;
|
||||
zip)
|
||||
# Move into position
|
||||
cp ${srcdir}/ref_power_901_constants_orig.zip ${execdir}/ref_power_901_constants.zip
|
||||
cp ${srcdir}/ref_quotes_orig.zip ${execdir}/ref_quotes.zip
|
||||
testcasezip ref_power_901_constants xarray metaonly
|
||||
if ! test -f ${builddir}/ref_power_901_constants.zip ; then
|
||||
cp -f ${srcdir}/ref_power_901_constants_orig.zip ${builddir}/ref_power_901_constants.zip
|
||||
fi
|
||||
if ! test -f ${builddir}/ref_quotes.zip ; then
|
||||
cp -f ${srcdir}/ref_quotes_orig.zip ${builddir}/ref_quotes.zip
|
||||
fi
|
||||
testcasezip power_901_constants xarray metaonly
|
||||
# Test large constant interoperability
|
||||
testcasezip ref_quotes zarr metaonly
|
||||
testcasezip quotes zarr metaonly
|
||||
;;
|
||||
s3)
|
||||
# Read a test case created by netcdf-java zarr.
|
||||
# Move into position
|
||||
rm -f ${execdir}/ref_zarr_test_data.cdl
|
||||
# Use gunzip because it always appears to be available
|
||||
if ! test -f ${srcdir}/ref_zarr_test_data.cdl ; then
|
||||
gunzip -c ${srcdir}/ref_zarr_test_data.cdl.gz > ${srcdir}/ref_zarr_test_data.cdl
|
||||
rm -f ${builddir}/ref_zarr_test_data.cdl
|
||||
if ! test -f ${builddir}/ref_zarr_test_data.cdl.gz ; then
|
||||
cp -f ${srcdir}/ref_zarr_test_data.cdl.gz ${builddir}/ref_zarr_test_data.cdl.gz
|
||||
fi
|
||||
testcases3 zarr_test_data.zarr ref_zarr_test_data xarray
|
||||
# Use gunzip because it always appears to be available
|
||||
gunzip -c ${builddir}/ref_zarr_test_data.cdl.gz > ${builddir}/ref_zarr_test_data.cdl
|
||||
testcases3 zarr_test_data xarray
|
||||
;;
|
||||
*) echo "unimplemented kind: $1" ; exit 1;;
|
||||
esac
|
||||
@ -83,9 +91,9 @@ esac
|
||||
testallcases file
|
||||
if test "x$FEATURE_NCZARR_ZIP" = xyes ; then testallcases zip; fi
|
||||
if test "x$FEATURE_S3TESTS" = xyes ; then testallcases s3; fi
|
||||
exit
|
||||
|
||||
# Cleanup
|
||||
rm -fr ${execdir}/ref_power_901_constants.file
|
||||
rm -f ${execdir}/ref_zarr_test_data.cdl
|
||||
rm -fr ${builddir}/ref_power_901_constants_orig.zip
|
||||
rm -fr ${builddir}/ref_zarr_test_data.cdl.gz
|
||||
|
||||
exit 0
|
||||
|
@ -128,7 +128,7 @@ main(int argc, char** argv)
|
||||
|
||||
dumpoptions.nctype = NC_UBYTE; /* default */
|
||||
|
||||
while ((c = getopt(argc, argv, "df:k:p:t:T:u:v")) != EOF) {
|
||||
while ((c = getopt(argc, argv, "df:hk:p:t:T:u:v")) != EOF) {
|
||||
switch(c) {
|
||||
case 'd':
|
||||
dumpoptions.debug = 1;
|
||||
@ -136,6 +136,9 @@ main(int argc, char** argv)
|
||||
case 'f':
|
||||
dumpoptions.filename = strdup(optarg);
|
||||
break;
|
||||
case 'h':
|
||||
usage();
|
||||
return 0;
|
||||
case 'k': {
|
||||
size_t len = strlen(optarg);
|
||||
dumpoptions.key = (char*)malloc(len+1+1);
|
||||
|
Loading…
Reference in New Issue
Block a user