mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-15 08:30:11 +08:00
6d8809100f
1. When running under windows (as opposed to cygwin) we need to make sure to not user /cygdrive/ file paths. This was ocurring in libdap4/d4read.c, but may occur elsewhere. 2. Shell scripts in the git repo are not being checked-out with the executable mode set. Had core.filemode set to false. Was a major hassle to fix.
55 lines
1.6 KiB
Bash
55 lines
1.6 KiB
Bash
#!/bin/sh
|
|
# test ncgen3 for generating classic and 64-bit offset files
|
|
# Argument, if any, is a directory into which (large) files are written.
|
|
|
|
case $# in
|
|
0)
|
|
LFSDIR=. ;;
|
|
1)
|
|
LFSDIR=$1 ;;
|
|
*)
|
|
echo too many args
|
|
exit 1
|
|
esac
|
|
|
|
NCGEN=./ncgen3
|
|
NCDUMP=../ncdump/ncdump
|
|
|
|
# test large netCDF files with fixed vars, record vars
|
|
for version in 1 2; do # version 1 is classic, version 2 is 64-bit offset
|
|
for file in bigf$version bigr$version; do
|
|
if $NCGEN -b -x -v $version -o $LFSDIR/$file.nc $file.cdl
|
|
then
|
|
echo "*** success: $NCGEN -b -x -v $version -o $LFSDIR/$file.nc $file.cdl"
|
|
rm $LFSDIR/$file.nc
|
|
else
|
|
echo "### failure: $NCGEN -b -x -v $version -o $LFSDIR/$file.nc $file.cdl"
|
|
exit 1
|
|
fi
|
|
done
|
|
done
|
|
|
|
# test for detection of variables that are too big for classic format
|
|
for file in bigf2 bigr2; do
|
|
if $NCGEN -b -x -v 1 -o $LFSDIR/$file.nc $file.cdl 2>/dev/null
|
|
then
|
|
echo "### failure detecting error: $NCGEN -b -x -v 1 -o $LFSDIR/$file.nc $file.cdl"
|
|
rm -f $file.nc
|
|
else
|
|
echo "*** success detecting error: $NCGEN -b -x -v 1 -o $LFSDIR/$file.nc $file.cdl"
|
|
fi
|
|
done
|
|
|
|
# test for detection of variables that are too big for 64-bit offset format
|
|
for file in bigf3 bigr3; do
|
|
if $NCGEN -b -x -v 2 -o $LFSDIR/$file.nc $file.cdl 2>/dev/null
|
|
then
|
|
echo "### failure detecting error: $NCGEN -b -x -v 2 -o $LFSDIR/$file.nc $file.cdl"
|
|
rm -f $file.nc
|
|
else
|
|
echo "*** success detecting error: $NCGEN -b -x -v 2 -o $LFSDIR/$file.nc $file.cdl"
|
|
fi
|
|
done
|
|
|
|
rm -f test.cdl *.nc
|