Commit Graph

118 Commits

Author SHA1 Message Date
Ward Fisher
3f83cc4926 Merge branch 'master' into inmem2.dmh 2018-05-16 14:24:19 -06:00
Ward Fisher
27ca221bdb Merge branch 'master' into appveyor.wif 2018-05-14 13:19:17 -06:00
Dennis Heimbigner
3c7ffcc6d1 Fix https://github.com/Unidata/netcdf-c/issues/963
Fix https://github.com/Unidata/netcdf-c/issues/962

1. remove the --disable-diskless option since it is no
   longer needed. Similarly for CMakeLists.txt.
2. Fixed nc4files.c where BAIL and return were mixed
   leading to situation where cleanup code was not
   being invoked. This probably occurs elsewhere,
   but I did not find any specifically.
2018-05-11 15:30:19 -06:00
luz.paz
74fbacdb82 Misc. source comment typos
Some are user-facing. Found via `codespell` and through the downstream FreeCAD.
2018-04-26 23:04:01 -04:00
Ward Fisher
28ce3e4a8c Added fenceposts around bash scripts, excluding the bash.exe included with Windows 10 (for now) when searching to see if bash is available. 2018-04-26 14:38:56 -06:00
Thomas Braun
3af477a926 netcdf-c: Make cmake pass a windows cmd prompt
add_sh_test only creates the test if HAVE_BASH is TRUE.
Therefore we can only call SET_TESTS_PROPERTIES on the created test if
HAVE_BASH is equally true.
2018-04-26 14:43:27 +02:00
Ward Fisher
69a418c27d Merge branch 'cmake-fix' of https://github.com/nehaljwani/netcdf-c into gh692 2018-01-02 13:24:13 -07:00
Ward Fisher
84a77be0c4 Added explicit error checking to tst_netcdf4.sh 2017-12-18 15:26:33 -06:00
Ward Fisher
58972c8cc0 Working out issues on Windows. 2017-12-12 10:44:22 -06:00
Ward Fisher
24c6b27dfe Configuring a test so that it won't fail during parallel testing. 2017-12-06 15:00:21 -07:00
Ward Fisher
6166f86bfc Flagged tst_nccopy4 to not run parallel when using cmake. 2017-12-01 15:19:42 -07:00
Ward Fisher
72052689c6 More reshuffling. 2017-12-01 15:04:13 -07:00
Ward Fisher
d095101a95 Corrected a typo. 2017-12-01 14:39:48 -07:00
Ward Fisher
b029b36aa3 Rearranging deck chairs. 2017-12-01 14:36:57 -07:00
Ward Fisher
07228d0010 Addressing more test dependencies. 2017-12-01 14:27:26 -07:00
Nehal J Wani
b487c30382
Merge branch 'master' into cmake-fix 2017-12-01 06:20:20 +00:00
Ed Hartnett
3c5404ccf7
Merge branch 'master' into ejh_ncfunc_testing 2017-11-28 00:04:38 +00:00
Ward Fisher
2bdc8a7855 Temporarily removed a test for Windows. 2017-11-27 11:58:27 -06:00
Nehal J Wani
03dd4e260f
Make certain tests conditional on dependencies
tst_h_rdc0 depends on ncdump_tst_netcdf4, which isn't build if HAVE_BASH
isn't true. But CMake errors out with:

-- Bash shell not found; disabling shell script tests.
CMake Error at CMakeLists.txt:1521 (SET_PROPERTY):
  SET_PROPERTY given TEST names that do not exist:

    tst_h_rdc0

There are also some tests which cdl_do_maps depends on, but it is
also not defined if HAVE_BASH isn't true. CMake errors out with:

CMake Error at examples/CDL/CMakeLists.txt:10 (SET_TESTS_PROPERTIES):
  SET_TESTS_PROPERTIES Can not find test to add properties to:
cdl_do_comps

This patch makes these tests conditional, making CMake happy.
2017-11-26 10:17:58 +05:30
Ed Hartnett
579bfcb766 removed tst_ctest.sh from cmake build 2017-11-25 07:42:11 -07:00
Ed Hartnett
a208cc028c changed ncdump C test to build but not run (again) under CMake build 2017-11-25 02:57:13 -07:00
Ward Fisher
136a717d26 Getting tests to run in parallel under cmake 2017-11-22 11:37:00 -07:00
Ward Fisher
7d8f58a752
Merge branch 'master' into ejh_ncdump_3 2017-11-21 15:54:29 -07:00
Ward Fisher
95b9ef5ffe Added expected failure to cmake-based tests. 2017-11-20 17:02:16 -07:00
Ward Fisher
e8af76c2f4 Wiring in a quick test. 2017-11-20 13:52:06 -07:00
Ed Hartnett
096e0e19fc fixing cmake build 2017-11-20 05:34:17 -07:00
Ed Hartnett
2130e5dcfb fixing cmake build 2017-11-20 05:28:42 -07:00
Ed Hartnett
3bdf2801f6 working on cmake build 2017-11-16 17:57:22 -07:00
Ed Hartnett
7b4f17cb38 working on cmake build 2017-11-16 17:56:12 -07:00
Ed Hartnett
1a178582b9 working on cmake build 2017-11-16 17:54:30 -07:00
Ed Hartnett
2efdf55ad7 working on cmake build 2017-11-16 17:50:02 -07:00
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