Testing: Fix test for AppVeyor

This commit is contained in:
Shahram Najm 2021-08-16 10:48:00 +01:00
parent 863bf14e22
commit 2fec9b19c4
1 changed files with 14 additions and 13 deletions

View File

@ -53,21 +53,22 @@ if test "x$NC_DUMPER" != "x"; then
grep -q "short tp_0001" $tempText
fi
echo "Test HDF5 decoding ..."
# -------------------------
# Note: this is only available in NetCDF-4. So need to check if the command worked with -k3
input=${data_dir}/sample.grib2
set +e
${tools_dir}/grib_to_netcdf -k3 -o $tempNetcdf $input 2>/dev/null
stat=$?
set -e
if [ $stat -eq 0 ]; then
have_netcdf4=1
res=`${tools_dir}/grib_get -TA -p identifier,versionNumberOfSuperblock $tempNetcdf`
[ "$res" = "HDF5 0" ]
if [ $ECCODES_ON_WINDOWS -eq 0 ]; then
echo "Test HDF5 decoding ..."
# ---------------------------
# Note: this is only available in NetCDF-4. So need to check if the command worked with -k3
input=${data_dir}/sample.grib2
set +e
${tools_dir}/grib_to_netcdf -k3 -o $tempNetcdf $input 2>/dev/null
stat=$?
set -e
if [ $stat -eq 0 ]; then
have_netcdf4=1
res=`${tools_dir}/grib_get -TA -p identifier,versionNumberOfSuperblock $tempNetcdf`
[ "$res" = "HDF5 0" ]
fi
fi
grib_files="\
regular_latlon_surface.grib2 \
regular_latlon_surface.grib1 \