Commit Graph

137 Commits

Author SHA1 Message Date
Ed Hartnett
cd753be416 working on cmake build 2017-11-16 17:48:06 -07:00
Ed Hartnett
976a6e438e working on cmake build 2017-11-16 17:46:11 -07:00
Ed Hartnett
22a4898325 working on cmake build 2017-11-16 17:43:21 -07:00
Ed Hartnett
045a467029 working on cmake build 2017-11-16 17:32:19 -07:00
Ed Hartnett
0d517d5653 fixing CMake build 2017-11-16 17:14:48 -07:00
Ed Hartnett
693a47ad04 move C program invokations to scripts to clean up dependencies in build 2017-11-16 13:03:35 -07:00
Ed Hartnett
3b0c301d76 moved tst_bug324 in Cmake build from ncdump to nc_test4 2017-11-16 11:57:39 -07:00
Ed Hartnett
add3e4b46d working on cmake build 2017-11-12 06:12:08 -07:00
Ed Hartnett
4e52587864 fixed typo in CMakeLists.txt 2017-11-12 05:34:31 -07:00
Ed Hartnett
05d251bfb5 different attempt to deal with ncdump dependencies 2017-11-11 17:33:51 -07:00
Ed Hartnett
a80ac592cd attempt at cmake files 2017-11-11 16:46:25 -07:00
Dennis Heimbigner
9983b9d911 re e-support UBS-599337
re pull request https://github.com/Unidata/netcdf-c/pull/405
re pull request https://github.com/Unidata/netcdf-c/pull/446

Notes:
1. This branch is a cleanup of the magic.dmh branch.
2. magic.dmh was originally merged, but caused problems with parallel IO.
   It was re-issued as pull request https://github.com/Unidata/netcdf-c/pull/446.
3. This branch + pull request replace any previous pull requests and magic.dmh branch.

Given an otherwise valid netCDF file that has a corrupted header,
the netcdf library currently crashes. Instead, it should return
NC_ENOTNC.

Additionally, the NC_check_file_type code does not do the
forward search required by hdf5 files. It currently only looks
at file position 0 instead of 512, 1024, 2048,... Also, it turns
out that the HDF4 magic number is assumed to always be at the
beginning of the file (unlike HDF5).
The change is localized to libdispatch/dfile.c See
https://support.hdfgroup.org/release4/doc/DSpec_html/DS.pdf

Also, it turns out that the code in NC_check_file_type is duplicated
(mostly) in the function libsrc4/nc4file.c#nc_check_for_hdf.

This branch does the following.
1. Make NC_check_file_type return NC_ENOTNC instead of crashing.
2. Remove nc_check_for_hdf and centralize all file format checking
   NC_check_file_type.
3. Add proper forward search for HDF5 files (but not HDF4 files)
   to look for the magic number at offsets of 0, 512, 1024...
4. Add test tst_hdf5_offset.sh. This tests that hdf5 files with
   an offset are properly recognized. It does so by prefixing
   a legal file with some number of zero bytes: 512, 1024, etc.
5. Off-topic: Added -N flag to ncdump to force a specific output dataset name.
2017-10-24 16:25:09 -06:00
Ward Fisher
b6ebc0e77e Wired in new test to CMake-based build. 2017-09-01 11:58:37 -06:00
Ward Fisher
59ded4a82c Moving some tests around so that 'make check' works properly, in support of https://github.com/Unidata/netcdf-c/issues/339 2017-05-24 14:25:22 -06:00
Ward Fisher
8c48ac9828 Had to modify test_common.in so that it doesn't append the build type on Visual Studio. Otherwise it looks in the wrong location. Change the location of the utilities so that they are where test_common.sh expects to find them results in the breakage of most of the other shell scripts. 2017-04-06 14:55:11 -06:00
Dennis Heimbigner
3db4f013bf Primary change: add dap4 support
Specific changes:
1. Add dap4 code: libdap4 and dap4_test.
   Note that until the d4ts server problem is solved, dap4 is turned off.
2. Modify various files to support dap4 flags:
	configure.ac, Makefile.am, CMakeLists.txt, etc.
3. Add nc_test/test_common.sh. This centralizes
   the handling of the locations of various
   things in the build tree: e.g. where is
   ncgen.exe located. See nc_test/test_common.sh
   for details.
4. Modify .sh files to use test_common.sh
5. Obsolete separate oc2 by moving it to be part of
   netcdf-c. This means replacing code with netcdf-c
   equivalents.
5. Add --with-testserver to configure.ac to allow
   override of the servers to be used for --enable-dap-remote-tests.
6. There were multiple versions of nctypealignment code. Try to
   centralize in libdispatch/doffset.c and include/ncoffsets.h
7. Add a unit test for the ncuri code because of its complexity.
8. Move the findserver code out of libdispatch and into
   a separate, self contained program in ncdap_test and dap4_test.
9. Move the dispatch header files (nc{3,4}dispatch.h) to
   .../include because they are now shared by modules.
10. Revamp the handling of TOPSRCDIR and TOPBUILDDIR for shell scripts.
11. Make use of MREMAP if available
12. Misc. minor changes e.g.
	- #include <config.h> -> #include "config.h"
	- Add some no-install headers to /include
	- extern -> EXTERNL and vice versa as needed
	- misc header cleanup
	- clean up checking for misc. unix vs microsoft functions
13. Change copyright decls in some files to point to LICENSE file.
14. Add notes to RELEASENOTES.md
2017-03-08 17:01:10 -07:00
Dennis Heimbigner
a5ffa8abca We are now into the trial and error phase
trying to get travis to compile tst_fileinfo.
2017-01-19 09:59:17 -07:00
Dennis Heimbigner
7be9506aac Modified ncdap_test to allow a different method
to get TOPSRCDIR that avoids use of
TEST_ENVIRONMENT and makes automake and cmake
more consistent.

Basic assumption is that abs_top_srcdir (and
cmake equivalent) is known at 'make check' time,
so we can use -D flag to compile a program that
has the value of abs_top_srcdir embedded into it
as a constant.

We define two new files in ncdap_test:
1. t_srcdir.h -- provide a gettopsrcdir() function
   to return the topsrcdir value to the test program.
2. topsrcdir.c -- a program that calls gettopsrcdir()
   and prints its output (minus any newline) on stdout.
   This is used in .sh files to get topsrcdir.
2017-01-18 21:46:47 -07:00
Dennis Heimbigner
0cf1e2c49f re: Github issue netcdf-c 300
Modified provenance code to allocate the minimal space
needed for _NCProperties attribute in file.  Basically
required using malloc in the provenance code and in ncdump.
Otherwise should cause no externally visible effects.
Also removed the ENABLE_FILEINFO from configure.ac since
the provenance code is no longer optional.
2016-08-08 09:24:19 -06:00
Dennis Heimbigner
b4dc1dca19 More cmake fixes 2016-05-07 14:32:07 -06:00
Dennis Heimbigner
11a259ad86 Add provenance info for netcdf-4 files.
This consists of a persistent attribute named
_NCProperties plus two computed attributes
_IsNetcdf4 and _SuperblockVersion.
See the 'Provenance Attributes' section
of docs/attribute_conventions.md for details.
2016-05-07 14:32:07 -06:00
Ward Fisher
3cbd45f539 Ensuring run_back_comp_tests.sh only runs if netcdf4 is enabled. 2016-04-28 14:41:42 -06:00
Dennis Heimbigner
39e9cd0ffe Fix issues with Github pull request 187
(https://github.com/Unidata/netcdf-c/pull/187)
Primary problem was cmake build errors.
2016-01-08 12:55:11 -07:00
Dennis Heimbigner
5e4cbd2fec Forgot to check cmake build 2016-01-05 22:26:20 -07:00
dmh
47e10591b4 ckp 2015-11-19 13:44:55 -07:00
Ward Fisher
996ef87cd1 More refactoring to fix an issue where an nc4 test was being run when nc4 was disabled. 2015-11-06 13:20:10 -07:00
Ward Fisher
c825d612c2 Tweaked some tests so that everything would pass when netcdf4 was disabled. 2015-10-22 14:09:19 -06:00
Russ Rew
495fea71b9 Fix builddir vs srdir problem for ncdump/ctest.c and ctest64.c 2015-08-18 16:10:18 -06:00
Ward Fisher
0cb9631b5c Added ncdump test tst_inmemory into CMake config file. 2015-06-01 12:26:40 -06:00
Ward Fisher
28908d9cfe Modified some tests to work on Windows when a bash shell is available. 2015-04-22 15:47:19 -06:00
Ward Fisher
c366bec8b3 Activated a couple new tests on MSVC builds when bash is available. 2015-04-20 16:06:20 -06:00
Ward Fisher
fa2818863a Changed how several tests are built/invoked. 2015-04-20 13:54:17 -06:00
Ward Fisher
1fe58bde2d Added tst_netcdf4, tst_h_rdc0 to CMake build system. 2015-04-20 13:18:24 -06:00
Ward Fisher
88a012651a Wired tst_nccopy4.sh into cmake. 2015-04-20 13:15:02 -06:00
Ward Fisher
c4511e2ed2 Wired fillbug into cmake. 2015-04-20 13:08:26 -06:00
Ward Fisher
3582812bf0 Added tst_bug324 to CMake-based builds, but it is failing for some reason. Will investigate shortly. 2015-02-04 14:11:20 -07:00
Ward Fisher
fc97546113 Updated nc-config.cmake.in to work with Windows-style paths. Further changes to get shell scripts running in Windows, when bash is available. 2015-02-02 14:46:51 -07:00
Ward Fisher
b1d3304bee Removed a shell test when using visual studio. The test script manually invokes the compiler gcc. 2015-02-02 14:46:50 -07:00
Ward Fisher
e3125a5ac9 Work progresses, but have encountered an issue. See https://github.com/Unidata/netcdf-c/issues/103. 2015-02-02 14:46:50 -07:00
Ward Fisher
fe1b96cdd9 Updated CMakelists to remove debug, release subdirectories on Windows. Updating shell scripts to work with MSYS paths. 2015-02-02 14:46:50 -07:00
Russ Rew
f16790b718 Add test CDL file and tst_nccopy4.sh test for fix of NCF-321 2015-01-03 17:18:14 -07:00
dmh
2e20b700af Forgot to update cmake wrt to directory name changes 2014-09-19 12:43:39 -06:00
Ward Fisher
7f812b367e Manual merge of pull request https://github.com/Unidata/netcdf-c/pull/64 contributed by nschloe. Assorted CMake improvements. 2014-06-11 15:51:31 -06:00
Ward Fisher
d2e643429b Changed invocation of cmake from absolute to relative. 2014-06-06 13:57:02 -06:00
Ward Fisher
733f6257b0 Updating cmake shared_linker_flags as suggested by Nico Schlomer: https://github.com/Unidata/netcdf-c/issues/46
Fixed indentation.

Updated .gitignore.

Added a macro to make it easy to check to see if the linker supports a particular flag.  Debug builds now pass the -w1,--no-undefined if it is detected the linker supports it.
2014-04-02 15:54:05 -06:00
Ward Fisher
8f524289f8 Fixed issue in CMakeLists.txt related to how the 'bom' test executable was being built. 2014-03-08 16:06:13 -07:00
dmh
baade3e4fc [NCF-293]
Allow .cdl files to have a leading utf-8 BOM.
Also add test.
2014-03-07 22:52:40 -07:00
Ward Fisher
0032af978b Added INQ_FORMAT_EXTENDED-related tests to the cmake build system (based on inclusion in autotools-based builds). 2014-01-16 13:14:49 -07:00
dmh
cc95bd3d47 1. [NCF-276]/XXI-796914
Columbia server does not serve up proper
   opendap DDS replies. The Dataset {...} name
   changes depending on if the request has certain
   kinds of constraints.
   Code for a hack was not being used, so restore it.
   The fix is to effectively ignore differences in
   Dataset node names if the code is coming from
   columbia.edu.

2. [NCF-278]
   The ncgen code is improperly typing int64 integer constants
   as uint64.

3. [NCF-279]
   Empty string constants were not being properly
   filled when their target array is length 1 or more.
2013-11-17 14:26:14 -07:00
Russ Rew
90933c7070 Add ncdump brief annotation test using -bc option 2013-11-13 13:44:03 -07:00
Ward Fisher
6a0978594c Updating CMakeLists.txt to address RPATH problem on OSX. 2013-08-22 11:15:12 -06:00
Ward Fisher
a90b386e0a Refactored 'Constant' to 'NCConstant' in ncgen/ to avoid
reserved word collision on Windows.

Added tst_ncgen4_classic.sh to CMake-based builds.
2013-07-16 20:22:48 +00:00
Ward Fisher
07247f44b0 Fixed a couple of CMake related testing issues. 2013-07-11 16:50:51 +00:00
Russ Rew
e4f9350c23 Quincey's fixes for NCF-56, "netcdf-4 can't read HDF5 scalar atts".
Also added ability capability for netCDF-4 to write and read NIL
values for string type attributes and variables, so these can be read
if used in HDF5 files.

Include are additions to CMakeLists files to reflect new tests.
2013-07-10 20:09:31 +00:00
Ward Fisher
33d3d06971 Added initial 'make dist', 'make distcheck' support to
CMake-based builds.
2013-06-03 16:42:04 +00:00
Ward Fisher
21523c8582 Merged changes from cmake branch. oc2 changes are just
'file property' changes, not sure what exactly.
2012-12-20 21:50:45 +00:00
Ward Fisher
81280c7878 Merge from latest netcdf-cmake branch.
- Fixes for Windows.
- CMake-based changes (functionality, tests).
- Smattering of coverity-informed bug-fixes.
2012-12-05 18:35:42 +00:00
Ward Fisher
ff631c8156 Merged latest changes from cmake branch.
o Improved CMake support.
o Cmake module compatibility (netcdf-config*.cmake.in).
2012-11-19 21:43:12 +00:00
Ward Fisher
109460c42e Added the new test (tst_mud.sh) to the CMake build system. 2012-11-19 16:56:44 +00:00
Ward Fisher
36ccdd3e67 Corrected for a mix of debug, release libraries for visual studio builds. 2012-10-24 19:46:24 +00:00
Ward Fisher
057701e1fa Added man pages to 'make install' 2012-10-17 21:14:30 +00:00
Ward Fisher
0d221a4e20 2012-09-20 21:18:20 +00:00
Ward Fisher
6e2d236b02 2012-09-19 21:32:28 +00:00
Ward Fisher
6504c2b093 2012-09-14 21:53:08 +00:00
Ward Fisher
1a72ec6adb 2012-09-14 21:38:46 +00:00
Ward Fisher
c271c81ac4 2012-09-14 21:35:25 +00:00
Ward Fisher
a1fda0f885 2012-09-13 22:07:35 +00:00
Ward Fisher
347a883081 2012-09-13 20:41:54 +00:00
Ward Fisher
2de3388cf1 Additional CMake usage. 2012-09-13 18:27:23 +00:00
Ward Fisher
f820e5e5ee 2012-09-10 21:19:57 +00:00
Ward Fisher
31cfdd5910 Added 'examples' directory to CMake 2012-08-28 22:31:07 +00:00
Ward Fisher
9bb179bba1 2012-08-27 21:49:09 +00:00
Ward Fisher
58035ff8f2 Added new tests, CMake functionality. 2012-08-21 20:08:53 +00:00
Ward Fisher
6da7859b0b Added changes related to documentation generation. 2012-08-17 21:37:40 +00:00
Ward Fisher
61c0ca0bbd Corrected a few tests 2012-08-16 22:51:45 +00:00
Ward Fisher
9b3d24cbc0 2012-08-10 21:44:00 +00:00
Ward Fisher
85f6c4cc08 Additional changes in support of CMake, CTest 2012-08-09 22:54:19 +00:00
Ward Fisher
14619ec4c4 2012-08-09 18:40:41 +00:00
Ward Fisher
0607b62375 Added coverage test flags to CMakeLists.txt files. 2012-08-09 17:07:41 +00:00
Ward Fisher
a6c95c65b1 2012-08-08 19:45:38 +00:00
Ward Fisher
77bd943296 2012-08-08 17:24:32 +00:00
Ward Fisher
1085abab25 Updated ctest-related arguments to explicitely invoke a shell. 2012-08-08 16:25:37 +00:00
Ward Fisher
8ef94646a1 Corrected a few windows-related errors. 2012-08-08 16:04:11 +00:00
Ward Fisher
359eb6ba23 Going back and adding additional tests to CMake config files. 2012-08-07 22:58:15 +00:00
Ward Fisher
0ee2fba307 Expanded ctest functionality. 2012-08-07 20:21:44 +00:00
Ward Fisher
64365a8ad7 CMake-related updated. 2012-08-06 16:57:29 +00:00
Ward Fisher
751c41928a Additional CMake changes. 2012-08-03 22:24:29 +00:00