2018-08-13 13:01:08 +08:00
|
|
|
#!/bin/sh
|
2017-03-09 08:01:10 +08:00
|
|
|
|
2018-05-15 04:37:07 +08:00
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
2017-03-09 08:01:10 +08:00
|
|
|
. ../test_common.sh
|
|
|
|
|
2010-06-03 21:24:43 +08:00
|
|
|
# For a netCDF-4 build, test nccopy on netCDF files in this directory
|
|
|
|
|
2018-10-31 10:48:12 +08:00
|
|
|
if test -f tst_comp2${ext} ; then ${execdir}/tst_comp2 ; fi
|
|
|
|
|
2010-06-03 21:24:43 +08:00
|
|
|
set -e
|
|
|
|
echo ""
|
|
|
|
|
|
|
|
# These files are actually in $srcdir in distcheck builds, so they
|
|
|
|
# need to be handled differently.
|
2015-04-21 03:15:02 +08:00
|
|
|
# ref_tst_compounds2 ref_tst_compounds3 ref_tst_compounds4
|
|
|
|
TESTFILES='tst_comp tst_comp2 tst_enum_data tst_fillbug
|
2010-09-01 06:41:00 +08:00
|
|
|
tst_group_data tst_nans tst_opaque_data tst_solar_1 tst_solar_2
|
Codify cross-platform file paths
The netcdf-c code has to deal with a variety of platforms:
Windows, OSX, Linux, Cygwin, MSYS, etc. These platforms differ
significantly in the kind of file paths that they accept. So in
order to handle this, I have created a set of replacements for
the most common file system operations such as _open_ or _fopen_
or _access_ to manage the file path differences correctly.
A more limited version of this idea was already implemented via
the ncwinpath.h and dwinpath.c code. So this can be viewed as a
replacement for that code. And in path in many cases, the only
change that was required was to replace '#include <ncwinpath.h>'
with '#include <ncpathmgt.h>' and then replace file operation
calls with the NCxxx equivalent from ncpathmgr.h Note that
recently, the ncwinpath.h was renamed ncpathmgmt.h, so this pull
request should not require dealing with winpath.
The heart of the change is include/ncpathmgmt.h, which provides
alternate operations such as NCfopen or NCaccess and which properly
parse and rebuild path arguments to work for the platform on which
the code is executing. This mostly matters for Windows because of the
way that it uses backslash and drive letters, as compared to *nix*.
One important feature is that the user can do string manipulations
on a file path without having to worry too much about the platform
because the path management code will properly handle most mixed cases.
So one can for example concatenate a path suffix that uses forward
slashes to a Windows path and have it work correctly.
The conversion code is in libdispatch/dpathmgr.c, and the
important function there is NCpathcvt which does the proper
conversions to the local path format.
As a rule, most code should just replace their file operations with
the corresponding NCxxx ones defined in include/ncpathmgmt.h. These
NCxxx functions all call NCpathcvt on their path arguments before
executing the actual file operation.
In some rare cases, the client may need to directly use NCpathcvt,
but this should be avoided as much as possible. If there is a need
for supporting a new file operation not already in ncpathmgmt.h, then
use the code in dpathmgr.c as a template. Also please notify Unidata
so we can include it as a formal part or our supported operations.
Also, if you see an operation in the library that is not using the
NCxxx form, then please submit an issue so we can fix it.
Misc. Changes:
* Clean up the utf8 testing code; it is impossible to get some
tests to work under windows using shell scripts; the args do
not pass as utf8 but as some other encoding.
* Added an extra utf8 test case: test_unicode_path.sh
* Add a true test for HDF5 1.10.6 or later because as noted in
PR https://github.com/Unidata/netcdf-c/pull/1794,
HDF5 changed its Windows file path handling.
2021-03-05 04:41:31 +08:00
|
|
|
tst_solar_cmp tst_special_atts tst_string_data'
|
2018-11-16 01:00:38 +08:00
|
|
|
|
|
|
|
if test "x$NC_VLEN_NOTEST" = x ; then
|
Codify cross-platform file paths
The netcdf-c code has to deal with a variety of platforms:
Windows, OSX, Linux, Cygwin, MSYS, etc. These platforms differ
significantly in the kind of file paths that they accept. So in
order to handle this, I have created a set of replacements for
the most common file system operations such as _open_ or _fopen_
or _access_ to manage the file path differences correctly.
A more limited version of this idea was already implemented via
the ncwinpath.h and dwinpath.c code. So this can be viewed as a
replacement for that code. And in path in many cases, the only
change that was required was to replace '#include <ncwinpath.h>'
with '#include <ncpathmgt.h>' and then replace file operation
calls with the NCxxx equivalent from ncpathmgr.h Note that
recently, the ncwinpath.h was renamed ncpathmgmt.h, so this pull
request should not require dealing with winpath.
The heart of the change is include/ncpathmgmt.h, which provides
alternate operations such as NCfopen or NCaccess and which properly
parse and rebuild path arguments to work for the platform on which
the code is executing. This mostly matters for Windows because of the
way that it uses backslash and drive letters, as compared to *nix*.
One important feature is that the user can do string manipulations
on a file path without having to worry too much about the platform
because the path management code will properly handle most mixed cases.
So one can for example concatenate a path suffix that uses forward
slashes to a Windows path and have it work correctly.
The conversion code is in libdispatch/dpathmgr.c, and the
important function there is NCpathcvt which does the proper
conversions to the local path format.
As a rule, most code should just replace their file operations with
the corresponding NCxxx ones defined in include/ncpathmgmt.h. These
NCxxx functions all call NCpathcvt on their path arguments before
executing the actual file operation.
In some rare cases, the client may need to directly use NCpathcvt,
but this should be avoided as much as possible. If there is a need
for supporting a new file operation not already in ncpathmgmt.h, then
use the code in dpathmgr.c as a template. Also please notify Unidata
so we can include it as a formal part or our supported operations.
Also, if you see an operation in the library that is not using the
NCxxx form, then please submit an issue so we can fix it.
Misc. Changes:
* Clean up the utf8 testing code; it is impossible to get some
tests to work under windows using shell scripts; the args do
not pass as utf8 but as some other encoding.
* Added an extra utf8 test case: test_unicode_path.sh
* Add a true test for HDF5 1.10.6 or later because as noted in
PR https://github.com/Unidata/netcdf-c/pull/1794,
HDF5 changed its Windows file path handling.
2021-03-05 04:41:31 +08:00
|
|
|
TESTFILES="$TESTFILES tst_vlen_data"
|
2018-11-16 01:00:38 +08:00
|
|
|
fi
|
2010-06-03 21:24:43 +08:00
|
|
|
|
2010-09-01 06:41:00 +08:00
|
|
|
echo "*** Testing netCDF-4 features of nccopy on ncdump/*.nc files"
|
2010-06-03 21:24:43 +08:00
|
|
|
for i in $TESTFILES ; do
|
2012-06-13 05:50:02 +08:00
|
|
|
echo "*** Test nccopy $i.nc copy_of_$i.nc ..."
|
Codify cross-platform file paths
The netcdf-c code has to deal with a variety of platforms:
Windows, OSX, Linux, Cygwin, MSYS, etc. These platforms differ
significantly in the kind of file paths that they accept. So in
order to handle this, I have created a set of replacements for
the most common file system operations such as _open_ or _fopen_
or _access_ to manage the file path differences correctly.
A more limited version of this idea was already implemented via
the ncwinpath.h and dwinpath.c code. So this can be viewed as a
replacement for that code. And in path in many cases, the only
change that was required was to replace '#include <ncwinpath.h>'
with '#include <ncpathmgt.h>' and then replace file operation
calls with the NCxxx equivalent from ncpathmgr.h Note that
recently, the ncwinpath.h was renamed ncpathmgmt.h, so this pull
request should not require dealing with winpath.
The heart of the change is include/ncpathmgmt.h, which provides
alternate operations such as NCfopen or NCaccess and which properly
parse and rebuild path arguments to work for the platform on which
the code is executing. This mostly matters for Windows because of the
way that it uses backslash and drive letters, as compared to *nix*.
One important feature is that the user can do string manipulations
on a file path without having to worry too much about the platform
because the path management code will properly handle most mixed cases.
So one can for example concatenate a path suffix that uses forward
slashes to a Windows path and have it work correctly.
The conversion code is in libdispatch/dpathmgr.c, and the
important function there is NCpathcvt which does the proper
conversions to the local path format.
As a rule, most code should just replace their file operations with
the corresponding NCxxx ones defined in include/ncpathmgmt.h. These
NCxxx functions all call NCpathcvt on their path arguments before
executing the actual file operation.
In some rare cases, the client may need to directly use NCpathcvt,
but this should be avoided as much as possible. If there is a need
for supporting a new file operation not already in ncpathmgmt.h, then
use the code in dpathmgr.c as a template. Also please notify Unidata
so we can include it as a formal part or our supported operations.
Also, if you see an operation in the library that is not using the
NCxxx form, then please submit an issue so we can fix it.
Misc. Changes:
* Clean up the utf8 testing code; it is impossible to get some
tests to work under windows using shell scripts; the args do
not pass as utf8 but as some other encoding.
* Added an extra utf8 test case: test_unicode_path.sh
* Add a true test for HDF5 1.10.6 or later because as noted in
PR https://github.com/Unidata/netcdf-c/pull/1794,
HDF5 changed its Windows file path handling.
2021-03-05 04:41:31 +08:00
|
|
|
if test "x$i" = xtst_vlen_data ; then
|
|
|
|
ls -l tst_vlen_data*
|
|
|
|
ls -l *.nc
|
|
|
|
fi
|
2018-08-26 11:44:41 +08:00
|
|
|
${NCCOPY} $i.nc copy_of_$i.nc
|
Codify cross-platform file paths
The netcdf-c code has to deal with a variety of platforms:
Windows, OSX, Linux, Cygwin, MSYS, etc. These platforms differ
significantly in the kind of file paths that they accept. So in
order to handle this, I have created a set of replacements for
the most common file system operations such as _open_ or _fopen_
or _access_ to manage the file path differences correctly.
A more limited version of this idea was already implemented via
the ncwinpath.h and dwinpath.c code. So this can be viewed as a
replacement for that code. And in path in many cases, the only
change that was required was to replace '#include <ncwinpath.h>'
with '#include <ncpathmgt.h>' and then replace file operation
calls with the NCxxx equivalent from ncpathmgr.h Note that
recently, the ncwinpath.h was renamed ncpathmgmt.h, so this pull
request should not require dealing with winpath.
The heart of the change is include/ncpathmgmt.h, which provides
alternate operations such as NCfopen or NCaccess and which properly
parse and rebuild path arguments to work for the platform on which
the code is executing. This mostly matters for Windows because of the
way that it uses backslash and drive letters, as compared to *nix*.
One important feature is that the user can do string manipulations
on a file path without having to worry too much about the platform
because the path management code will properly handle most mixed cases.
So one can for example concatenate a path suffix that uses forward
slashes to a Windows path and have it work correctly.
The conversion code is in libdispatch/dpathmgr.c, and the
important function there is NCpathcvt which does the proper
conversions to the local path format.
As a rule, most code should just replace their file operations with
the corresponding NCxxx ones defined in include/ncpathmgmt.h. These
NCxxx functions all call NCpathcvt on their path arguments before
executing the actual file operation.
In some rare cases, the client may need to directly use NCpathcvt,
but this should be avoided as much as possible. If there is a need
for supporting a new file operation not already in ncpathmgmt.h, then
use the code in dpathmgr.c as a template. Also please notify Unidata
so we can include it as a formal part or our supported operations.
Also, if you see an operation in the library that is not using the
NCxxx form, then please submit an issue so we can fix it.
Misc. Changes:
* Clean up the utf8 testing code; it is impossible to get some
tests to work under windows using shell scripts; the args do
not pass as utf8 but as some other encoding.
* Added an extra utf8 test case: test_unicode_path.sh
* Add a true test for HDF5 1.10.6 or later because as noted in
PR https://github.com/Unidata/netcdf-c/pull/1794,
HDF5 changed its Windows file path handling.
2021-03-05 04:41:31 +08:00
|
|
|
${NCDUMP} -n copy_of_$i $i.nc > tmp_$i.cdl
|
|
|
|
${NCDUMP} copy_of_$i.nc > copy_of_$i.cdl
|
|
|
|
echo "*** compare " with copy_of_$i.cdl
|
|
|
|
diff copy_of_$i.cdl tmp_$i.cdl
|
|
|
|
rm copy_of_$i.nc copy_of_$i.cdl tmp_$i.cdl
|
2010-06-03 21:24:43 +08:00
|
|
|
done
|
Codify cross-platform file paths
The netcdf-c code has to deal with a variety of platforms:
Windows, OSX, Linux, Cygwin, MSYS, etc. These platforms differ
significantly in the kind of file paths that they accept. So in
order to handle this, I have created a set of replacements for
the most common file system operations such as _open_ or _fopen_
or _access_ to manage the file path differences correctly.
A more limited version of this idea was already implemented via
the ncwinpath.h and dwinpath.c code. So this can be viewed as a
replacement for that code. And in path in many cases, the only
change that was required was to replace '#include <ncwinpath.h>'
with '#include <ncpathmgt.h>' and then replace file operation
calls with the NCxxx equivalent from ncpathmgr.h Note that
recently, the ncwinpath.h was renamed ncpathmgmt.h, so this pull
request should not require dealing with winpath.
The heart of the change is include/ncpathmgmt.h, which provides
alternate operations such as NCfopen or NCaccess and which properly
parse and rebuild path arguments to work for the platform on which
the code is executing. This mostly matters for Windows because of the
way that it uses backslash and drive letters, as compared to *nix*.
One important feature is that the user can do string manipulations
on a file path without having to worry too much about the platform
because the path management code will properly handle most mixed cases.
So one can for example concatenate a path suffix that uses forward
slashes to a Windows path and have it work correctly.
The conversion code is in libdispatch/dpathmgr.c, and the
important function there is NCpathcvt which does the proper
conversions to the local path format.
As a rule, most code should just replace their file operations with
the corresponding NCxxx ones defined in include/ncpathmgmt.h. These
NCxxx functions all call NCpathcvt on their path arguments before
executing the actual file operation.
In some rare cases, the client may need to directly use NCpathcvt,
but this should be avoided as much as possible. If there is a need
for supporting a new file operation not already in ncpathmgmt.h, then
use the code in dpathmgr.c as a template. Also please notify Unidata
so we can include it as a formal part or our supported operations.
Also, if you see an operation in the library that is not using the
NCxxx form, then please submit an issue so we can fix it.
Misc. Changes:
* Clean up the utf8 testing code; it is impossible to get some
tests to work under windows using shell scripts; the args do
not pass as utf8 but as some other encoding.
* Added an extra utf8 test case: test_unicode_path.sh
* Add a true test for HDF5 1.10.6 or later because as noted in
PR https://github.com/Unidata/netcdf-c/pull/1794,
HDF5 changed its Windows file path handling.
2021-03-05 04:41:31 +08:00
|
|
|
|
2012-06-13 05:50:02 +08:00
|
|
|
# echo "*** Testing compression of deflatable files ..."
|
2010-09-01 23:45:55 +08:00
|
|
|
./tst_compress
|
2011-06-21 23:10:17 +08:00
|
|
|
echo "*** Test nccopy -d1 can compress a classic format file ..."
|
2018-08-26 11:44:41 +08:00
|
|
|
${NCCOPY} -d1 tst_inflated.nc tst_deflated.nc
|
2010-09-01 06:41:00 +08:00
|
|
|
if test `wc -c < tst_deflated.nc` -ge `wc -c < tst_inflated.nc`; then
|
|
|
|
exit 1
|
|
|
|
fi
|
2011-06-21 23:10:17 +08:00
|
|
|
echo "*** Test nccopy -d1 can compress a netCDF-4 format file ..."
|
2018-08-26 11:44:41 +08:00
|
|
|
${NCCOPY} -d1 tst_inflated4.nc tst_deflated.nc
|
2011-06-21 23:10:17 +08:00
|
|
|
if test `wc -c < tst_deflated.nc` -ge `wc -c < tst_inflated4.nc`; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo "*** Test nccopy -d1 -s can compress a classic model netCDF-4 file even more ..."
|
2018-08-26 11:44:41 +08:00
|
|
|
${NCCOPY} -d1 -s tst_inflated.nc tmp.nc
|
2010-09-01 06:41:00 +08:00
|
|
|
if test `wc -c < tmp.nc` -ge `wc -c < tst_inflated.nc`; then
|
|
|
|
exit 1
|
|
|
|
fi
|
2011-06-21 23:10:17 +08:00
|
|
|
echo "*** Test nccopy -d1 -s can compress a netCDF-4 file even more ..."
|
2018-08-26 11:44:41 +08:00
|
|
|
${NCCOPY} -d1 -s tst_inflated4.nc tmp.nc
|
2011-06-21 23:10:17 +08:00
|
|
|
if test `wc -c < tmp.nc` -ge `wc -c < tst_inflated4.nc`; then
|
|
|
|
exit 1
|
|
|
|
fi
|
2014-03-24 07:25:45 +08:00
|
|
|
echo "*** Test nccopy -d0 turns off compression, shuffling of compressed, shuffled file ..."
|
2018-08-26 11:44:41 +08:00
|
|
|
${NCCOPY} -d0 tst_inflated4.nc tmp.nc
|
2017-03-09 08:01:10 +08:00
|
|
|
${NCDUMP} -sh tmp.nc > tmp.cdl
|
2014-03-24 07:25:45 +08:00
|
|
|
if fgrep '_DeflateLevel' < tmp.cdl ; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if fgrep '_Shuffle' < tmp.cdl ; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
rm tst_deflated.nc tst_inflated.nc tst_inflated4.nc tmp.nc tmp.cdl
|
2010-09-01 06:41:00 +08:00
|
|
|
|
|
|
|
echo "*** Testing nccopy -d1 -s on ncdump/*.nc files"
|
|
|
|
for i in $TESTFILES ; do
|
2012-06-13 05:50:02 +08:00
|
|
|
echo "*** Test nccopy -d1 -s $i.nc copy_of_$i.nc ..."
|
2018-08-26 11:44:41 +08:00
|
|
|
${NCCOPY} -d1 -s $i.nc copy_of_$i.nc
|
2017-03-09 08:01:10 +08:00
|
|
|
${NCDUMP} -n copy_of_$i $i.nc > tmp.cdl
|
|
|
|
${NCDUMP} copy_of_$i.nc > copy_of_$i.cdl
|
2012-06-13 05:50:02 +08:00
|
|
|
# echo "*** compare " with copy_of_$i.cdl
|
2010-09-01 06:41:00 +08:00
|
|
|
diff copy_of_$i.cdl tmp.cdl
|
|
|
|
rm copy_of_$i.nc copy_of_$i.cdl tmp.cdl
|
|
|
|
done
|
2011-01-18 06:15:26 +08:00
|
|
|
./tst_chunking
|
|
|
|
echo "*** Test that nccopy -c can chunk and unchunk files"
|
2018-08-26 11:44:41 +08:00
|
|
|
${NCCOPY} -M0 tst_chunking.nc tmp.nc
|
2017-03-09 08:01:10 +08:00
|
|
|
${NCDUMP} tmp.nc > tmp.cdl
|
2018-08-26 11:44:41 +08:00
|
|
|
${NCCOPY} -c dim0/,dim1/1,dim2/,dim3/1,dim4/,dim5/1,dim6/ tst_chunking.nc tmp-chunked.nc
|
2017-03-09 08:01:10 +08:00
|
|
|
${NCDUMP} -n tmp tmp-chunked.nc > tmp-chunked.cdl
|
2011-01-18 06:15:26 +08:00
|
|
|
diff tmp.cdl tmp-chunked.cdl
|
2018-08-26 11:44:41 +08:00
|
|
|
${NCCOPY} -c dim0/,dim1/,dim2/,dim3/,dim4/,dim5/,dim6/ tmp-chunked.nc tmp-unchunked.nc
|
2017-03-09 08:01:10 +08:00
|
|
|
${NCDUMP} -n tmp tmp-unchunked.nc > tmp-unchunked.cdl
|
2011-01-18 06:15:26 +08:00
|
|
|
diff tmp.cdl tmp-unchunked.cdl
|
2020-09-02 03:44:24 +08:00
|
|
|
${NCCOPY} -c // tmp-chunked.nc tmp-unchunked2.nc
|
|
|
|
${NCDUMP} -n tmp tmp-unchunked.nc > tmp-unchunked2.cdl
|
|
|
|
diff tmp.cdl tmp-unchunked2.cdl
|
2015-01-04 08:18:14 +08:00
|
|
|
echo "*** Test that nccopy -c works as intended for record dimension default (1)"
|
2017-03-09 08:01:10 +08:00
|
|
|
${NCGEN} -b -o tst_bug321.nc $srcdir/tst_bug321.cdl
|
2018-08-26 11:44:41 +08:00
|
|
|
${NCCOPY} -k nc7 -c"lat/2,lon/2" tst_bug321.nc tmp.nc
|
2017-03-09 08:01:10 +08:00
|
|
|
${NCDUMP} -n tst_bug321 tmp.nc > tmp.cdl
|
2018-01-17 02:00:09 +08:00
|
|
|
diff -b $srcdir/tst_bug321.cdl tmp.cdl
|
2020-09-02 03:44:24 +08:00
|
|
|
|
Codify cross-platform file paths
The netcdf-c code has to deal with a variety of platforms:
Windows, OSX, Linux, Cygwin, MSYS, etc. These platforms differ
significantly in the kind of file paths that they accept. So in
order to handle this, I have created a set of replacements for
the most common file system operations such as _open_ or _fopen_
or _access_ to manage the file path differences correctly.
A more limited version of this idea was already implemented via
the ncwinpath.h and dwinpath.c code. So this can be viewed as a
replacement for that code. And in path in many cases, the only
change that was required was to replace '#include <ncwinpath.h>'
with '#include <ncpathmgt.h>' and then replace file operation
calls with the NCxxx equivalent from ncpathmgr.h Note that
recently, the ncwinpath.h was renamed ncpathmgmt.h, so this pull
request should not require dealing with winpath.
The heart of the change is include/ncpathmgmt.h, which provides
alternate operations such as NCfopen or NCaccess and which properly
parse and rebuild path arguments to work for the platform on which
the code is executing. This mostly matters for Windows because of the
way that it uses backslash and drive letters, as compared to *nix*.
One important feature is that the user can do string manipulations
on a file path without having to worry too much about the platform
because the path management code will properly handle most mixed cases.
So one can for example concatenate a path suffix that uses forward
slashes to a Windows path and have it work correctly.
The conversion code is in libdispatch/dpathmgr.c, and the
important function there is NCpathcvt which does the proper
conversions to the local path format.
As a rule, most code should just replace their file operations with
the corresponding NCxxx ones defined in include/ncpathmgmt.h. These
NCxxx functions all call NCpathcvt on their path arguments before
executing the actual file operation.
In some rare cases, the client may need to directly use NCpathcvt,
but this should be avoided as much as possible. If there is a need
for supporting a new file operation not already in ncpathmgmt.h, then
use the code in dpathmgr.c as a template. Also please notify Unidata
so we can include it as a formal part or our supported operations.
Also, if you see an operation in the library that is not using the
NCxxx form, then please submit an issue so we can fix it.
Misc. Changes:
* Clean up the utf8 testing code; it is impossible to get some
tests to work under windows using shell scripts; the args do
not pass as utf8 but as some other encoding.
* Added an extra utf8 test case: test_unicode_path.sh
* Add a true test for HDF5 1.10.6 or later because as noted in
PR https://github.com/Unidata/netcdf-c/pull/1794,
HDF5 changed its Windows file path handling.
2021-03-05 04:41:31 +08:00
|
|
|
rm tst_chunking.nc tmp.nc tmp.cdl tmp-chunked.nc tmp-chunked.cdl tmp-unchunked.nc tmp-unchunked.cdl
|
|
|
|
|
2020-09-02 03:44:24 +08:00
|
|
|
echo "*** Test that nccopy -c dim/n works as intended "
|
|
|
|
${NCGEN} -4 -b -o tst_perdimspecs.nc $srcdir/ref_tst_perdimspecs.cdl
|
|
|
|
${NCCOPY} -M0 -4 -c "time/10,lat/15,lon/20" tst_perdimspecs.nc tmppds.nc
|
|
|
|
${NCDUMP} -hs tmppds.nc > tmppds.cdl
|
|
|
|
STORAGE=`cat tmppds.cdl | sed -e '/tas:_Storage/p' -ed | tr -d '\t \r'`
|
|
|
|
test "x$STORAGE" = 'xtas:_Storage="chunked";'
|
|
|
|
CHUNKSIZES=`cat tmppds.cdl | sed -e '/tas:_ChunkSizes/p' -ed | tr -d '\t \r'`
|
|
|
|
test "x$CHUNKSIZES" = 'xtas:_ChunkSizes=10,15,20;'
|
|
|
|
|
2021-02-01 06:10:39 +08:00
|
|
|
echo "*** Test that nccopy -F var1,none works as intended "
|
|
|
|
${NCGEN} -4 -b -o tst_nofilters.nc $srcdir/ref_tst_nofilters.cdl
|
2021-03-09 06:10:50 +08:00
|
|
|
${NCCOPY} -M0 -4 -F var1,none -c // tst_nofilters.nc tmp_nofilters.nc
|
2021-02-01 06:10:39 +08:00
|
|
|
${NCDUMP} -hs tmp_nofilters.nc > tmp_nofilters.cdl
|
|
|
|
STORAGE=`cat tmp_nofilters.cdl | sed -e '/var1:_Storage/p' -ed | tr -d '\t \r'`
|
|
|
|
test "x$STORAGE" = 'xvar1:_Storage="contiguous";'
|
|
|
|
FILTERS=`cat tmp_nofilters.cdl | sed -e '/var1:_Filters/p' -ed | tr -d '\t \r'`
|
|
|
|
test "x$FILTERS" = 'x'
|
2011-01-18 06:15:26 +08:00
|
|
|
|
2010-06-03 21:24:43 +08:00
|
|
|
echo "*** All nccopy tests passed!"
|
|
|
|
exit 0
|