mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-11 16:40:36 +08:00
Fix a distcheck failure with nczarr_test/run_interop.sh
The problem was that files were being copied into the ${srcdir} rather than ${builddir} directory.
This commit is contained in:
parent
bb81ab332f
commit
295c132789
@ -1,4 +1,4 @@
|
|||||||
Release Notes {#RELEASE_NOTES}
|
1Release Notes {#RELEASE_NOTES}
|
||||||
=============
|
=============
|
||||||
|
|
||||||
\brief Release notes file for the netcdf-c package.
|
\brief Release notes file for the netcdf-c package.
|
||||||
@ -7,9 +7,9 @@ This file contains a high-level description of this package's evolution. Release
|
|||||||
|
|
||||||
## 4.9.2 - TBD
|
## 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).
|
* 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
|
## 4.9.1 - February 2, 2023
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include "H5Ipublic.h"
|
#include "H5Ipublic.h"
|
||||||
|
|
||||||
#if H5_VERSION_GE(1,14,0)
|
#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))
|
#define H5FD_HTTP (H5FDperform_init(H5FD_http_init))
|
||||||
#else
|
#else
|
||||||
#define H5FD_HTTP (H5FD_http_init())
|
#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
|
ref_nulls_nczarr.baseline ref_nulls_zarr.baseline ref_nulls.cdl
|
||||||
|
|
||||||
# Interoperability files
|
# 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
|
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() {
|
testcasefile() {
|
||||||
zext=file
|
zext=file
|
||||||
ref=$1
|
base=$1
|
||||||
mode=$2
|
mode=$2
|
||||||
metaonly=$3
|
metaonly=$3
|
||||||
if test "x$metaonly" = xmetaonly ; then flags="-h"; fi
|
if test "x$metaonly" = xmetaonly ; then flags="-h"; fi
|
||||||
fileargs ${execdir}/$ref "mode=$mode,$zext"
|
fileargs ${builddir}/ref_$base "mode=$mode,$zext"
|
||||||
rm -f tmp_${ref}_${zext}.cdl
|
rm -f tmp_${base}_${zext}.cdl
|
||||||
${NCDUMP} $flags $fileurl > tmp_${ref}_${zext}.cdl
|
${NCDUMP} $flags $fileurl > tmp_${base}_${zext}.cdl
|
||||||
diff -b ${srcdir}/${ref}.cdl tmp_${ref}_${zext}.cdl
|
diff -b ${srcdir}/ref_${base}.cdl tmp_${base}_${zext}.cdl
|
||||||
}
|
}
|
||||||
|
|
||||||
testcasezip() {
|
testcasezip() {
|
||||||
zext=zip
|
zext=zip
|
||||||
ref=$1
|
base=$1
|
||||||
mode=$2
|
mode=$2
|
||||||
fileargs $ref "mode=$mode,$zext"
|
fileargs ${builddir}/ref_$base "mode=$mode,$zext"
|
||||||
rm -f tmp_${ref}_${zext}.cdl
|
rm -f tmp_${base}_${zext}.cdl
|
||||||
${NCDUMP} -h $flags $fileurl > tmp_${ref}_${zext}.cdl
|
${NCDUMP} -h $flags $fileurl > tmp_${base}_${zext}.cdl
|
||||||
diff -b ${srcdir}/${ref}.cdl tmp_${ref}_${zext}.cdl
|
diff -b ${srcdir}/ref_${base}.cdl tmp_${base}_${zext}.cdl
|
||||||
}
|
}
|
||||||
|
|
||||||
testcases3() {
|
testcases3() {
|
||||||
zext=s3
|
zext=s3
|
||||||
zarr=$1
|
base=$1
|
||||||
ref=$2
|
mode=$2
|
||||||
mode=$3
|
rm -f tmp_${base}_${zext}.cdl
|
||||||
rm -f tmp_${zarr}_${zext}.cdl
|
url="https://${UH}/${UB}/${base}.zarr#mode=${mode},s3"
|
||||||
url="https://${UH}/${UB}/${zarr}#mode=${mode},s3"
|
${NCDUMP} $url > tmp_${base}_${zext}.cdl
|
||||||
${NCDUMP} $url > tmp_${zarr}_${zext}.cdl
|
# Find the proper ref file
|
||||||
diff -b ${srcdir}/${ref}.cdl tmp_${zarr}_${zext}.cdl
|
diff -b ${builddir}/ref_${base}.cdl tmp_${base}_${zext}.cdl
|
||||||
}
|
}
|
||||||
|
|
||||||
testallcases() {
|
testallcases() {
|
||||||
@ -54,27 +54,35 @@ case "$zext" in
|
|||||||
file)
|
file)
|
||||||
# need to unpack
|
# need to unpack
|
||||||
rm -fr ref_power_901_constants ref_power_901_constants.file
|
rm -fr ref_power_901_constants ref_power_901_constants.file
|
||||||
unzip ${srcdir}/ref_power_901_constants_orig.zip > /dev/null
|
if ! test -f ${builddir}/ref_power_901_constants_orig.zip ; then
|
||||||
mv ref_power_901_constants ref_power_901_constants.file
|
cp -f ${srcdir}/ref_power_901_constants_orig.zip ${builddir}/ref_power_901_constants_orig.zip
|
||||||
testcasefile ref_power_901_constants zarr metaonly; # test xarray as default
|
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)
|
zip)
|
||||||
# Move into position
|
# Move into position
|
||||||
cp ${srcdir}/ref_power_901_constants_orig.zip ${execdir}/ref_power_901_constants.zip
|
if ! test -f ${builddir}/ref_power_901_constants.zip ; then
|
||||||
cp ${srcdir}/ref_quotes_orig.zip ${execdir}/ref_quotes.zip
|
cp -f ${srcdir}/ref_power_901_constants_orig.zip ${builddir}/ref_power_901_constants.zip
|
||||||
testcasezip ref_power_901_constants xarray metaonly
|
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
|
# Test large constant interoperability
|
||||||
testcasezip ref_quotes zarr metaonly
|
testcasezip quotes zarr metaonly
|
||||||
;;
|
;;
|
||||||
s3)
|
s3)
|
||||||
# Read a test case created by netcdf-java zarr.
|
# Read a test case created by netcdf-java zarr.
|
||||||
# Move into position
|
# Move into position
|
||||||
rm -f ${execdir}/ref_zarr_test_data.cdl
|
rm -f ${builddir}/ref_zarr_test_data.cdl
|
||||||
# Use gunzip because it always appears to be available
|
if ! test -f ${builddir}/ref_zarr_test_data.cdl.gz ; then
|
||||||
if ! test -f ${srcdir}/ref_zarr_test_data.cdl ; then
|
cp -f ${srcdir}/ref_zarr_test_data.cdl.gz ${builddir}/ref_zarr_test_data.cdl.gz
|
||||||
gunzip -c ${srcdir}/ref_zarr_test_data.cdl.gz > ${srcdir}/ref_zarr_test_data.cdl
|
|
||||||
fi
|
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;;
|
*) echo "unimplemented kind: $1" ; exit 1;;
|
||||||
esac
|
esac
|
||||||
@ -83,9 +91,9 @@ esac
|
|||||||
testallcases file
|
testallcases file
|
||||||
if test "x$FEATURE_NCZARR_ZIP" = xyes ; then testallcases zip; fi
|
if test "x$FEATURE_NCZARR_ZIP" = xyes ; then testallcases zip; fi
|
||||||
if test "x$FEATURE_S3TESTS" = xyes ; then testallcases s3; fi
|
if test "x$FEATURE_S3TESTS" = xyes ; then testallcases s3; fi
|
||||||
exit
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
rm -fr ${execdir}/ref_power_901_constants.file
|
rm -fr ${builddir}/ref_power_901_constants_orig.zip
|
||||||
rm -f ${execdir}/ref_zarr_test_data.cdl
|
rm -fr ${builddir}/ref_zarr_test_data.cdl.gz
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -128,7 +128,7 @@ main(int argc, char** argv)
|
|||||||
|
|
||||||
dumpoptions.nctype = NC_UBYTE; /* default */
|
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) {
|
switch(c) {
|
||||||
case 'd':
|
case 'd':
|
||||||
dumpoptions.debug = 1;
|
dumpoptions.debug = 1;
|
||||||
@ -136,6 +136,9 @@ main(int argc, char** argv)
|
|||||||
case 'f':
|
case 'f':
|
||||||
dumpoptions.filename = strdup(optarg);
|
dumpoptions.filename = strdup(optarg);
|
||||||
break;
|
break;
|
||||||
|
case 'h':
|
||||||
|
usage();
|
||||||
|
return 0;
|
||||||
case 'k': {
|
case 'k': {
|
||||||
size_t len = strlen(optarg);
|
size_t len = strlen(optarg);
|
||||||
dumpoptions.key = (char*)malloc(len+1+1);
|
dumpoptions.key = (char*)malloc(len+1+1);
|
||||||
|
Loading…
Reference in New Issue
Block a user