netcdf-c/dap4_test/test_hyrax.sh
Dennis Heimbigner 73caeb674d Cleanup the CMake inter-test dependencies
The ncdump test set has a number of inter-test dependencies
that are not properly established in ncdump/CMakeLists.txt.

So this PR attempts to:
1. reorder the tests
2. change tests in CMakeLists.txt from build_bin_test_no_prefix to add_bin_test_no_prefix so they get executed

Plus a couple of minor bug fixes.
1. Change ENABLE_NC4 => ENABLE_HDF5 in github action.
2. fix a memory error in findtestserver.c.in
3. fix bug in ncdap_tests/tst_urls.sh
4. fix netcdf file name bug in tst_netcdf4_4.sh
2021-12-20 15:13:08 -07:00

57 lines
1.3 KiB
Bash
Executable File

#!/bin/sh
if test "x$srcdir" = "x"; then srcdir=`dirname $0`; fi
export srcdir;
. ../test_common.sh
. ${srcdir}/d4test_common.sh
set -e
echo "test_hyrax.sh:"
FRAG="#checksummode=ignore"
F="\
nc4_test_files/nc4_nc_classic_comp.nc \
nc4_test_files/nc4_unsigned_types_comp.nc \
nc4_test_files/nc4_strings_comp.nc \
nc4_test_files/ref_tst_compounds.nc \
hyrax/RSS/amsre/bmaps_v05/y2006/m01/amsre_20060131v5.dat?dap4.ce=time_a \
"
failure() {
echo "*** Fail: $1"
exit 1
}
setresultdir results_test_hyrax
TESTSERVER=`${execdir}/findtestserver4 dap4 opendap test.opendap.org`
if test "x$TESTSERVER" = x ; then
echo "***XFAIL: Cannot find test.opendap.org testserver; test skipped"
exit 0
fi
if test "x${RESET}" = x1 ; then rm -fr ${BASELINEH}/*.hyrax ; fi
for f in $F ; do
makeurl "dap4://test.opendap.org/opendap" "$f"
echo "testing: $URL"
if ! ${NCDUMP} "${URL}" > ./results_test_hyrax/${base}.hyrax; then
failure "${URL}"
fi
if test "x${TEST}" = x1 ; then
if ! diff -wBb ${BASELINEH}/${base}.hyrax ./results_test_hyrax/${base}.hyrax ; then
failure "diff ${base}.hyrax"
fi
elif test "x${RESET}" = x1 ; then
echo "${f}:"
cp ./results_test_hyrax/${base}.hyrax ${BASELINEH}/${base}.hyrax
fi
done
echo "*** Pass"
exit 0