From 6e5c74550d990d38de6a5eb91e6c5d35614f9f87 Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Sun, 28 Aug 2016 15:26:35 +0200 Subject: [PATCH 1/6] Fix HDF5 include directory with CMake >= 3.6.0. HDF5_INCLUDE_DIR has been deprecated some time ago, only HDF5_INCLUDE_DIRS is set for CMake >= 3.6.0. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2149713f6..65cb0f7c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -572,6 +572,10 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4) ## # Include the HDF5 include directory. ## + IF(HDF5_INCLUDE_DIRS AND NOT HDF5_INCLUDE_DIR) + SET(HDF5_INCLUDE_DIR ${HDF5_INCLUDE_DIRS}) + ENDIF() + MESSAGE(STATUS "Using HDF5 include dir: ${HDF5_INCLUDE_DIR}") INCLUDE_DIRECTORIES(${HDF5_INCLUDE_DIR}) ### From 988b4ff868e1eb9a169d8c41e9fd133692590e59 Mon Sep 17 00:00:00 2001 From: Bas Couwenberg Date: Sun, 28 Aug 2016 15:45:36 +0200 Subject: [PATCH 2/6] Fix spelling errors. * characers -> characters * varaible -> variable --- docs/netcdf.m4 | 6 +++--- docs/old/netcdf-f90.texi | 2 +- ncgen/ncgen.1 | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/netcdf.m4 b/docs/netcdf.m4 index 2baa47845..19dd1d659 100644 --- a/docs/netcdf.m4 +++ b/docs/netcdf.m4 @@ -774,15 +774,15 @@ Learn about a compound type. .HP FDECL(def_vlen, (INCID(), INAME(), INCTYPE(base_typeid), ONCTYPE(xtypep))) .sp -Create a varaible length array type. +Create a variable length array type. .HP FDECL(inq_vlen, (INCID(), INCTYPE(), ONAME(), OSIZET(datum_sizep), ONCTYPE(base_nc_typep))) .sp -Learn about a varaible length array type. +Learn about a variable length array type. .HP FDECL(free_vlen, (nc_vlen_t *vl)) .sp -Free memory comsumed by reading data of a varaible length array type. +Free memory comsumed by reading data of a variable length array type. .HP FDECL(put_vlen_element, (INCID(), INCTYPE(), IVOIDP(vlen_element), ISIZET(len), IVOIDP(data))) .sp diff --git a/docs/old/netcdf-f90.texi b/docs/old/netcdf-f90.texi index 335132da4..31a0be6db 100755 --- a/docs/old/netcdf-f90.texi +++ b/docs/old/netcdf-f90.texi @@ -5180,7 +5180,7 @@ rh in an existing netCDF dataset named foo.nc: @findex NF90_INQ_VARID @cindex NF90_INQ_VARID, example -Given the name of a varaible, nf90_inq_varid finds the variable ID. +Given the name of a variable, nf90_inq_varid finds the variable ID. @heading Usage @example diff --git a/ncgen/ncgen.1 b/ncgen/ncgen.1 index 1582ee31c..77a87c247 100644 --- a/ncgen/ncgen.1 +++ b/ncgen/ncgen.1 @@ -864,7 +864,7 @@ There are three other cases of note. .IP 1. 3 If there is only a single, unlimited dimension, then all of the constants are concatenated -and fill characers are added to the +and fill characters are added to the end of the resulting string to make its length be that of the unlimited dimension. If the length is larger than From b2e4b74e3a7ff416cb72625702ba0c8f73b307fe Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Wed, 31 Aug 2016 15:38:59 -0600 Subject: [PATCH 3/6] Restricted tests from running when they require the utilities but the utilities were not built, in autoconf-based tests. See https://github.com/Unidata/netcdf-c/issues/313 for more information. --- configure.ac | 2 +- nc_test/Makefile.am | 18 ++++++++++-------- nc_test4/Makefile.am | 6 +++++- ncdap_test/Makefile.am | 6 +++++- 4 files changed, 21 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index d0f2aca93..4bd25b517 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -M# -*- Autoconf -*- +# -*- Autoconf -*- ## Process this file with autoconf to produce a configure script. # This is part of Unidata's netCDF package. Copyright 2005-2012, see diff --git a/nc_test/Makefile.am b/nc_test/Makefile.am index 17df2639c..2c46c4b26 100644 --- a/nc_test/Makefile.am +++ b/nc_test/Makefile.am @@ -62,14 +62,16 @@ endif TESTS = $(TESTPROGRAMS) -if BUILD_DISKLESS -TESTS += run_diskless.sh -if BUILD_MMAP -TESTS += run_mmap.sh -endif -if LARGE_FILE_TESTS -TESTS += run_diskless2.sh -endif +if BUILD_UTILITIES + if BUILD_DISKLESS + TESTS += run_diskless.sh + if BUILD_MMAP + TESTS += run_mmap.sh + endif + if LARGE_FILE_TESTS + TESTS += run_diskless2.sh + endif + endif endif if USE_PNETCDF diff --git a/nc_test4/Makefile.am b/nc_test4/Makefile.am index 6e7b0a457..00c1fabc7 100644 --- a/nc_test4/Makefile.am +++ b/nc_test4/Makefile.am @@ -33,7 +33,11 @@ endif TESTS = $(NC4_TESTS) -TESTS += run_grp_rename.sh run_empty_vlen_test.sh tst_misc.sh +if BUILD_UTILITIES + TESTS += run_grp_rename.sh tst_misc.sh +endif + +TESTS += run_empty_vlen_test.sh # If the v2 API was built, add its test program. if BUILD_V2 diff --git a/ncdap_test/Makefile.am b/ncdap_test/Makefile.am index b4e0a9f95..f672ccb0d 100644 --- a/ncdap_test/Makefile.am +++ b/ncdap_test/Makefile.am @@ -33,7 +33,11 @@ if ENABLE_DAP_REMOTE_TESTS check_PROGRAMS += nctestserver nctestserver_SOURCES = nctestserver.c -TESTS += tst_remote3.sh tst_formatx.sh test_partvar testurl.sh +if BUILD_UTILITIES +TESTS += tst_remote3.sh tst_formatx.sh +endif + +TESTS += test_partvar testurl.sh if ENABLE_DAP_LONG_TESTS TESTS += tst_longremote3.sh From 486f69522c86d0ba853d05c5f5c440425b631f53 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Wed, 31 Aug 2016 15:48:10 -0600 Subject: [PATCH 4/6] Merged utility-based tests fix into cmake-based builds. --- nc_test/CMakeLists.txt | 21 ++++++++++++--------- nc_test4/CMakeLists.txt | 10 +++++++--- ncdap_test/CMakeLists.txt | 6 ++++-- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/nc_test/CMakeLists.txt b/nc_test/CMakeLists.txt index 23430f96b..f46ac171f 100644 --- a/nc_test/CMakeLists.txt +++ b/nc_test/CMakeLists.txt @@ -68,16 +68,19 @@ ENDFOREACH() ADD_TEST(nc_test ${EXECUTABLE_OUTPUT_PATH}/nc_test) -IF(BUILD_DISKLESS) - add_sh_test(nc_test run_diskless) - IF(BUILD_MMAP) - add_sh_test(nc_test run_mmap) - ENDIF() - IF(LARGE_FILE_TESTS) - add_sh_test(nc_test run_diskless2) - ENDIF() +IF(BUILD_UTILITIES) -ENDIF() + IF(BUILD_DISKLESS) + add_sh_test(nc_test run_diskless) + IF(BUILD_MMAP) + add_sh_test(nc_test run_mmap) + ENDIF(BUILD_MMAP) + IF(LARGE_FILE_TESTS) + add_sh_test(nc_test run_diskless2) + ENDIF(LARGE_FILE_TESTS) + + ENDIF(BUILD_DISKLESS) +ENDIF(BUILD_UTILITIES) # Copy some test files from current source dir to out-of-tree build dir. FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.nc ${CMAKE_CURRENT_SOURCE_DIR}/*.sh) diff --git a/nc_test4/CMakeLists.txt b/nc_test4/CMakeLists.txt index 114a96c54..1b52fb2b8 100644 --- a/nc_test4/CMakeLists.txt +++ b/nc_test4/CMakeLists.txt @@ -13,8 +13,12 @@ SET(NC4_TESTS tst_dims tst_dims2 tst_dims3 tst_files tst_files4 tst_vars tst_rehash) # Note, renamegroup needs to be compiled before run_grp_rename -build_bin_test(renamegroup) -add_sh_test(nc_test4 run_grp_rename) + +IF(BUILD_UTILITIES) + build_bin_test(renamegroup) + add_sh_test(nc_test4 run_grp_rename) + ADD_SH_TEST(nc_test4 tst_misc) +ENDIF(BUILD_UTILITIES) ## # The shell script, run_empty_vlen_test.sh, @@ -23,7 +27,7 @@ add_sh_test(nc_test4 run_grp_rename) BUILD_BIN_TEST(tst_empty_vlen_unlim) ADD_SH_TEST(nc_test4 run_empty_vlen_test) -ADD_SH_TEST(nc_test4 tst_misc) + IF(NOT MSVC) SET(NC4_TESTS ${NC4_TESTS} tst_interops5 tst_camrun) diff --git a/ncdap_test/CMakeLists.txt b/ncdap_test/CMakeLists.txt index 1294fa686..c25b966f7 100644 --- a/ncdap_test/CMakeLists.txt +++ b/ncdap_test/CMakeLists.txt @@ -43,8 +43,10 @@ IF(ENABLE_TESTS) ENDIF() IF(ENABLE_DAP_REMOTE_TESTS) - add_sh_test(ncdap tst_remote3) - add_sh_test(ncdap tst_formatx) + IF(BUILD_UTILITIES) + add_sh_test(ncdap tst_remote3) + add_sh_test(ncdap tst_formatx) + ENDIF(BUILD_UTILTIES) add_bin_test(ncdap test_partvar) IF(ENABLE_DAP_LONG_TESTS) add_sh_test(ncdap tst_longremote3) From 8580fe543c9ee17ab538d587ad1f3d272c5fab8c Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Wed, 31 Aug 2016 15:53:12 -0600 Subject: [PATCH 5/6] Updated release notes. --- RELEASE_NOTES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 20c31fe8e..ccfaa5455 100755 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -9,6 +9,7 @@ This file contains a high-level description of this package's evolution. Release ## 4.4.2 - TBD +* [Bug] Corrected an issue related to test failures when `--disable-utilities` or `-DENABLE_UTILITIES=OFF` are specified when building with autotools or cmake, respectively. See [GitHub #313](https://github.com/Unidata/netcdf-c/issues/313) for more information. * [Bug][Enhancement] Corrected a behavioral issue with the `_NCProperties` attribute taking up too much space. See [GitHub #300](https://github.com/Unidata/netcdf-c/issues/300) and [GitHub #301](https://github.com/Unidata/netcdf-c/pull/301) for more information. * [Bug] Corrected behavior for `nc-config` so that, if `nf-config` is found in system, the proper fortran-related information will be conveyed. See [GitHub #296](https://github.com/Unidata/netcdf-c/issues/296] for more information. From c179cf0c5f243ff48ed23d5f2800d1bd53e9823c Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Wed, 31 Aug 2016 15:53:34 -0600 Subject: [PATCH 6/6] Updated cmakelists.txt for the final test failure. --- nc_test4/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nc_test4/CMakeLists.txt b/nc_test4/CMakeLists.txt index 1b52fb2b8..12199cae9 100644 --- a/nc_test4/CMakeLists.txt +++ b/nc_test4/CMakeLists.txt @@ -5,7 +5,7 @@ SET(NC4_TESTS tst_dims tst_dims2 tst_dims3 tst_files tst_files4 tst_vars tst_strings2 tst_interops tst_interops4 tst_interops6 tst_enums tst_coords tst_coords2 tst_coords3 tst_vars3 tst_vars4 tst_chunks tst_chunks2 tst_utf8 tst_fills tst_fills2 tst_fillbug - tst_xplatform tst_xplatform2 tst_h_atts2 tst_endian_fill tst_atts + tst_xplatform2 tst_h_atts2 tst_endian_fill tst_atts t_type cdm_sea_soundings tst_vl tst_atts1 tst_atts2 tst_vars2 tst_files5 tst_files6 tst_sync tst_h_strbug tst_h_refs tst_h_scalar tst_rename tst_h5_endians tst_atts_string_rewrite @@ -15,6 +15,7 @@ SET(NC4_TESTS tst_dims tst_dims2 tst_dims3 tst_files tst_files4 tst_vars # Note, renamegroup needs to be compiled before run_grp_rename IF(BUILD_UTILITIES) + SET(NC4_TESTS ${NC4_TESTS} tst_xplatform) build_bin_test(renamegroup) add_sh_test(nc_test4 run_grp_rename) ADD_SH_TEST(nc_test4 tst_misc)