netcdf-c/nczarr_test/run_ncgen4.sh
Dennis Heimbigner d2316f866c Additional Fixes to NCZarr
Primary Fixes:
* Add a whole variable optimization -- used in the rare case that nc_get/put_vara covers the whole of a variable and the variable has a single chunk.
* Fix chunking error when stride causes whole chunks to be skipped.
* Fix some memory leaks
* Add test cases
* Add one performance test to nczarr_test/. This uses the timer utils from unit_test: timer_utils.[ch].
* Move ncdumpchunks utility from ncdump to nczarr_test

Misc. Other Changes:
* Make check for aws libraries conditional on --enable-nczarr-s3
* Remove all but one bm tests from nczarr_test until they are working.
* Remove another dependency on HDF5 from supposedly non-HDF5 specific code; specifically hdf5_log_hdf5.
* Make the BAIL2 macro be hdf5 specific and replace elsewhere with an HDF5 independent equivalent.
* Move hdf5cache.c to libsrc4/nc4cache.c because it is used by nczarr.
* Modify unit_tests so that some of them are run even if using Windows.
* Misc. small bug fixes and refactors and memory leaks.
* Rename some conflicting tests for cmake.
* Attempted to make nc_perf work with cmake and failed.
2020-12-16 20:48:02 -07:00

64 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
# Tests for ncgen4 using list of test cdl files from the cdl4
# directory, and comparing output to expected results in the expected4
# directory. Note that these tests are run for classic files in
# tst_ncgen4_classic.sh
# Dennis Heimbigner
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
. ../test_common.sh
. "$srcdir/test_nczarr.sh"
set -e
#SHOWXFAILS=1
# To add a new test,
# 1. put the .cdl file in the 'ncdump/cdl' directory
# 2. put the result of running ncgen then ncdump
# into the directory 'expected' as .dmp
# 3. Add the test to the end of the TESTS variable
# 4. Add the new files into ncdump/cdl/Makefile.am
# and ncdump/expected/Makefile.am
TESTS="\
dimscope \
tst_group_data \
tst_solar_1 \
tst_nans \
tst_nul4 \
"
HEADTESTS=""
SPECTESTS=""
XFAILTESTS=""
# Location constants
cdl="$srcdir/../ncdump/cdl"
expected="$srcdir/../ncdump/expected"
RESULTSDIR="./results"
# Functions
runtestset() {
extfor $1
echo "*** Testing nczarr X ncgen with zmap=${zext}"
rm -fr ${RESULTSDIR}.$zext
mkdir ${RESULTSDIR}.${zext}
cd ${RESULTSDIR}.${zext}
difftest
cd ..
echo "*** PASSED: zext=${zext}"
}
runtestset nzf
if test "x$FEATURE_HDF5" = xyes ; then runtestset nz4; fi
if test "x$FEATURE_S3TESTS" = xyes ; then runtestset s3; fi
rm -rf ${RESULTSDIR}.nzf ${RESULTSDIR}.nz4 ${RESULTSDIR}.s3
echo "*** PASSED ***"