Skip to content
Commits on Source (8)
#####
# End ignored generated files.
#####
### 'Normal' gitignore files.
autom4te.cache
debug.txt
......
# blocklist
branches:
except:
- /.*[.]dmh/
- /.*[.]wif/
sudo: required
language: c
services:
......@@ -5,29 +11,33 @@ services:
env:
matrix:
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-fsigned-char --disable-netcdf-4 --disable-dap-remote-tests' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-gcc-x64-signed
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-fsigned-char --disable-netcdf-4 --disable-dap-remote-tests' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-clang-x64-signed
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-fsigned-char --disable-netcdf-4 --disable-dap-remote-tests' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-gcc-x86-signed
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-fsigned-char --disable-netcdf-4 --disable-dap-remote-tests' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-clang-x86-signed
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-funsigned-char --disable-netcdf-4 --disable-dap-remote-tests' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-gcc-x64-unsigned
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-funsigned-char --disable-netcdf-4 --disable-dap-remote-tests' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-clang-x64-unsigned
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-funsigned-char --disable-netcdf-4 --disable-dap-remote-tests' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-gcc-x86-unsigned
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-funsigned-char --disable-netcdf-4 --disable-dap-remote-tests' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-clang-x86-unsigned
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-fsigned-char --disable-dap-remote-tests' COPTS='-DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-gcc-x64-signed
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-fsigned-char --disable-dap-remote-tests' COPTS='-DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-clang-x64-signed
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-fsigned-char --disable-dap-remote-tests' COPTS='-DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-gcc-x86-signed
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-fsigned-char --disable-dap-remote-tests' COPTS='-DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-clang-x86-signed
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-funsigned-char --disable-dap-remote-tests' COPTS='-DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-gcc-x64-unsigned
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-funsigned-char --disable-dap-remote-tests' COPTS='-DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-clang-x64-unsigned
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-funsigned-char --disable-dap-remote-tests' COPTS='-DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-gcc-x86-unsigned
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-funsigned-char --disable-dap-remote-tests' COPTS='-DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF' CURHOST=docker-clang-x86-unsigned
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-fsigned-char --disable-netcdf-4 --disable-dap-remote-tests --enable-cdf5' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=TRUE' CURHOST=docker-gcc-x64-signed
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-fsigned-char --disable-netcdf-4 --disable-dap-remote-tests --enable-cdf5' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=TRUE' CURHOST=docker-clang-x64-signed
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-fsigned-char --disable-netcdf-4 --disable-dap-remote-tests' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=OFF' CURHOST=docker-gcc-x86-signed
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-fsigned-char --disable-netcdf-4 --disable-dap-remote-tests' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=OFF' CURHOST=docker-clang-x86-signed
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-funsigned-char --disable-netcdf-4 --disable-dap-remote-tests --enable-cdf5' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=TRUE' CURHOST=docker-gcc-x64-unsigned
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-funsigned-char --disable-netcdf-4 --disable-dap-remote-tests --enable-cdf5' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=TRUE' CURHOST=docker-clang-x64-unsigned
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-funsigned-char --disable-netcdf-4 --disable-dap-remote-tests' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=OFF' CURHOST=docker-gcc-x86-unsigned
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-funsigned-char --disable-netcdf-4 --disable-dap-remote-tests' COPTS='-DENABLE_NETCDF_4=OFF -DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=OFF' CURHOST=docker-clang-x86-unsigned
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-fsigned-char --disable-dap-remote-tests --enable-cdf5' COPTS='-DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=TRUE' CURHOST=docker-gcc-x64-signed
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-fsigned-char --disable-dap-remote-tests --enable-cdf5' COPTS='-DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=TRUE' CURHOST=docker-clang-x64-signed
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-fsigned-char --disable-dap-remote-tests' COPTS='-DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=OFF' CURHOST=docker-gcc-x86-signed
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-fsigned-char --disable-dap-remote-tests' COPTS='-DCMAKE_C_FLAGS=-fsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=OFF' CURHOST=docker-clang-x86-signed
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-funsigned-char --disable-dap-remote-tests --enable-cdf5' COPTS='-DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=TRUE' CURHOST=docker-gcc-x64-unsigned
- DOCKIMG=unidata/nctests:serial USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-funsigned-char --disable-dap-remote-tests --enable-cdf5' COPTS='-DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=TRUE' CURHOST=docker-clang-x64-unsigned
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=gcc AC_COPTS='CFLAGS=-funsigned-char --disable-dap-remote-tests' COPTS='-DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=OFF' CURHOST=docker-gcc-x86-unsigned
- DOCKIMG=unidata/nctests:serial32 USECMAKE=TRUE USEAC=TRUE DISTCHECK=TRUE USE_CC=clang AC_COPTS='CFLAGS=-funsigned-char --disable-dap-remote-tests' COPTS='-DCMAKE_C_FLAGS=-funsigned-char -DENABLE_DAP_REMOTE_TESTS=OFF -DENABLE_CDF5=OFF' CURHOST=docker-clang-x86-unsigned
before_install:
- docker pull $DOCKIMG > /dev/null
script:
- docker run --rm -it -h "$CURHOST" -e USEDASH=FALSE -e RUNF=OFF -e RUNCXX=OFF -e RUNP=OFF -e RUNNCO=OFF -e USECMAKE=$USECMAKE -e USEAC=$USEAC -e DISTCHECK=$DISTCHECK -e COPTS="$COPTS" -e AC_OPTS="$AC_OPTS" -e CTEST_OUTPUT_ON_FAILURE=1 -v $(pwd):/netcdf-c $DOCKIMG
- docker run --rm -it -h "$CURHOST" -e USEDASH=FALSE -e RUNF=OFF -e RUNCXX=OFF -e RUNP=OFF -e RUNNCO=OFF -e USECMAKE=$USECMAKE -e USEAC=$USEAC -e DISTCHECK=$DISTCHECK -e COPTS="$COPTS" -e AC_OPTS="$AC_OPTS" -e CTEST_OUTPUT_ON_FAILURE=1 -v $(pwd):/netcdf-c -e TESTPROC=100 $DOCKIMG
......@@ -25,7 +25,7 @@ set(PACKAGE "netCDF" CACHE STRING "")
#####
SET(NC_VERSION_MAJOR 4)
SET(NC_VERSION_MINOR 5)
SET(NC_VERSION_MINOR 6)
SET(NC_VERSION_PATCH 0)
SET(NC_VERSION_NOTE "")
SET(netCDF_VERSION ${NC_VERSION_MAJOR}.${NC_VERSION_MINOR}.${NC_VERSION_PATCH}${NC_VERSION_NOTE})
......@@ -93,7 +93,6 @@ INCLUDE(${CMAKE_ROOT}/Modules/CheckTypeSize.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/CheckFunctionExists.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/CheckCXXSourceCompiles.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/CheckCSourceCompiles.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/CheckCSourceRuns.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/CheckSymbolExists.cmake)
INCLUDE(${CMAKE_ROOT}/Modules/GetPrerequisites.cmake)
......@@ -501,6 +500,14 @@ IF(ENABLE_NETCDF_4)
SET(ENABLE_NETCDF4 ON CACHE BOOL "")
ENDIF()
# Option to allow for strict null file padding.
# See https://github.com/Unidata/netcdf-c/issues/657 for more information
OPTION(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING "Enable strict null byte header padding." OFF)
IF(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING)
SET(USE_STRICT_NULL_BYTE_HEADER_PADDING ON CACHE BOOL "")
ENDIF(ENABLE_STRICT_NULL_BYTE_HEADER_PADDING)
# Option for building RPC
OPTION(ENABLE_RPC "Enable RPC Client and Server." OFF)
IF(ENABLE_RPC)
......@@ -647,7 +654,7 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
ENDIF(HDF5_C_LIBRARY AND HDF5_HL_LIBRARY AND HDF5_INCLUDE_DIR)
# There is a missing case in the above code so default it
IF("${HDF5_C_LIBRARY_hdf5}" STREQUAL "" )
IF(NOT HDF5_C_LIBRARY_HDF5 OR "${HDF5_C_LIBRARY_hdf5}" STREQUAL "" )
SET(HDF5_C_LIBRARY_hdf5 "${HDF5_C_LIBRARY}")
ENDIF()
......@@ -689,10 +696,11 @@ IF(USE_HDF5 OR ENABLE_NETCDF_4)
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Pset_deflate "" HAVE_H5PSET_DEFLATE)
#Check to see if H5Z_SZIP exists in HDF5_Libraries. If so, we must use szip.
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5P_SZIP "" USE_SZIP)
CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5Z_SZIP "" USE_SZIP)
IF(USE_SZIP)
FIND_LIBRARY(SZIP NAMES szip sz)
IF(SZIP)
SET(HAVE_H5Z_SZIP 1)
SET(SZIP_LIBRARY ${SZIP})
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${SZIP})
ELSE()
......@@ -825,7 +833,6 @@ ELSE()
SET(ENABLE_DAP4 OFF)
ENDIF()
# Check to see if libtool supports
# Check for the math library so it can be explicitly linked.
IF(NOT WIN32)
......@@ -888,8 +895,7 @@ IF(ENABLE_TESTS)
# Options for CTest-based tests, dashboards.
SET(NC_CTEST_PROJECT_NAME "netcdf-c" CACHE STRING "Project Name for CTest-based testing purposes.")
SET(NC_CTEST_DROP_SITE "129.114.104.111" CACHE STRING "Dashboard location for CTest-based testing purposes.")
#SET(NC_CTEST_DROP_SITE "my.cdash.org" CACHE STRING "Dashboard location for CTest-based testing purposes.")
SET(NC_CTEST_DROP_SITE "cdash.unidata.ucar.edu" CACHE STRING "Dashboard location for CTest-based testing purposes.")
SET(NC_CTEST_DROP_LOC_PREFIX "" CACHE STRING "Prefix for Dashboard location on remote server when using CTest-based testing.")
FIND_PROGRAM(HOSTNAME_CMD NAMES hostname)
......@@ -994,7 +1000,6 @@ IF(ENABLE_PARALLEL4 AND ENABLE_NETCDF_4)
ENDIF()
ENDIF()
# Options to enable parallel IO, tests.
SET(STATUS_PNETCDF "OFF")
OPTION(ENABLE_PNETCDF "Build with parallel I/O for classic and 64-bit offset files using parallel-netcdf." OFF)
......@@ -1100,6 +1105,17 @@ IF(ENABLE_PARALLEL_TESTS AND USE_PARALLEL)
ENDIF()
ENDIF()
# Enable special filter test; experimental when using cmake.
OPTION(ENABLE_FILTER_TESTING "Enable filter testing. Ignored if shared libraries or netCDF4 are not enabled" OFF)
IF(NOT ENABLE_NETCDF4)
MESSAGE(WARNING "ENABLE_FILTER_TESTING requires netCDF-4. Disabling.")
SET(ENABLE_FILTER_TESTING OFF CACHE BOOL "")
ENDIF()
IF(NOT BUILD_SHARED_LIBS)
MESSAGE(WARNING "ENABLE_FILTER_TESTING requires shared libraries. Disabling.")
SET(ENABLE_FILTER_TESTING OFF CACHE BOOL "")
ENDIF()
# Determine whether or not to generate documentation.
OPTION(ENABLE_DOXYGEN "Enable generation of doxygen-based documentation." OFF)
IF(ENABLE_DOXYGEN)
......@@ -1194,14 +1210,12 @@ MARK_AS_ADVANCED(ENABLE_SHARED_LIBRARY_VERSION)
SET(SIGNED_TEST_SOURCE "\n
#include <stdlib.h>\n
int main(void) {\n
char is_signed = (char) - 1;\n
if(is_signed < 0)\n
return 1;\n
else\n
return 0;\n
char error_if_char_is_signed[((char)-1) < 0 ? -1 : 1];\n
error_if_char_is_signed[0] = 0;
return -;\n
}\n")
CHECK_C_SOURCE_RUNS("${SIGNED_TEST_SOURCE}" __CHAR_UNSIGNED__)
CHECK_C_SOURCE_COMPILES("${SIGNED_TEST_SOURCE}" __CHAR_UNSIGNED__)
# Library include checks
CHECK_INCLUDE_FILE("math.h" HAVE_MATH_H)
......@@ -1240,6 +1254,7 @@ CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H)
CHECK_INCLUDE_FILE("sys/wait.h" HAVE_SYS_WAIT_H)
CHECK_INCLUDE_FILE("sys/mman.h" HAVE_SYS_MMAN_H)
CHECK_INCLUDE_FILE("sys/resource.h" HAVE_SYS_RESOURCE_H)
CHECK_INCLUDE_FILE("sys/cdefs.h" HAVE_SYS_CDEFS_H)
CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H)
CHECK_INCLUDE_FILE("inttypes.h" HAVE_INTTYPES_H)
CHECK_INCLUDE_FILE("pstdint.h" HAVE_PSTDINT_H)
......@@ -1365,6 +1380,7 @@ CHECK_FUNCTION_EXISTS(strtoll HAVE_STRTOLL)
CHECK_FUNCTION_EXISTS(strtoull HAVE_STRTOULL)
CHECK_FUNCTION_EXISTS(strstr HAVE_STRSTR)
CHECK_FUNCTION_EXISTS(mkstemp HAVE_MKSTEMP)
CHECK_FUNCTION_EXISTS(mktemp HAVE_MKTEMP)
CHECK_FUNCTION_EXISTS(rand HAVE_RAND)
CHECK_FUNCTION_EXISTS(random HAVE_RANDOM)
CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
......@@ -1509,7 +1525,7 @@ ENDMACRO()
MACRO(build_bin_test_no_prefix F)
build_bin_test(${F})
IF(MSVC)
SET_PROPERTY(TEST ${F} PROPERTY FOLDER "tests/")
#SET_PROPERTY(TEST ${F} PROPERTY FOLDER "tests/")
SET_TARGET_PROPERTIES(${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR})
SET_TARGET_PROPERTIES(${F} PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG
......@@ -1782,10 +1798,6 @@ IF(MSVC)
DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT dependencies)
#INSTALL(DIRECTORY ${CMAKE_PREFIX_PATH} DESTINATION "deps" COMPONENT dependencies)
# INSTALL(FILES ${ALL_TLL_LIBS}
# DESTINATION ${CMAKE_INSTALL_LIBDIR}
# COMPONENT dependencies)
ENDIF()
# Subdirectory CMakeLists.txt files should specify their own
......@@ -1827,6 +1839,12 @@ ENDFOREACH()
SET(NC_LIBS "-lnetcdf ${NC_LIBS}")
STRING(REPLACE ";" " " NC_LIBS "${NC_LIBS}")
STRING(REPLACE "-lhdf5::hdf5-shared" "-lhdf5" NC_LIBS ${NC_LIBS})
STRING(REPLACE "-lhdf5::hdf5_hl-shared" "-lhdf5_hl" NC_LIBS ${NC_LIBS})
STRING(REPLACE "-lhdf5::hdf5-static" "-lhdf5" NC_LIBS ${NC_LIBS})
STRING(REPLACE "-lhdf5::hdf5_hl-static" "-lhdf5_hl" NC_LIBS ${NC_LIBS})
STRING(REPLACE ";" " " LINKFLAGS "${LINKFLAGS}")
LIST(REMOVE_DUPLICATES NC_LIBS)
......@@ -1908,6 +1926,7 @@ is_enabled(USE_MMAP HAS_MMAP)
is_enabled(JNA HAS_JNA)
is_enabled(STATUS_RELAX_COORD_BOUND RELAX_COORD_BOUND)
is_enabled(USE_CDF5 HAS_CDF5)
is_enabled(ENABLE_ERANGE_FILL ENABLE_ERANGE_FILL)
# Generate file from template.
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/libnetcdf.settings.in"
......@@ -1949,6 +1968,13 @@ SET(TOPSRCDIR "${CMAKE_SOURCE_DIR}")
SET(TOPBUILDDIR "${CMAKE_BINARY_DIR}")
configure_file(${CMAKE_SOURCE_DIR}/test_common.in ${CMAKE_BINARY_DIR}/test_common.sh @ONLY NEWLINE_STYLE LF)
#####
# Build nc_test4/findplugin.sh
#####
SET(ISCMAKE "1")
configure_file(${CMAKE_SOURCE_DIR}/nc_test4/findplugin.in ${CMAKE_BINARY_DIR}/nc_test4/findplugin.sh @ONLY NEWLINE_STYLE LF)
####
# Export files
####
......
......@@ -4,22 +4,18 @@
# This is the main automake file for netCDF. It builds the different
# netcdf directories. Not all directories are built, depending on the
# options selected during configure.
# Ed Hartnett, Ward Fisher
# This directory stores libtool macros, put there by aclocal.
ACLOCAL_AMFLAGS = -I m4
# These files get added to the distribution.
EXTRA_DIST = README.md COPYRIGHT INSTALL.md test_prog.c \
lib_flags.am cmake CMakeLists.txt COMPILE.cmake.txt \
config.h.cmake.in cmake_uninstall.cmake.in \
FixBundle.cmake.in \
nc-config.cmake.in RELEASE_NOTES.md CTestCustom.cmake \
CTestConfig.cmake.in libnetcdf.settings.in netCDFConfig.cmake.in \
CMakeInstallation.cmake test-driver-verbose test_common.in
# Doxygen doesn't build nicely in vpath builds.
# Don't do this; it wipes out any exported values
#DISTCHECK_CONFIGURE_FLAGS = --disable-doxygen
EXTRA_DIST = README.md COPYRIGHT INSTALL.md test_prog.c lib_flags.am \
cmake CMakeLists.txt COMPILE.cmake.txt config.h.cmake.in \
cmake_uninstall.cmake.in FixBundle.cmake.in nc-config.cmake.in \
RELEASE_NOTES.md CTestCustom.cmake CTestConfig.cmake.in \
libnetcdf.settings.in netCDFConfig.cmake.in CMakeInstallation.cmake \
test-driver-verbose test_common.in
pkgconfigdir=$(libdir)/pkgconfig
pkgconfig_DATA = netcdf.pc
......@@ -70,16 +66,6 @@ if USE_PNETCDF
LIBSRCP = libsrcp
endif
# Build UDUNITS?
#if BUILD_UDUNITS
#UDUNITS = udunits
#endif
# Build libcf?
#if BUILD_LIBCF
#LIBCF = libcf
#endif
# Define Test directories
if BUILD_TESTSETS
TESTDIRS = $(V2_TEST) nc_test $(NC_TEST4) $(NCDAP2TESTDIR) $(NCDAP4TESTDIR)
......@@ -88,15 +74,13 @@ endif
# This is the list of subdirs for which Makefiles will be constructed
# and run. ncgen must come before ncdump, because their tests
# depend on it.
SUBDIRS = include $(H5_TEST_DIR) libdispatch libsrc \
$(LIBSRC4_DIR) $(LIBSRCP) $(OCLIB) $(DAP2) ${DAP4} liblib \
$(NCGEN3) $(NCGEN) $(NCDUMP) \
$(TESTDIRS) \
docs $(EXAMPLES) \
$(UDUNITS) $(LIBCF)
SUBDIRS = include $(H5_TEST_DIR) libdispatch libsrc $(LIBSRC4_DIR) \
$(LIBSRCP) $(OCLIB) $(DAP2) ${DAP4} liblib $(NCGEN3) $(NCGEN) \
$(NCDUMP) $(TESTDIRS) docs $(EXAMPLES)
# Remove these generated files, for a distclean.
DISTCLEANFILES = VERSION comps.txt test_prog libnetcdf.settings test_common.sh
DISTCLEANFILES = VERSION comps.txt test_prog libnetcdf.settings \
test_common.sh
# The nc-config script helps the user build programs with netCDF.
bin_SCRIPTS = nc-config
......@@ -105,22 +89,17 @@ bin_SCRIPTS = nc-config
BINFILES = README_BINARIES.txt
BINFILES += include/netcdf.h share/man/man3/netcdf.3 lib/libnetcdf.a
BINFILES += libnetcdf.settings
ZIPBINFILES = ${prefix}/include/netcdf.h ${prefix}/share/man/man3/netcdf.3 ${prefix}/lib/libnetcdf.a
ZIPBINFILES = ${prefix}/include/netcdf.h \
${prefix}/share/man/man3/netcdf.3 ${prefix}/lib/libnetcdf.a
if BUILD_UTILITIES
BINFILES += bin/ncgen3$(EXEEXT) bin/ncgen$(EXEEXT) bin/ncdump$(EXEEXT) \
share/man/man1/ncgen.1 share/man/man1/ncdump.1
ZIPBINFILES += ${prefix}/bin/ncgen3$(EXEEXT) ${prefix}/bin/ncgen$(EXEEXT) ${prefix}/bin/ncdump$(EXEEXT) \
ZIPBINFILES += ${prefix}/bin/ncgen3$(EXEEXT) \
${prefix}/bin/ncgen$(EXEEXT) ${prefix}/bin/ncdump$(EXEEXT) \
${prefix}/share/man/man1/ncgen.1 ${prefix}/share/man/man1/ncdump.1
endif
if BUILD_DLL
BINFILES += bin/libnetcdf-7.dll lib/libnetcdf.dll.a lib/libnetcdf.a \
lib/libnetcdf.la lib/netcdfdll.def
ZIPBINFILES += ${prefix}/bin/libnetcdf-7.dll ${prefix}/lib/libnetcdf.dll.a ${prefix}/lib/libnetcdf.a \
${prefix}/lib/libnetcdf.la ${prefix}/lib/netcdfdll.def
endif # BUILD_DLL
# install libnetcdf.settings in lib directory.
settingsdir = $(libdir)
settings_DATA = libnetcdf.settings
......@@ -130,9 +109,8 @@ settings_DATA=libnetcdf.settings
# List of files to create: WARNING leave off the extension
####
MM4= ./nc_test/test_put ./nc_test/test_get \
./nc_test/test_write ./nc_test/test_read \
./libsrc/netcdf ./libsrc/putget ./libsrc/ncx \
MM4= ./nc_test/test_put ./nc_test/test_get ./nc_test/test_write \
./nc_test/test_read ./libsrc/netcdf ./libsrc/putget ./libsrc/ncx \
./libsrc/t_ncxx ./libsrc/attr
mm4::
......@@ -147,7 +125,6 @@ mm4::
# install-netcdf-fortran.
#####
###
# build-netcdf-fortran
###
......@@ -168,43 +145,12 @@ install-netcdf-fortran:
endif
# At Unidata, package up binaries.
ftpbin: install
echo "Getting binaries from ${prefix}"
ls -l ${prefix}
echo "These are the binaries for netCDF @PACKAGE_VERSION@." > ${prefix}/README_BINARIES.txt
echo "For this build: CC=$(CC) CXX=$(CXX)" >> ${prefix}/README_BINARIES.txt
echo "CFLAGS=$(CFLAGS) CXXFLAGS=$(CXXFLAGS)" >> ${prefix}/README_BINARIES.txt
echo "FCFLAGS=$(FCFLAGS) F77FLAGS=$(F77FLAGS) $F90FLAGS=$(F90FLAGS)" >> ${prefix}/README_BINARIES.txt
which tar
echo "PATH: $(PATH)"
tar cf @BINFILE_NAME@ -C ${prefix} ${BINFILES}
gzip -f @BINFILE_NAME@
zip -j netcdf_${VERSION}.zip ${ZIPBINFILES}
check_nc_config:
$(CC) `./nc-config --cflags` test_prog.c -o test_prog `./nc-config --libs`
./test_prog
# Build nc_test/test_common.sh
# Complicated by need to create during distcheck
# which uses a read-only source tree
#all-local:
# rm -f ${top_builddir}/nc_test/test_common.sh
# cat /dev/null > ${top_builddir}/nc_test/test_common.sh
# chmod a+x ${top_builddir}/nc_test/test_common.sh
# sed -e "s|@TOPSRCDIR@|${abs_top_srcdir}|" -e "s|@TOPBUILDDIR@|${abs_top_builddir}|" <${top_srcdir}/test_common.in >>${top_builddir}/test_common.sh
install-data-hook:
# if BUILD_FORTRAN
# chmod u+x $(abs_top_builddir)/postinstall.sh
# sh -c "$(abs_top_builddir)/postinstall.sh -t autotools"
#endif
if BUILD_DLL
cp liblib/netcdfdll.def $(DESTDIR)${prefix}/bin
endif # BUILD_DLL
@echo ''
@echo '+-------------------------------------------------------------+'
@echo '| Congratulations! You have successfully installed netCDF! |'
......
......@@ -19,6 +19,7 @@
# This is the main automake file for netCDF. It builds the different
# netcdf directories. Not all directories are built, depending on the
# options selected during configure.
# Ed Hartnett, Ward Fisher
VPATH = @srcdir@
......@@ -99,15 +100,10 @@ target_triplet = @target@
@BUILD_UTILITIES_TRUE@am__append_1 = bin/ncgen3$(EXEEXT) bin/ncgen$(EXEEXT) bin/ncdump$(EXEEXT) \
@BUILD_UTILITIES_TRUE@share/man/man1/ncgen.1 share/man/man1/ncdump.1
@BUILD_UTILITIES_TRUE@am__append_2 = ${prefix}/bin/ncgen3$(EXEEXT) ${prefix}/bin/ncgen$(EXEEXT) ${prefix}/bin/ncdump$(EXEEXT) \
@BUILD_UTILITIES_TRUE@am__append_2 = ${prefix}/bin/ncgen3$(EXEEXT) \
@BUILD_UTILITIES_TRUE@${prefix}/bin/ncgen$(EXEEXT) ${prefix}/bin/ncdump$(EXEEXT) \
@BUILD_UTILITIES_TRUE@${prefix}/share/man/man1/ncgen.1 ${prefix}/share/man/man1/ncdump.1
@BUILD_DLL_TRUE@am__append_3 = bin/libnetcdf-7.dll lib/libnetcdf.dll.a lib/libnetcdf.a \
@BUILD_DLL_TRUE@lib/libnetcdf.la lib/netcdfdll.def
@BUILD_DLL_TRUE@am__append_4 = ${prefix}/bin/libnetcdf-7.dll ${prefix}/lib/libnetcdf.dll.a ${prefix}/lib/libnetcdf.a \
@BUILD_DLL_TRUE@${prefix}/lib/libnetcdf.la ${prefix}/lib/netcdfdll.def
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
......@@ -270,7 +266,6 @@ AM_CPPFLAGS = @AM_CPPFLAGS@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_LDFLAGS = @AM_LDFLAGS@
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
......@@ -293,12 +288,14 @@ DOXYGEN = @DOXYGEN@
DOXYGEN_CSS_FILE = @DOXYGEN_CSS_FILE@
DOXYGEN_HEADER_FILE = @DOXYGEN_HEADER_FILE@
DOXYGEN_SEARCHENGINE = @DOXYGEN_SEARCHENGINE@
DOXYGEN_SERVER_BASED_SEARCH = @DOXYGEN_SERVER_BASED_SEARCH@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_ERANGE_FILL = @ENABLE_ERANGE_FILL@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
......@@ -324,6 +321,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
ISCMAKE = @ISCMAKE@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
......@@ -338,6 +336,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MSVC = @MSVC@
NC_ENABLE_DOXYGEN_PDF_OUTPUT = @NC_ENABLE_DOXYGEN_PDF_OUTPUT@
NC_HAS_CDF5 = @NC_HAS_CDF5@
NC_HAS_DAP2 = @NC_HAS_DAP2@
......@@ -446,18 +445,13 @@ top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I m4
# These files get added to the distribution.
EXTRA_DIST = README.md COPYRIGHT INSTALL.md test_prog.c \
lib_flags.am cmake CMakeLists.txt COMPILE.cmake.txt \
config.h.cmake.in cmake_uninstall.cmake.in \
FixBundle.cmake.in \
nc-config.cmake.in RELEASE_NOTES.md CTestCustom.cmake \
CTestConfig.cmake.in libnetcdf.settings.in netCDFConfig.cmake.in \
CMakeInstallation.cmake test-driver-verbose test_common.in
# Doxygen doesn't build nicely in vpath builds.
# Don't do this; it wipes out any exported values
#DISTCHECK_CONFIGURE_FLAGS = --disable-doxygen
EXTRA_DIST = README.md COPYRIGHT INSTALL.md test_prog.c lib_flags.am \
cmake CMakeLists.txt COMPILE.cmake.txt config.h.cmake.in \
cmake_uninstall.cmake.in FixBundle.cmake.in nc-config.cmake.in \
RELEASE_NOTES.md CTestCustom.cmake CTestConfig.cmake.in \
libnetcdf.settings.in netCDFConfig.cmake.in CMakeInstallation.cmake \
test-driver-verbose test_common.in
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = netcdf.pc
......@@ -492,32 +486,21 @@ pkgconfig_DATA = netcdf.pc
# Build pnetcdf
@USE_PNETCDF_TRUE@LIBSRCP = libsrcp
# Build UDUNITS?
#if BUILD_UDUNITS
#UDUNITS = udunits
#endif
# Build libcf?
#if BUILD_LIBCF
#LIBCF = libcf
#endif
# Define Test directories
@BUILD_TESTSETS_TRUE@TESTDIRS = $(V2_TEST) nc_test $(NC_TEST4) $(NCDAP2TESTDIR) $(NCDAP4TESTDIR)
# This is the list of subdirs for which Makefiles will be constructed
# and run. ncgen must come before ncdump, because their tests
# depend on it.
SUBDIRS = include $(H5_TEST_DIR) libdispatch libsrc \
$(LIBSRC4_DIR) $(LIBSRCP) $(OCLIB) $(DAP2) ${DAP4} liblib \
$(NCGEN3) $(NCGEN) $(NCDUMP) \
$(TESTDIRS) \
docs $(EXAMPLES) \
$(UDUNITS) $(LIBCF)
SUBDIRS = include $(H5_TEST_DIR) libdispatch libsrc $(LIBSRC4_DIR) \
$(LIBSRCP) $(OCLIB) $(DAP2) ${DAP4} liblib $(NCGEN3) $(NCGEN) \
$(NCDUMP) $(TESTDIRS) docs $(EXAMPLES)
# Remove these generated files, for a distclean.
DISTCLEANFILES = VERSION comps.txt test_prog libnetcdf.settings test_common.sh
DISTCLEANFILES = VERSION comps.txt test_prog libnetcdf.settings \
test_common.sh
# The nc-config script helps the user build programs with netCDF.
bin_SCRIPTS = nc-config
......@@ -525,10 +508,10 @@ bin_SCRIPTS = nc-config
# What needs to go in the binrary dist?
BINFILES = README_BINARIES.txt include/netcdf.h \
share/man/man3/netcdf.3 lib/libnetcdf.a libnetcdf.settings \
$(am__append_1) $(am__append_3)
$(am__append_1)
ZIPBINFILES = ${prefix}/include/netcdf.h \
${prefix}/share/man/man3/netcdf.3 ${prefix}/lib/libnetcdf.a \
$(am__append_2) $(am__append_4)
$(am__append_2)
# install libnetcdf.settings in lib directory.
settingsdir = $(libdir)
......@@ -538,9 +521,8 @@ settings_DATA = libnetcdf.settings
# Provide an entry to rebuild all the m4 generated files
# List of files to create: WARNING leave off the extension
####
MM4 = ./nc_test/test_put ./nc_test/test_get \
./nc_test/test_write ./nc_test/test_read \
./libsrc/netcdf ./libsrc/putget ./libsrc/ncx \
MM4 = ./nc_test/test_put ./nc_test/test_get ./nc_test/test_write \
./nc_test/test_read ./libsrc/netcdf ./libsrc/putget ./libsrc/ncx \
./libsrc/t_ncxx ./libsrc/attr
all: config.h
......@@ -1149,41 +1131,12 @@ mm4::
@BUILD_FORTRAN_TRUE@ chmod u+x $(abs_top_builddir)/postinstall.sh
@BUILD_FORTRAN_TRUE@ sh -c "$(abs_top_builddir)/postinstall.sh -t autotools -a install"
# At Unidata, package up binaries.
ftpbin: install
echo "Getting binaries from ${prefix}"
ls -l ${prefix}
echo "These are the binaries for netCDF @PACKAGE_VERSION@." > ${prefix}/README_BINARIES.txt
echo "For this build: CC=$(CC) CXX=$(CXX)" >> ${prefix}/README_BINARIES.txt
echo "CFLAGS=$(CFLAGS) CXXFLAGS=$(CXXFLAGS)" >> ${prefix}/README_BINARIES.txt
echo "FCFLAGS=$(FCFLAGS) F77FLAGS=$(F77FLAGS) $F90FLAGS=$(F90FLAGS)" >> ${prefix}/README_BINARIES.txt
which tar
echo "PATH: $(PATH)"
tar cf @BINFILE_NAME@ -C ${prefix} ${BINFILES}
gzip -f @BINFILE_NAME@
zip -j netcdf_${VERSION}.zip ${ZIPBINFILES}
check_nc_config:
$(CC) `./nc-config --cflags` test_prog.c -o test_prog `./nc-config --libs`
./test_prog
# Build nc_test/test_common.sh
# Complicated by need to create during distcheck
# which uses a read-only source tree
#all-local:
# rm -f ${top_builddir}/nc_test/test_common.sh
# cat /dev/null > ${top_builddir}/nc_test/test_common.sh
# chmod a+x ${top_builddir}/nc_test/test_common.sh
# sed -e "s|@TOPSRCDIR@|${abs_top_srcdir}|" -e "s|@TOPBUILDDIR@|${abs_top_builddir}|" <${top_srcdir}/test_common.in >>${top_builddir}/test_common.sh
install-data-hook:
# if BUILD_FORTRAN
# chmod u+x $(abs_top_builddir)/postinstall.sh
# sh -c "$(abs_top_builddir)/postinstall.sh -t autotools"
#endif
@BUILD_DLL_TRUE@ cp liblib/netcdfdll.def $(DESTDIR)${prefix}/bin
@echo ''
@echo '+-------------------------------------------------------------+'
@echo '| Congratulations! You have successfully installed netCDF! |'
......
......@@ -5,6 +5,16 @@ Release Notes {#RELEASE_NOTES}
This file contains a high-level description of this package's evolution. Releases are in reverse chronological order (most recent first). Note that, as of netcdf 4.2, the `netcdf-c++` and `netcdf-fortran` libraries have been separated into their own libraries.
## 4.6.1 - TBD
## 4.6.0 - January 24, 2018
* [Enhancement] Full support for using HDF5 dynamic filters, both for reading and writing. See the file docs/filters.md.
* [Enhancement] Added an option to enable strict null-byte padding for headers; this padding was specified in the spec but was not enforced. Enabling this option will allow you to check your files, as it will return an E_NULLPAD error. It is possible for these files to have been written by older versions of libnetcdf. There is no effective problem caused by this lack of null padding, so enabling these options is informational only. The options for `configure` and `cmake` are `--enable-strict-null-byte-header-padding` and `-DENABLE_STRICT_NULL_BYTE_HEADER_PADDING`, respectively. See [Github #657](https://github.com/Unidata/netcdf-c/issues/657) for more information.
* [Enhancement] Reverted behavior/handling of out-of-range attribute values to pre-4.5.0 default. See [Github #512](https://github.com/Unidata/netcdf-c/issues/512) for more information.
* [Bug] Fixed error in tst_parallel2.c. See [Github #545](https://github.com/Unidata/netcdf-c/issues/545) for more information.
* [Bug] Fixed handling of corrupt files + proper offset handling for hdf5 files. See [Github #552](https://github.com/Unidata/netcdf-c/issues/552) for more information.
* [Bug] Corrected a memory overflow in `tst_h_dimscales`, see [Github #511](https://github.com/Unidata/netcdf-c/issues/511), [Github #505](https://github.com/Unidata/netcdf-c/issues/505), [Github #363](https://github.com/Unidata/netcdf-c/issues/363) and [Github #244](https://github.com/Unidata/netcdf-c/issues/244) for more information.
## 4.5.0 - October 20, 2017
* Corrected an issue which could potential result in a hang while using parallel file I/O. See [Github #449](https://github.com/Unidata/netcdf-c/pull/449) for more information.
......
#!/bin/bash
#NB=1
DB=1
#DB=1
#X=-x
FAST=1
HDF5=1
DAP=1
#SZIP=1
#HDF4=1
#PNETCDF=1
#PAR4=1
......@@ -18,14 +19,10 @@ if test "x$PNETCDF" = x1 -o "x$PAR4" = x1 ; then
MPIO=1
fi
#RPC=1
#M32=1
#M64=1
CFLAGS=""
#CFLAGS="-Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-parameter -Wconversion ${CFLAGS}"
CFLAGS="-Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-parameter -Wno-char-subscripts -Wno-pointer-sign -Wno-format ${CFLAGS}"
#CFLAGS="-Wall -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-parameter -Wno-char-subscripts -Wno-pointer-sign -Wno-format ${CFLAGS}"
CFLAGS="-Wall -Wno-unused-parameter -Wno-char-subscripts -Wno-pointer-sign ${CFLAGS}"
#CFLAGS="-Wall ${CFLAGS}"
#CFLAGS="-Wconversion"
......@@ -47,6 +44,11 @@ if test "x$HDF4" = x1 ; then
HDF5=1
fi
# !HDF5=>!SZIP
if test "x$HDF5" != x1 ; then
SZIP=0
fi
CC=gcc
MALLOC_CHECK=""
......@@ -69,6 +71,10 @@ if test "x$HDF4" = "x1" ; then
LDFLAGS="$LDFLAGS -ljpeg"
fi
if test "x$SZIP" = "x1" ; then
LDFLAGS="$LDFLAGS -lsz -laec"
fi
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
if test "x$DAP" = "x1" ; then
if curl-config --version >/dev/null ; then
......@@ -88,19 +94,18 @@ CXXFLAGS="$CPPFLAGS $CXXFLAGS"
FLAGS="--prefix ${PREFIX}"
#FLAGS="$FLAGS --disable-f77 --disable-f90"
#FLAGS="$FLAGS --disable-cxx"
FLAGS="$FLAGS --disable-examples"
#FLAGS="$FLAGS --disable-examples"
#FLAGS="$FLAGS --disable-utilities"
#FLAGS="$FLAGS --enable-cxx-4"
#FLAGS="$FLAGS --enable-dap-long-tests"
#FLAGS="$FLAGS --enable-ffio"
#FLAGS="$FLAGS --enable-benchmarks"
FLAGS="$FLAGS --enable-extreme-numbers"
FLAGS="$FLAGS --enable-extra-tests"
#FLAGS="$FLAGS --enable-large-file-tests"
#FLAGS="$FLAGS --disable-testsets"
#FLAGS="$FLAGS --disable-dap-remote-tests"
#FLAGS="$FLAGS --enable-dap-auth-tests" -- requires a new remotetest server
#FLAGS="$FLAGS --enable-doxygen"
#FLAGS="$FLAGS --enable-doxygen --enable-internal-docs"
FLAGS="$FLAGS --enable-logging"
#FLAGS="$FLAGS --disable-diskless"
#FLAGS="$FLAGS --enable-mmap"
......@@ -112,6 +117,7 @@ FLAGS="$FLAGS --enable-logging"
#FLAGS="$FLAGS --disable-properties-attribute"
#FLAGS="$FLAGS --disable-silent-rules"
#FLAGS="$FLAGS --with-testservers=remotestserver.localhost:8083"
#FLAGS="$FLAGS --disable-filter-testing"
if test "x$PAR4" != x1 ; then
FLAGS="$FLAGS --disable-parallel4"
......@@ -152,19 +158,11 @@ FLAGS="$FLAGS --disable-dap"
fi
if test "x$MPIO" = x1 ; then
if test -f /machine/local_mpich2 ; then
MPI1=/machine/local_mpich2
MPI2=/machine/local_par7
MPI3=/machine/local_par
else
MPI1=/usr/local
MPI2=${MPI1}
MPI3=${MPI1}
fi
PATH=${PATH}:${MPI1}/bin
CC="${MPI1}/bin/mpicc"
CPPFLAGS="-I${MPI2}/include -I${MPI1}/include -I${MPI3}/include"
LDFLAGS="-L${MPI2}/lib -L${MPI1}/lib -L${MPI3}/lib"
MPIDIR=/usr/lib64/mpich
PATH="${PATH}:${MPIDIR}/bin"
CC="${MPIDIR}/bin/mpicc"
CPPFLAGS="-I${MPIDIR}/include"
LDFLAGS="$LDFLAGS -L${MPIDIR}"
LDLIBS="-lmpich"
FLAGS="$FLAGS --enable-pnetcdf"
FLAGS="$FLAGS --enable-parallel-tests"
......@@ -194,6 +192,7 @@ fi
if test -z "$FAST" ; then
if test -f Makefile ; then ${MAKE} distclean >/dev/null 2>&1 ; fi
fi
sh $X ./configure ${FLAGS}
for c in $cmds; do
printenv LD_LIBRARY_PATH
......
# Visual Studio
VS=1
#VSSETUP=1
# Is netcdf-4 and/or DAP enabled?
NC4=1
#DAP=1
#CDF5=1
#HDF4=1
case "$1" in
vs|VS) VS=1 ;;
linux|nix|l|x) unset VS ;;
*) echo "Must specify env: vs|linux"; exit 1; ;;
esac
if test "x$VS" = x1 ; then
if test "x$2" = xsetup ; then
VSSETUP=1
else
unset VSSETUP
fi
fi
#export NCPATHDEBUG=1
......@@ -10,29 +28,22 @@ else
CFG="Release"
fi
# Is netcdf-4 and/or DAP enabled?
NC4=1
DAP=1
if test "x$VS" != x ; then
if test "x$VS" != x -a "x$INSTALL" != x ; then
FLAGS="-DCMAKE_PREFIX_PATH=c:/tools/nccmake"
fi
FLAGS="$FLAGS -DCMAKE_INSTALL_PREFIX=d:/ignore"
FLAGS="$FLAGS -DCMAKE_INSTALL_PREFIX=/tmp/netcdf"
if test "x$DAP" = x ; then
FLAGS="$FLAGS -DENABLE_DAP=false"
else
FLAGS="$FLAGS -DENABLE_DAP=true"
fi
if test "x$NC4" = x ; then
FLAGS="$FLAGS -DENABLE_NETCDF_4=false"
fi
if test "x$DAP" = x ; then FLAGS="$FLAGS -DENABLE_DAP=false"; fi
if test "x$NC4" = x ; then FLAGS="$FLAGS -DENABLE_NETCDF_4=false"; fi
if test "x$CDF5" != x ; then FLAGS="$FLAGS -DENABLE_CDF5=true"; fi
if test "x$HDF4" != x ; then FLAGS="$FLAGS -DENABLE_HDF4=true"; fi
FLAGS="$FLAGS -DENABLE_CONVERSION_WARNINGS=false"
FLAGS="$FLAGS -DENABLE_DAP_REMOTE_TESTS=true"
FLAGS="$FLAGS -DENABLE_TESTS=true"
FLAGS="$FLAGS -DENABLE_EXAMPLES=false"
#FLAGS="$FLAGS -DENABLE_HDF4=true"
FLAGS="$FLAGS -DENABLE_DYNAMIC_LOADING=false"
FLAGS="$FLAGS -DENABLE_WINSOCK2=false"
#FLAGS="$FLAGS -DENABLE_LARGE_FILE_TESTS=true"
rm -fr build
mkdir build
......@@ -42,17 +53,18 @@ NCLIB=`pwd`
if test "x$VS" != x ; then
# Visual Studio
NCLIB="${NCLIB}/build/liblib/$CFG"
CFG="Release"
NCLIB="${NCLIB}/liblib"
export PATH="${NCLIB}:${PATH}"
cmake $FLAGS ..
if test "x$VSSETUP" = x ; then
#G=
cmake "$G" -DCMAKE_BUILD_TYPE=${CFG} $FLAGS ..
cmake --build . --config ${CFG}
cmake --build . --config ${CFG} --target RUN_TESTS
fi
else
# GCC
NCLIB="${NCLIB}/build/liblib"
G="-GUnix Makefiles"
#G="-GUnix Makefiles"
#T="--trace-expand"
cmake "${G}" $FLAGS ..
make all
make test
......
......@@ -111,6 +111,9 @@ are set when opening a binary file on Windows. */
#cmakedefine ENABLE_CDF5 1
#cmakedefine USE_CDF5 1
/* if true, enable strict null byte header padding. */
#cmakedefine USE_STRICT_NULL_BYTE_HEADER_PADDING 1
/* if true, build DAP2 and DAP4 Client */
#cmakedefine ENABLE_DAP 1
......@@ -295,6 +298,9 @@ are set when opening a binary file on Windows. */
/* Define to 1 if you have the `mkstemp' function. */
#cmakedefine HAVE_MKSTEMP 1
/* Define to 1 if you have the `mktemp' function. */
#cmakedefine HAVE_MKTEMP 1
/* Define to 1 if you have a working `mmap' system call. */
#cmakedefine HAVE_MMAP 1
......@@ -404,6 +410,9 @@ are set when opening a binary file on Windows. */
/* Define to 1 if you have the `sysconf' function. */
#cmakedefine HAVE_SYSCONF 1
/* Define to 1 if you have the <sys/cdefs.h> header file. */
#cmakedefine HAVE_SYS_CDEFS_H 1
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
#cmakedefine HAVE_SYS_DIR_H 1
......
......@@ -29,12 +29,6 @@
/* default chunk size in bytes */
#undef DEFAULT_CHUNK_SIZE
/* set this only when building a DLL under MinGW */
#undef DLL_EXPORT
/* set this only when building a DLL under MinGW */
#undef DLL_NETCDF
/* if true, enable CDF5 Support */
#undef ENABLE_CDF5
......@@ -53,9 +47,6 @@
/* if true, use _FillValue for NC_ERANGE data elements */
#undef ERANGE_FILL
/* if true, run extra tests which may not work yet */
#undef EXTRA_TESTS
/* use HDF5 1.6 API */
#undef H5_USE_16_API
......@@ -209,6 +200,9 @@
/* Define to 1 if you have the `mkstemp' function. */
#undef HAVE_MKSTEMP
/* Define to 1 if you have the `mktemp' function. */
#undef HAVE_MKTEMP
/* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP
......@@ -230,6 +224,9 @@
/* Define to 1 if you have the `random' function. */
#undef HAVE_RANDOM
/* Define to 1 if the system has the type `schar'. */
#undef HAVE_SCHAR
/* Define to 1 if the system has the type `size_t'. */
#undef HAVE_SIZE_T
......@@ -306,6 +303,9 @@
/* Define to 1 if you have the `sysconf' function. */
#undef HAVE_SYSCONF
/* Define to 1 if you have the <sys/cdefs.h> header file. */
#undef HAVE_SYS_CDEFS_H
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_DIR_H
......@@ -552,6 +552,9 @@
/* if true, use stdio instead of posixio */
#undef USE_STDIO
/* if true, enable strict null byte header padding */
#undef USE_STRICT_NULL_BYTE_HEADER_PADDING
/* if true, compile in szip compression in netCDF-4 variables */
#undef USE_SZIP
......
This diff is collapsed.
......@@ -3,6 +3,7 @@
# This is part of Unidata's netCDF package. Copyright 2005-2012, see
# the COPYRIGHT file for more information.
# Ed Hartnett, Ward Fisher, Dennis Heimbigner
# Recall that ${VAR-exp} expands to $VAR if var is set (even to null),
# and to exp otherwise.
......@@ -15,7 +16,7 @@ AC_REVISION([$Id: configure.ac,v 1.450 2010/05/28 19:42:47 dmh Exp $])
AC_PREREQ([2.59])
# Initialize with name, version, and support email address.
AC_INIT([netCDF], [4.5.0], [support-netcdf@unidata.ucar.edu])
AC_INIT([netCDF], [4.6.0], [support-netcdf@unidata.ucar.edu])
##
# Prefer an empty CFLAGS variable instead of the default -g -O2.
......@@ -25,7 +26,7 @@ AC_INIT([netCDF], [4.5.0], [support-netcdf@unidata.ucar.edu])
: ${CFLAGS=""}
AC_SUBST([NC_VERSION_MAJOR]) NC_VERSION_MAJOR=4
AC_SUBST([NC_VERSION_MINOR]) NC_VERSION_MINOR=5
AC_SUBST([NC_VERSION_MINOR]) NC_VERSION_MINOR=6
AC_SUBST([NC_VERSION_PATCH]) NC_VERSION_PATCH=0
AC_SUBST([NC_VERSION_NOTE]) NC_VERSION_NOTE=""
......@@ -74,7 +75,6 @@ AC_CONFIG_LINKS([nc_test4/ref_hdf5_compat3.nc:nc_test4/ref_hdf5_compat3.nc])
AC_CONFIG_LINKS([nc_test4/ref_chunked.hdf4:nc_test4/ref_chunked.hdf4])
AC_CONFIG_LINKS([nc_test4/ref_contiguous.hdf4:nc_test4/ref_contiguous.hdf4])
# This call is required by automake.
AM_INIT_AUTOMAKE([foreign dist-zip subdir-objects])
AM_MAINTAINER_MODE()
......@@ -83,20 +83,6 @@ AC_CONFIG_SRCDIR([include/netcdf.h])
AC_MSG_NOTICE([checking user options])
# If --enable-dll is specified the DLL will be built. This only works
# on mingw.
AC_MSG_CHECKING([whether a win32 DLL is desired])
AC_ARG_ENABLE([dll],
[AS_HELP_STRING([--enable-dll],
[build a win32 DLL (only works on mingw)])])
test "x$enable_dll" = xyes || enable_dll=no
AC_MSG_RESULT([$enable_dll])
if test "x$enable_dll" = xyes; then
AC_DEFINE(DLL_NETCDF, 1, [set this only when building a DLL under MinGW])
AC_DEFINE(DLL_EXPORT, 1, [set this only when building a DLL under MinGW])
fi
AM_CONDITIONAL(BUILD_DLL, [test x$enable_dll = xyes])
# Did the user specify a default minimum blocksize (NCIO_MINBLOCKSIZE) for posixio?
AC_MSG_CHECKING([whether a NCIO_MINBLOCKSIZE was specified])
AC_ARG_WITH([minblocksize],
......@@ -141,6 +127,7 @@ else
AC_SUBST([DOXYGEN_HEADER_FILE], [])
AC_SUBST([DOXYGEN_SEARCHENGINE], ["YES"])
fi
AC_SUBST([DOXYGEN_SERVER_BASED_SEARCH], ["NO"])
AC_ARG_ENABLE([doxygen-pdf-output],
[AS_HELP_STRING([--enable-doxygen-pdf-output],
......@@ -347,13 +334,8 @@ fi
# See if the user provided us with a curl library
# Do an initial lib test for curl, but suppress the default action
AC_CHECK_LIB([curl],[curl_easy_setopt],[found_curl=yes],[found_curl=no])
#AC_CHECK_LIB([curl.dll],[curl_easy_setopt])
# If curl is required but there is no curl, then complain
if test $require_curl = yes ; then
# Removed. Why assume no curl if we are building DLL?
#if test $enable_dll = yes ; then
# AC_MSG_NOTICE([libcurl not found; continuing])
#elif test $found_curl = no ; then
if test $found_curl = no ; then
AC_MSG_NOTICE([libcurl not found; disabling remote protocol(s) support])
enable_dap=no
......@@ -442,6 +424,21 @@ AC_MSG_RESULT([$enable_dap_long_tests])
AM_CONDITIONAL(INTERNAL_OCLIB,[test "x" = "x"])
# Check whether we want to enable strict null byte header padding.
# See https://github.com/Unidata/netcdf-c/issues/657 for more information.
AC_MSG_CHECKING([whether to enable strict null-byte header padding when reading (default off)])
AC_ARG_ENABLE([strict-null-byte-header-padding],
[AS_HELP_STRING([--enable-strict-null-byte-header-padding],
[enable strict null-byte header padding when reading netCDF3 files.])])
test "x$enable_strict_null_byte_header_padding" = xyes || enable_strict_null_byte_header_padding=no
AC_MSG_RESULT($enable_strict_null_byte_header_padding)
if test "x$enable_strict_null_byte_header_padding" = xyes; then
AC_DEFINE([USE_STRICT_NULL_BYTE_HEADER_PADDING], [1], [if true, enable strict null byte header padding])
fi
AM_CONDITIONAL(USE_STRICT_NULL_BYTE_HEADER_PADDING, [test x$enable_strict_null_byte_header_padding = xyes ])
# Check whether we want to enable CDF5 support.
AC_MSG_CHECKING([whether CDF5 support should be enabled (default off)])
AC_ARG_ENABLE([cdf5],
......@@ -458,18 +455,6 @@ fi
AM_CONDITIONAL(USE_CDF5, [test x$enable_cdf5 = xyes ])
AM_CONDITIONAL(ENABLE_CDF5, [test x$enable_cdf5 = xyes ])
# Does the user want to do some extra tests?
AC_MSG_CHECKING([whether netCDF extra tests should be run (developers only)])
AC_ARG_ENABLE([extra-tests],
[AS_HELP_STRING([--enable-extra-tests],
[enable some extra tests that may not pass because of known issues])])
test "x$enable_extra_tests" = xno || enable_extra_tests=yes
AC_MSG_RESULT($enable_extra_tests)
if test "x$enable_extra_tests" = xyes; then
AC_DEFINE([EXTRA_TESTS], [1], [if true, run extra tests which may not work yet])
fi
AM_CONDITIONAL(EXTRA_TESTS, [test x$enable_extra_tests = xyes])
# Does the user want to use the ffio module?
AC_MSG_CHECKING([whether FFIO will be used])
AC_ARG_ENABLE([ffio],
......@@ -494,19 +479,6 @@ if test "x$enable_stdio" = xyes; then
fi
AM_CONDITIONAL(USE_STDIO, [test x$enable_stdio = xyes])
# Does the user want to enable the user-provided NEC-SX vectorization
# patch.
dnl AC_MSG_CHECKING([whether netCDF NEC-SX vectorization patch is enabled])
dnl AC_ARG_ENABLE([sx-vectorization],
dnl [AS_HELP_STRING([--enable-sx-vectorization],
dnl [enable a user-provided performance patch to allow \
dnl vectorization of type conversions on NEC SX machines.])])
dnl test "x$enable_sx_vectorization" = xyes || enable_sx_vectorization=no
dnl AC_MSG_RESULT([$enable_sx_vectorization])
dnl if test "x$enable_sx_vectorization" = xyes; then
dnl AC_DEFINE([SX_VECTORIZATION], 1, [if true, turn on vectorization patch for NEC SX])
dnl fi
nc_build_c=yes
nc_build_v2=yes
nc_build_utilities=yes
......@@ -721,7 +693,7 @@ CFLAGS="$SAVECFLAGS"
# Set up libtool.
AC_MSG_NOTICE([setting up libtool])
LT_PREREQ([2.2])
LT_INIT(win32-dll)
LT_INIT()
# Valgrind tests don't work with shared builds because of some libtool
# weirdness.
......@@ -804,6 +776,8 @@ AC_FUNC_VPRINTF
AC_CHECK_HEADERS([sys/resource.h])
#fi
AC_CHECK_HEADERS([sys/cdefs.h])
# Check for <stdbool.h> that conforms to C99 requirements
AC_HEADER_STDBOOL
......@@ -813,7 +787,7 @@ AC_CHECK_HEADERS([ftw.h])
# Check for these functions...
AC_CHECK_FUNCS([strlcat strerror snprintf strchr strrchr strcat strcpy \
strdup strcasecmp strtod strtoll strtoull strstr \
mkstemp rand random memcmp \
mkstemp mktemp rand random memcmp \
getrlimit gettimeofday fsync MPI_Comm_f2c])
# Does the user want to use NC_DISKLESS?
......@@ -872,7 +846,7 @@ AC_FUNC_ALLOCA
AC_CHECK_DECLS([isnan, isinf, isfinite, signbit],,,[#include <math.h>])
AC_STRUCT_ST_BLKSIZE
UD_CHECK_IEEE
AC_CHECK_TYPES([size_t, ssize_t, ptrdiff_t, uchar, longlong, ushort, uint, int64, uint64 off_t])
AC_CHECK_TYPES([size_t, ssize_t, ptrdiff_t, schar, uchar, longlong, ushort, uint, int64, uint64 off_t])
AC_TYPE_SIZE_T
AC_TYPE_OFF_T
AC_C_CHAR_UNSIGNED
......@@ -1055,21 +1029,31 @@ fi
# a. do not want to use it for netcdf4
# b. do want to use it for netcdf4
# Should we suppress parallel io for netcdf-4?
# Should we provide parallel io for netcdf-4?
if test "x$enable_netcdf_4" = xyes ; then
AC_MSG_CHECKING([whether parallel I/O is enabled for netcdf-4])
AC_ARG_ENABLE([parallel4], [AS_HELP_STRING([--disable-parallel4],
[disable parallel I/O for netcdf-4, even if it's enabled in libhdf5] )])
AC_ARG_ENABLE([parallel4],
[AS_HELP_STRING([--disable-parallel4],
[disable parallel I/O for netcdf-4, even if it's enabled in libhdf5])],
[user_set_parallel4=${enableval}])
test "x$enable_parallel4" = xno || enable_parallel4=yes
AC_MSG_RESULT($enable_parallel4)
else
enable_parallel4=no
fi
# If user wants parallel IO for netCDF-4, make sure HDF5 can provide it.
if test "x$enable_parallel4" = xyes; then
if test "x$hdf5_parallel" = xno; then
# hdf5 does not support parallel io, so disable parallel4
# If user specifically asked for parallel4, then error out.
if test "x$user_set_parallel4" = xyes; then
AC_MSG_ERROR([Paralllel IO in netCDF-4 requested, but HDF5 does not provide parallel IO.])
fi
# User didn't specify, so disable parallel4
enable_parallel4=no
AC_MSG_WARN([Parallel io disabled for netcdf-4 because hdf5 does not support])
fi
fi
else
enable_parallel4=no
fi
# We have already tested for parallel io in netcdf4
# Now do it for netcdf-3
......@@ -1082,11 +1066,14 @@ AC_MSG_RESULT($enable_pnetcdf)
# See if the pnetcdf lib is available and of the
# right version (1.6.0 or later)
if test "x$enable_pnetcdf" = xyes; then
pnetcdf_conflict=no
AC_CHECK_LIB([pnetcdf], [ncmpi_create], [],[pnetcdf_conflict=yes])
if test "x$pnetcdf_conflict" = xyes ; then
AC_MSG_ERROR([Cannot link to pnetcdf library.])
fi
# Pnetcdf did not support utf-8 until 1.6.0
# Save/restore CFLAGS
......@@ -1106,16 +1093,10 @@ if test "x$enable_pnetcdf" = xyes; then
AC_MSG_CHECKING([Is libpnetcdf version 1.6.0 or later?])
AC_MSG_RESULT([$pnetcdf16])
if test x$pnetcdf16 = xno; then
AC_MSG_WARN([--enable-pnetcdf requires version 1.6.0 or later; disabling])
pnetcdf_conflict=yes
AC_MSG_ERROR([--enable-pnetcdf requires version 1.6.0 or later])
fi
fi
if test "x$pnetcdf_conflict" = xyes ; then
AC_MSG_WARN([Cannot link to pnetcdf library, --enable-pnetcdf disabled.])
enable_pnetcdf=no
fi
# Now, set enable_parallel if either pnetcdf or parallel4 is set
if test "x$enable_pnetcdf" = xyes -o "x$enable_parallel4" = xyes; then
enable_parallel=yes
......@@ -1170,13 +1151,13 @@ if test "x$enable_pnetcdf" = xyes; then
erange_fill_pnetcdf=no
else
erange_fill_pnetcdf=`echo ${erange_fill_pnetcdf} | cut -d' ' -f3`
if test "x$coord_bound_pnetcdf" = x0; then
if test "x$erange_fill_pnetcdf" = x0; then
enable_erange_fill_pnetcdf=no
else
enable_erange_fill_pnetcdf=yes
fi
fi
AC_MSG_NOTICE([$enable_erange_fill_pnetcdf])
AC_MSG_RESULT([$enable_erange_fill_pnetcdf])
if test "$enable_erange_fill" != "$enable_erange_fill_pnetcdf"; then
if test "$enable_erange_fill_pnetcdf" = yes; then
AC_MSG_WARN([Enable erange-fill to conform with PnetCDF setting])
......@@ -1198,7 +1179,7 @@ if test "x$enable_pnetcdf" = xyes; then
relax_coord_bound_pnetcdf=yes
fi
fi
AC_MSG_NOTICE([$relax_coord_bound_pnetcdf])
AC_MSG_RESULT([$relax_coord_bound_pnetcdf])
if test "$enable_zero_length_coord_bound" != "$relax_coord_bound_pnetcdf"; then
if test "$relax_coord_bound_pnetcdf" = yes; then
AC_MSG_WARN([Enable relax-coord-bound to conform with PnetCDF setting])
......@@ -1236,33 +1217,6 @@ if test "x$enable_logging" = xyes; then
AC_DEFINE([LOGGING], 1, [If true, turn on logging.])
fi
# Like other libraries, udunits and libcf
# are no long part of the netcdf distribution.
#AC_MSG_CHECKING([whether udunits is to be built])
#AC_ARG_WITH([udunits],
# [AS_HELP_STRING([--with-udunits],
# [Build udunits2 package.])])
#test "x$with_udunits" = xyes || with_udunits=no
#AC_MSG_RESULT($with_udunits)
#AM_CONDITIONAL(BUILD_UDUNITS, [test "x$with_udunits" = xyes])
# Does the user want to also build the libcf library?
#AC_MSG_CHECKING([whether libcf is to be built])
#AC_ARG_WITH([libcf],
# [AS_HELP_STRING([--with-libcf],
# [build and install libcf library, a library for \
# handling data in conformance with the Climate and \
# Forecast conventions. (Requires netCDF-4 and HDF5)])])
#test "x$with_libcf" = xyes || with_libcf=no
#AC_MSG_RESULT($with_libcf)
#AM_CONDITIONAL(BUILD_LIBCF, [test "x$with_libcf" = xyes])
#AC_CONFIG_SUBDIRS([udunits libcf])
# Automake conditionals need to be called, whether the answer is yes
# or no.
AM_CONDITIONAL(BUILD_PARALLEL, [test x$enable_parallel = xyes])
......@@ -1272,6 +1226,7 @@ AM_CONDITIONAL(USE_DAP, [test "x$enable_dap" = xyes]) # Alias
# Provide protocol specific flags
AM_CONDITIONAL(ENABLE_DAP, [test "x$enable_dap" = xyes])
AM_CONDITIONAL(ENABLE_DAP4, [test "x$enable_dap4" = xyes])
AM_CONDITIONAL(USE_STRICT_NULL_BYTE_HEADER_PADDING, [test x$enable_strict_null_byte_header_padding = xyes])
AM_CONDITIONAL(ENABLE_CDF5, [test "x$enable_cdf5" = xyes])
AM_CONDITIONAL(ENABLE_DAP_REMOTE_TESTS, [test "x$enable_dap_remote_tests" = xyes])
AM_CONDITIONAL(ENABLE_DAP_AUTH_TESTS, [test "x$enable_dap_auth_tests" = xyes])
......@@ -1380,6 +1335,25 @@ if test "x$enable_jna" = xyes ; then
AC_DEFINE([JNA], [1], [if true, include JNA bug fix])
fi
# Control filter test/example
AC_MSG_CHECKING([whether filter testing should be run])
AC_ARG_ENABLE([filter-testing],
[AS_HELP_STRING([--disable-filter-testing],
[Do not run filter test and example; requires shared libraries and netCDF-4])])
test "x$enable_filter_testing" = xno || enable_filter_testing=yes
AC_MSG_RESULT($enable_filter_testing)
if test "x$enable_netcdf_4" = xno ; then
AC_MSG_WARN([netCDF-4 disabled => --disable-filter-testing])
enable_filter_testing = no
fi
if test "x$enable_shared" = xno ; then
AC_MSG_WARN([Shared libraries are disabled => --disable-filter-testing])
enable_filter_testing = no
fi
AM_CONDITIONAL(ENABLE_FILTER_TESTING, [test x$enable_filter_testing = xyes])
AC_SUBST(NC_LIBS,[$NC_LIBS])
AC_SUBST(HAS_DAP,[$enable_dap])
AC_SUBST(HAS_DAP2,[$enable_dap])
......@@ -1398,6 +1372,7 @@ AC_SUBST(HAS_DISKLESS,[$enable_diskless])
AC_SUBST(HAS_MMAP,[$enable_mmap])
AC_SUBST(HAS_JNA,[$enable_jna])
AC_SUBST(RELAX_COORD_BOUND,[$enable_relax_coord_bound])
AC_SUBST(ENABLE_ERANGE_FILL,[$enable_erange_fill])
# Include some specifics for netcdf on windows.
#AH_VERBATIM([_WIN32_STRICMP],
......@@ -1472,10 +1447,16 @@ cd $srcdir
abs_top_srcdir=`pwd`
cd $abs_top_builddir
# test_common.sh setup
AC_CONFIG_FILES(test_common.sh:test_common.in)
#rm -f ${abs_top_builddir}/test_common.sh
#sed -e "s|@TOPSRCDIR@|${abs_top_srcdir}|" -e "s|@TOPBUILDDIR@|${abs_top_builddir}|" <${abs_top_srcdir}/test_common.in >${abs_top_builddir}/test_common.sh
# nc_test4/findplugin.sh setup
AC_SUBST([ISCMAKE], [])
AC_SUBST([MSVC], [])
AC_CONFIG_FILES(nc_test4/findplugin.sh:nc_test4/findplugin.in)
#####
# End netcdf_meta.h definitions.
#####
......@@ -1497,6 +1478,7 @@ AC_CONFIG_FILES([Makefile
ncgen/Makefile
examples/Makefile
examples/C/Makefile
examples/C/hdf5plugins/Makefile
examples/CDL/Makefile
oc2/Makefile
libdap2/Makefile
......@@ -1509,6 +1491,7 @@ AC_CONFIG_FILES([Makefile
docs/images/Makefile
nctest/Makefile
nc_test4/Makefile
nc_test4/hdf5plugins/Makefile
nc_test/Makefile
ncdap_test/Makefile
ncdap_test/testdata3/Makefile
......
......@@ -6,8 +6,7 @@
# Put together AM_CPPFLAGS and AM_LDFLAGS.
include $(top_srcdir)/lib_flags.am
#LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver-verbose
#TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver-verbose
TEST_EXTENSIONS = .sh
LDADD = ${top_builddir}/liblib/libnetcdf.la
AM_CPPFLAGS += -I$(top_srcdir)/libdap4
......@@ -25,14 +24,19 @@ test_parse_SOURCES = test_parse.c test_common.h
test_meta_SOURCES = test_meta.c test_common.h
test_data_SOURCES = test_data.c test_common.h
TESTS += test_parse.sh
TESTS += test_meta.sh
TESTS += test_data.sh
if BUILD_UTILITIES
# These rely on ncdump
TESTS += test_raw.sh
TESTS += test_meta.sh
TESTS += test_data.sh
endif
# Note which tests depend on other tests. Necessary for make -j check.
test_raw.log: test_parse.log
test_meta.log: test_raw.log
test_data.log: test_meta.log
if ENABLE_DAP_REMOTE_TESTS
# Note: This program name was changed to findtestserver4
# to avoid cmake complaint about duplicate targets.
......@@ -54,6 +58,8 @@ EXTRA_DIST = test_parse.sh test_meta.sh test_data.sh \
baseline baselineraw baselineremote CMakeLists.txt
CLEANFILES = *.exe
# This should only be left behind if using parallel io
CLEANFILES += tmp_*
# One last thing
BUILT_SOURCES = .daprc
......
......@@ -101,23 +101,21 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
@USE_DAP_TRUE@am__append_1 = -I${top_srcdir}/oc2
# This turns on declspec magic in netcdf.h for windows DLLs.
@BUILD_DLL_TRUE@am__append_2 = -DDLL_NETCDF
check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2)
# WARNING: these are unit tests, so they will not
# appear in CMakeLists.txt
@ENABLE_DAP4_TRUE@am__append_3 = test_parse test_meta test_data
@ENABLE_DAP4_TRUE@am__append_4 = test_parse.sh test_meta.sh \
@ENABLE_DAP4_TRUE@ test_data.sh
@ENABLE_DAP4_TRUE@am__append_2 = test_parse test_meta test_data
@ENABLE_DAP4_TRUE@am__append_3 = test_parse.sh
# These rely on ncdump
@BUILD_UTILITIES_TRUE@@ENABLE_DAP4_TRUE@am__append_5 = test_raw.sh
@BUILD_UTILITIES_TRUE@@ENABLE_DAP4_TRUE@am__append_4 = test_raw.sh \
@BUILD_UTILITIES_TRUE@@ENABLE_DAP4_TRUE@ test_meta.sh \
@BUILD_UTILITIES_TRUE@@ENABLE_DAP4_TRUE@ test_data.sh
# Note: This program name was changed to findtestserver4
# to avoid cmake complaint about duplicate targets.
@ENABLE_DAP4_TRUE@@ENABLE_DAP_REMOTE_TESTS_TRUE@am__append_6 = findtestserver4
@ENABLE_DAP4_TRUE@@ENABLE_DAP_REMOTE_TESTS_TRUE@am__append_5 = findtestserver4
subdir = dap4_test
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
......@@ -406,9 +404,11 @@ am__set_TESTS_bases = \
RECHECK_LOGS = $(TEST_LOGS)
AM_RECURSIVE_TARGETS = check recheck
TEST_SUITE_LOG = test-suite.log
TEST_EXTENSIONS = @EXEEXT@ .test
LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
am__test_logs1 = $(TESTS:=.log)
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
TEST_LOGS = $(am__test_logs2:.sh.log=.log)
SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
SH_LOG_COMPILE = $(SH_LOG_COMPILER) $(AM_SH_LOG_FLAGS) $(SH_LOG_FLAGS)
am__set_b = \
case '$@' in \
*/*) \
......@@ -419,12 +419,6 @@ am__set_b = \
*) \
b='$*';; \
esac
am__test_logs1 = $(TESTS:=.log)
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
TEST_LOGS = $(am__test_logs2:.test.log=.log)
TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
$(TEST_LOG_FLAGS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \
$(top_srcdir)/lib_flags.am $(top_srcdir)/test-driver
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
......@@ -432,12 +426,11 @@ ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
AMTAR = @AMTAR@
AM_CFLAGS = @AM_CFLAGS@
AM_CPPFLAGS = -I$(top_srcdir)/include $(am__append_1) $(am__append_2) \
AM_CPPFLAGS = -I$(top_srcdir)/include $(am__append_1) \
-I$(top_srcdir)/libdap4
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_LDFLAGS =
AR = @AR@
AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
......@@ -460,12 +453,14 @@ DOXYGEN = @DOXYGEN@
DOXYGEN_CSS_FILE = @DOXYGEN_CSS_FILE@
DOXYGEN_HEADER_FILE = @DOXYGEN_HEADER_FILE@
DOXYGEN_SEARCHENGINE = @DOXYGEN_SEARCHENGINE@
DOXYGEN_SERVER_BASED_SEARCH = @DOXYGEN_SERVER_BASED_SEARCH@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ENABLE_ERANGE_FILL = @ENABLE_ERANGE_FILL@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
......@@ -491,6 +486,7 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
ISCMAKE = @ISCMAKE@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
......@@ -505,6 +501,7 @@ MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
MSVC = @MSVC@
NC_ENABLE_DOXYGEN_PDF_OUTPUT = @NC_ENABLE_DOXYGEN_PDF_OUTPUT@
NC_HAS_CDF5 = @NC_HAS_CDF5@
NC_HAS_DAP2 = @NC_HAS_DAP2@
......@@ -608,14 +605,12 @@ target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_TESTS_ENVIRONMENT = export DTOPSRCDIR=${abs_top_srcdir}; export DTOPBUILDDIR=${abs_top_builddir};
AM_TESTS_ENVIRONMENT = export TOPSRCDIR=${abs_top_srcdir}; export TOPBUILDDIR=${abs_top_builddir};
# Put together AM_CPPFLAGS and AM_LDFLAGS.
#LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver-verbose
#TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver-verbose
TEST_EXTENSIONS = .sh
LDADD = ${top_builddir}/liblib/libnetcdf.la
TESTS = $(am__append_4) $(am__append_5)
TESTS = $(am__append_3) $(am__append_4)
@ENABLE_DAP4_TRUE@test_parse_SOURCES = test_parse.c test_common.h
@ENABLE_DAP4_TRUE@test_meta_SOURCES = test_meta.c test_common.h
@ENABLE_DAP4_TRUE@test_data_SOURCES = test_data.c test_common.h
......@@ -627,7 +622,8 @@ EXTRA_DIST = test_parse.sh test_meta.sh test_data.sh \
daptestfiles dmrtestfiles cdltestfiles nctestfiles \
baseline baselineraw baselineremote CMakeLists.txt
CLEANFILES = *.exe
# This should only be left behind if using parallel io
CLEANFILES = *.exe tmp_*
# One last thing
BUILT_SOURCES = .daprc
......@@ -635,7 +631,7 @@ all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
.SUFFIXES: .c .lo .log .o .obj .sh .sh$(EXEEXT) .trs
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/lib_flags.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
......@@ -926,47 +922,19 @@ recheck: all $(check_PROGRAMS)
am__force_recheck=am--force-recheck \
TEST_LOGS="$$log_list"; \
exit $$?
test_parse.sh.log: test_parse.sh
@p='test_parse.sh'; \
b='test_parse.sh'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
test_meta.sh.log: test_meta.sh
@p='test_meta.sh'; \
b='test_meta.sh'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
test_data.sh.log: test_data.sh
@p='test_data.sh'; \
b='test_data.sh'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
test_raw.sh.log: test_raw.sh
@p='test_raw.sh'; \
b='test_raw.sh'; \
$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
.test.log:
.sh.log:
@p='$<'; \
$(am__set_b); \
$(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
$(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
$(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
@am__EXEEXT_TRUE@.test$(EXEEXT).log:
@am__EXEEXT_TRUE@.sh$(EXEEXT).log:
@am__EXEEXT_TRUE@ @p='$<'; \
@am__EXEEXT_TRUE@ $(am__set_b); \
@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
@am__EXEEXT_TRUE@ $(am__check_pre) $(SH_LOG_DRIVER) --test-name "$$f" \
@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_SH_LOG_DRIVER_FLAGS) $(SH_LOG_DRIVER_FLAGS) -- $(SH_LOG_COMPILE) \
@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
distdir: $(DISTFILES)
......@@ -1131,6 +1099,11 @@ uninstall-am:
.PRECIOUS: Makefile
# Note which tests depend on other tests. Necessary for make -j check.
@ENABLE_DAP4_TRUE@test_raw.log: test_parse.log
@ENABLE_DAP4_TRUE@test_meta.log: test_raw.log
@ENABLE_DAP4_TRUE@test_data.log: test_meta.log
@BUILD_UTILITIES_TRUE@@ENABLE_DAP4_TRUE@@ENABLE_DAP_REMOTE_TESTS_TRUE@ # relies on ncdump
@BUILD_UTILITIES_TRUE@@ENABLE_DAP4_TRUE@@ENABLE_DAP_REMOTE_TESTS_TRUE@ # Disabled until the testserver is stable
......
......@@ -47,6 +47,8 @@ main(int argc, char** argv)
if((ret=nc_close(ncid))) goto done;
done:
#ifdef DEBUG
fprintf(stderr,"code=%d %s\n",ret,nc_strerror(ret));
#endif
return (ret ? 1 : 0);
}
......@@ -11,20 +11,21 @@ cd ${DAPTESTFILES}
F=`ls -1 *.dap | sed -e 's/[.]dap//g' | tr '\r\n' ' '`
cd $WD
mkdir ./results_test_data
if test "x${RESET}" = x1 ; then rm -fr ${BASELINE}/*.d4d ; fi
for f in $F ; do
echo "testing: ${f}"
if ! ${VG} ${execdir}/test_data ${DAPTESTFILES}/${f} ./results/${f}.nc ; then
failure "${execdir}/test_data ${DAPTESTFILES}/${f} ./results/${f}.nc"
if ! ${VG} ${execdir}/test_data ${DAPTESTFILES}/${f} ./results_test_data/${f}.nc ; then
failure "${execdir}/test_data ${DAPTESTFILES}/${f} ./results_test_data/${f}.nc"
fi
${NCDUMP} ./results/${f}.nc > ./results/${f}.d4d
${NCDUMP} ./results_test_data/${f}.nc > ./results_test_data/${f}.d4d
if test "x${TEST}" = x1 ; then
if ! diff -wBb ${BASELINE}/${f}.d4d ./results/${f}.d4d ; then
failure "diff -wBb ${BASELINE}/${f}.d4d ./results/${f}.d4d"
if ! diff -wBb ${BASELINE}/${f}.d4d ./results_test_data/${f}.d4d ; then
failure "diff -wBb ${BASELINE}/${f}.d4d ./results_test_data/${f}.d4d"
fi
elif test "x${RESET}" = x1 ; then
echo "${f}:"
cp ./results/${f}.d4d ${BASELINE}/${f}.d4d
cp ./results_test_data/${f}.d4d ${BASELINE}/${f}.d4d
fi
done
......@@ -75,10 +76,10 @@ if test "x${CDLDIFF}" = x1 ; then
echo "Not found: ${CDLTESTFILES}/${STEM}.cdl"
continue
fi
echo "diff -wBb ${CDLTESTFILES}/${STEM}.cdl ./results/${f}.d4d"
echo "diff -wBb ${CDLTESTFILES}/${STEM}.cdl ./results_test_data/${f}.d4d"
rm -f ./b1 ./b2 ./r1 ./r2
trim ${CDLTESTFILES}/${STEM}.cdl ./b1
trim ./results/${f}.d4d ./r1
trim ./results_test_data/${f}.d4d ./r1
baseclean b1 b2
resultclean r1 r2
if ! diff -wBb ./b2 ./r2 ; then
......@@ -86,6 +87,7 @@ if test "x${CDLDIFF}" = x1 ; then
fi
done
fi
rm -rf ./results_test_data
finish
......
......@@ -23,35 +23,36 @@ done
if test "x${RESET}" = x1 ; then rm -fr ${BASELINE}/*.d4m ; fi
mkdir ./results_test_meta
for f in ${F} ; do
echo "checking: $f"
if ! ${VG} ${execdir}/test_meta ${DMRTESTFILES}/${f}.dmr ./results/${f} ; then
failure "${execdir}/test_meta ${DMRTESTFILES}/${f}.dmr ./results/${f}"
if ! ${VG} ${execdir}/test_meta ${DMRTESTFILES}/${f}.dmr ./results_test_meta/${f} ; then
failure "${execdir}/test_meta ${DMRTESTFILES}/${f}.dmr ./results_test_meta/${f}"
fi
${NCDUMP} -h ./results/${f} > ./results/${f}.d4m
${NCDUMP} -h ./results_test_meta/${f} > ./results_test_meta/${f}.d4m
if test "x${TEST}" = x1 ; then
if ! diff -wBb ${BASELINE}/${f}.d4m ./results/${f}.d4m ; then
failure "diff -wBb ${BASELINE}/${f}.ncdump ./results/${f}.d4m"
if ! diff -wBb ${BASELINE}/${f}.d4m ./results_test_meta/${f}.d4m ; then
failure "diff -wBb ${BASELINE}/${f}.ncdump ./results_test_meta/${f}.d4m"
fi
elif test "x${RESET}" = x1 ; then
echo "${f}:"
cp ./results/${f}.d4m ${BASELINE}/${f}.d4m
cp ./results_test_meta/${f}.d4m ${BASELINE}/${f}.d4m
fi
done
if test "x${CDLDIFF}" = x1 ; then
for f in $CDL ; do
echo "diff -wBb ${CDLTESTFILES}/${f}.cdl ./results/${f}.d4m"
echo "diff -wBb ${CDLTESTFILES}/${f}.cdl ./results_test_meta/${f}.d4m"
rm -f ./tmp
cat ${CDLTESTFILES}/${f}.cdl \
cat >./tmp
echo diff -wBbu ./tmp ./results/${f}.d4m
if ! diff -wBbu ./tmp ./results/${f}.d4m ; then
echo diff -wBbu ./tmp ./results_test_meta/${f}.d4m
if ! diff -wBbu ./tmp ./results_test_meta/${f}.d4m ; then
failure "${f}"
fi
done
fi
rm -rf ./results_test_meta
finish
......@@ -11,20 +11,21 @@ cd ${DMRTESTFILES}
F=`ls -1 *.dmr | sed -e 's/[.]dmr//' |tr '\r\n' ' '`
cd $WD
mkdir ./results_test_parse
if test "x${RESET}" = x1 ; then rm -fr ${BASELINE}/*.d4p ; fi
for f in $F ; do
echo "testing: $f"
if ! ${VG} ${execdir}/test_parse ${DMRTESTFILES}/${f}.dmr > ./results/${f}.d4p ; then
if ! ${VG} ${execdir}/test_parse ${DMRTESTFILES}/${f}.dmr > ./results_test_parse/${f}.d4p ; then
failure "${f}"
fi
if test "x${TEST}" = x1 ; then
if ! diff -wBb ${BASELINE}/${f}.d4p ./results/${f}.d4p ; then
if ! diff -wBb ${BASELINE}/${f}.d4p ./results_test_parse/${f}.d4p ; then
failure "${f}"
fi
elif test "x${DIFF}" = x1 ; then
echo "diff -wBb ${DMRTESTFILES}/${f}.dmr ./results/${f}.d4p"
echo "diff -wBb ${DMRTESTFILES}/${f}.dmr ./results_test_parse/${f}.d4p"
rm -f ./tmp
cat ./results/${f}.d4p \
cat ./results_test_parse/${f}.d4p \
| sed -e '/<Dimensions>/d' -e '/<Types>'/d -e '/<Variables>'/d -e '/<Groups>'/d \
| sed -e '/<\/Dimensions>/d' -e '/<\/Types>'/d -e '/<\/Variables>'/d -e '/<\/Groups>'/d \
| sed -e '/_edu.ucar.opaque.size/,+2d' \
......@@ -34,9 +35,10 @@ for f in $F ; do
fi
elif test "x${RESET}" = x1 ; then
echo "${f}:"
cp ./results/${f}.d4p ${BASELINE}/${f}.d4p
cp ./results_test_parse/${f}.d4p ${BASELINE}/${f}.d4p
fi
done
rm -rf ./results_test_parse
finish
......
......@@ -40,20 +40,21 @@ resultclean() {
fi
}
mkdir ./results_test_raw
if test "x${RESET}" = x1 ; then rm -fr ${BASELINERAW}/*.dmp ; fi
for f in $F ; do
echo "testing: $f"
URL="[dap4]file://${DAPTESTFILES}/${f}"
if ! ${VG} ${NCDUMP} "${URL}" > ./results/${f}.dmp; then
if ! ${VG} ${NCDUMP} "${URL}" > ./results_test_raw/${f}.dmp; then
failure "${URL}"
fi
if test "x${TEST}" = x1 ; then
if ! diff -wBb ${BASELINERAW}/${f}.dmp ./results/${f}.dmp ; then
if ! diff -wBb ${BASELINERAW}/${f}.dmp ./results_test_raw/${f}.dmp ; then
failure "diff ${f}.dmp"
fi
elif test "x${RESET}" = x1 ; then
echo "${f}:"
cp ./results/${f}.dmp ${BASELINERAW}/${f}.dmp
cp ./results_test_raw/${f}.dmp ${BASELINERAW}/${f}.dmp
elif test "x${DIFF}" = x1 ; then
echo "hdrtest: ${f}"
rm -f ./tr1 ./tr2 ./tb1 ./tb2
......@@ -63,6 +64,7 @@ for f in $F ; do
fi
fi
done
rm -rf ./results_test_raw
finish
......@@ -5,8 +5,6 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi
. ${srcdir}/d4test_common.sh
set -x
# Compute the set of testfiles
PUSHD ${srcdir}/daptestfiles
F=`ls -1d *.dap`
......