2010-06-03 21:24:43 +08:00
|
|
|
#!/bin/sh
|
2017-03-09 08:01:10 +08:00
|
|
|
|
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
|
|
|
. ../test_common.sh
|
|
|
|
|
|
|
|
|
2010-06-03 21:24:43 +08:00
|
|
|
# This shell script runs the backward compatibility tests.
|
|
|
|
|
|
|
|
set -e
|
2015-02-03 01:37:51 +08:00
|
|
|
|
2010-06-03 21:24:43 +08:00
|
|
|
echo ""
|
2011-04-26 01:09:14 +08:00
|
|
|
echo "*** Testing that this version can read data produced by old versions of netCDF."
|
2010-06-03 21:24:43 +08:00
|
|
|
echo "*** checking ref_nc_test_netcdf4_4_0.nc..."
|
2021-12-24 13:18:56 +08:00
|
|
|
${NCDUMP} -n ref_nc_test_netcdf4_4_0 $srcdir/ref_nc_test_netcdf4_4_0.nc > tst_nc_test_netcdf4_4_0.cdl
|
2012-02-06 03:34:03 +08:00
|
|
|
# Why drop the first two lines?
|
|
|
|
#tail -n +2 < $srcdir/ref_nc_test_netcdf4.cdl > tmp.cdl
|
|
|
|
#tail -n +2 < tst_nc_test_netcdf4_4_0.cdl > tmp_4_0.cdl
|
2012-05-09 03:36:27 +08:00
|
|
|
#diff -b -w tmp.cdl tmp_4_0.cdl
|
2015-02-04 03:39:41 +08:00
|
|
|
diff -b -w $srcdir/ref_nc_test_netcdf4.cdl tst_nc_test_netcdf4_4_0.cdl
|
2012-02-06 03:34:03 +08:00
|
|
|
|
2011-04-26 01:10:01 +08:00
|
|
|
# echo "*** Testing that old versions can read data produced by this version of netCDF."
|
|
|
|
# echo "*** checking version 4.0..."
|
2017-03-09 08:01:10 +08:00
|
|
|
# ${NCGEN} -b -o tst_nc_test_netcdf4 -k nc7 $srcdir/ref_nc_test_netcdf4.cdl
|
2011-04-26 01:10:01 +08:00
|
|
|
# /machine/local_4.0/bin/ncdump tst_nc_test_netcdf4.nc > tst_nc_test_netcdf4.cdl
|
2011-05-13 01:51:32 +08:00
|
|
|
# tail -n +2 <$srcdir/ref_nc_test_netcdf4.cdl > tmp.cdl
|
|
|
|
# tail -n +2 <tst_nc_test_netcdf4.cdl > tmp_4_0.cdl
|
2012-05-09 03:36:27 +08:00
|
|
|
# diff -b -w tmp.cdl tmp_4_0.cdl
|
2011-04-26 01:09:14 +08:00
|
|
|
|
2011-04-26 01:10:01 +08:00
|
|
|
# echo "*** checking version 4.1.1..."
|
2017-03-09 08:01:10 +08:00
|
|
|
# ${NCGEN} -b -o tst_nc_test_netcdf4 -k nc7 $srcdir/ref_nc_test_netcdf4.cdl
|
2011-04-26 01:10:01 +08:00
|
|
|
# /machine/local_4.1.1/bin/ncdump tst_nc_test_netcdf4.nc > tst_nc_test_netcdf4.cdl
|
2011-05-13 01:51:32 +08:00
|
|
|
# tail -n +2 <$srcdir/ref_nc_test_netcdf4.cdl > tmp.cdl
|
|
|
|
# tail -n +2 <tst_nc_test_netcdf4.cdl > tmp_4_0.cdl
|
2012-05-09 03:36:27 +08:00
|
|
|
# diff -b -w tmp.cdl tmp_4_0.cdl
|
2011-04-26 01:09:14 +08:00
|
|
|
|
2010-06-03 21:24:43 +08:00
|
|
|
echo "*** All backward compatibility tests passed!"
|
|
|
|
exit 0
|