netcdf-c/dap4_test/Makefile.am
Dennis Heimbigner 8072d1f6bb Modify DAP2 and DAP4 to optionally allow Fillvalue/Variable mismatch
re: issue https://github.com/Unidata/netcdf-c/issues/1151

Modify DAP2 and DAP4 code to handle case when _FillValue type is not
same as the parent variable type.

Specifically:
1. Define a parameter [fillmismatch] to allow this mismatch;
   default is to disallow.
2. If allowed, forcibly change the type of the _FillValue to match
   the parent variable.
3. If allowed Convert the values to match new type
4. Generate a log message
5. if not allowed, then fail

Implementing this required some changes to ncdap_test/dapcvt.c
Also added test cases.

Minor Unrelated Changes:
1. There were a number of warnings about e.g.
   assigning a const char* to a char*. Fix these
2. In nccopy.1, replace .NP with .IP "n"
   (re PR https://github.com/Unidata/netcdf-c/pull/1144)
3. fix minor error in ncdump/ocprint
2018-10-01 15:51:43 -06:00

92 lines
2.4 KiB
Makefile

## This is a automake file, part of Unidata's netCDF package.
# Copyright 2011, see the COPYRIGHT file for more information.
# This file builds and runs DAP4 tests.
# Put together AM_CPPFLAGS and AM_LDFLAGS.
include $(top_srcdir)/lib_flags.am
#TEST_EXTENSIONS = .sh
#SH_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver-verbose
#sh_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver-verbose
#LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver-verbose
#TESTS_ENVIRONMENT = export SETX=1;
LDADD = ${top_builddir}/liblib/libnetcdf.la
AM_CPPFLAGS += -I$(top_srcdir)/libdap4
# Set up the tests; do the .sh first, then .c
check_PROGRAMS =
TESTS =
if ENABLE_DAP4
# WARNING: these are unit tests, so they will not
# appear in CMakeLists.txt
check_PROGRAMS += test_parse test_meta test_data
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
if BUILD_UTILITIES
# These rely on ncdump
TESTS += test_raw.sh
TESTS += test_meta.sh
TESTS += test_data.sh
TESTS += test_fillmismatch.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.
check_PROGRAMS += findtestserver4
findtestserver4_SOURCES = findtestserver4.c
if BUILD_UTILITIES
# relies on ncdump
TESTS += test_remote.sh
endif
endif
endif #ENABLE_DAP4
EXTRA_DIST = test_parse.sh test_meta.sh test_data.sh \
test_raw.sh test_remote.sh test_hyrax.sh test_fillmismatch.sh \
tst_curlopt.sh d4test_common.sh \
daptestfiles dmrtestfiles cdltestfiles nctestfiles misctestfiles \
baseline baselineraw baselineremote CMakeLists.txt
CLEANFILES = *.exe
# This should only be left behind if using parallel io
CLEANFILES += tmp_*
DISTCLEANFILES = findtestserver4.c
# One last thing
BUILT_SOURCES = .daprc
.daprc:
echo "#DAPRC" >.daprc
clean-local: clean-local-check
.PHONY: clean-local-check
clean-local-check:
-rm -rf results
-rm -f .dodsrc .daprc
# The shell file maketests.sh is used to build the testdata
# for dap4 testing. It creates and fills the directories
# daptestfiles, dmrtestfiles, and cdltestfiles
# As a rule, this will only be invoked if there was a change
# in the GenerateRaw.java program in the thredds tree.
maketests::
bash ./maketests.sh