Skip to content

Commit 6d88091

Browse files
Fix pull request Unidata#374 (dap4.dmh)
1. When running under windows (as opposed to cygwin) we need to make sure to not user /cygdrive/ file paths. This was ocurring in libdap4/d4read.c, but may occur elsewhere. 2. Shell scripts in the git repo are not being checked-out with the executable mode set. Had core.filemode set to false. Was a major hassle to fix.
1 parent f73efea commit 6d88091

File tree

116 files changed

+458
-100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+458
-100
lines changed

CMakeLists.txt

+4-8
Original file line numberDiff line numberDiff line change
@@ -753,15 +753,11 @@ ENDIF(USE_HDF5 OR ENABLE_NETCDF_4)
753753

754754
# Option to Build DAP2+DAP4 Clients
755755
OPTION(ENABLE_DAP "Enable DAP2 and DAP4 Client." ON)
756-
OPTION(ENABLE_DAP4 "Enable DAP4 Client." OFF) # Temporary
757756
IF(ENABLE_DAP)
758757
SET(USE_DAP ON)
759758
SET(ENABLE_DAP2 ON)
760-
IF(ENABLE_NETCDF_4)
761-
IF(ENABLE_DAP4)
762-
SET(ENABLE_DAP4 ON)
763-
ENDIF()
764-
ELSE()
759+
SET(ENABLE_DAP4 ON)
760+
IF(NOT ENABLE_NETCDF_4)
765761
SET(ENABLE_DAP4 OFF)
766762
ENDIF()
767763
FIND_PACKAGE(CURL)
@@ -1201,8 +1197,8 @@ CHECK_SYMBOL_EXISTS(vprintf "stdio.h" HAVE_VPRINTF)
12011197
SET(HAVE_ST_BLKSIZE ${HAVE_STRUCT_STAT_ST_BLKSIZE})
12021198

12031199
# Type checks
1204-
CHECK_TYPE_SIZE("void*" SIZEOF_VOIDSTAR)
1205-
# Alias for automake consistency
1200+
# Aliases for automake consistency
1201+
SET(SIZEOF_VOIDSTAR ${CMAKE_SIZEOF_VOID_P})
12061202
SET(SIZEOF_VOIDP ${SIZEOF_VOIDSTAR})
12071203
CHECK_TYPE_SIZE("char" SIZEOF_CHAR)
12081204
CHECK_TYPE_SIZE("double" SIZEOF_DOUBLE)

RELEASE_NOTES.md

100755100644
File mode changed.

cf.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ FLAGS="$FLAGS -DCMAKE_INSTALL_PREFIX=d:/ignore"
1818

1919
if test "x$DAP" = x ; then
2020
FLAGS="$FLAGS -DENABLE_DAP=false"
21+
else
22+
FLAGS="$FLAGS -DENABLE_DAP=true"
2123
fi
2224
if test "x$NC4" = x ; then
2325
FLAGS="$FLAGS -DENABLE_NETCDF_4=false"
@@ -26,7 +28,6 @@ FLAGS="$FLAGS -DENABLE_CONVERSION_WARNINGS=false"
2628
FLAGS="$FLAGS -DENABLE_DAP_REMOTE_TESTS=true"
2729
FLAGS="$FLAGS -DENABLE_TESTS=true"
2830
FLAGS="$FLAGS -DENABLE_EXAMPLES=false"
29-
#FLAGS="$FLAGS -DENABLE_DAP4=true"
3031
#FLAGS="$FLAGS -DENABLE_HDF4=true"
3132

3233
rm -fr build

config.h.cmake.in

+3
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,9 @@ are set when opening a binary file on Windows. */
498498
/* The size of `ushort', as computed by sizeof. */
499499
#cmakedefine SIZEOF_USHORT ${SIZEOF_USHORT}
500500

501+
/* The size of `void*', as computed by sizeof. */
502+
#cmakedefine SIZEOF_VOIDP ${SIZEOF_VOIDP}
503+
501504
/* If using the C implementation of alloca, define if you know the
502505
direction of stack growth for your system; otherwise it will be
503506
automatically deduced at runtime.

configure.ac

+2
Original file line numberDiff line numberDiff line change
@@ -863,9 +863,11 @@ AC_C_BIGENDIAN
863863
SLEEPCMD=""
864864
PLTFORMOUT="$(uname | cut -d '_' -f 1)"
865865
if test "$PLTFORMOUT" = "CYGWIN"; then
866+
ISCYGWIN=yes
866867
SLEEPCMD="sleep 5"
867868
AC_MSG_NOTICE([Pausing between sizeof() checks to mitigate a Cygwin issue.])
868869
fi
870+
AM_CONDITIONAL(ISCYGWIN, [test "x$ISCYGWIN" = xyes])
869871

870872
$SLEEPCMD
871873
AC_CHECK_SIZEOF(short)

dap4_test/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ IF(ENABLE_TESTS)
2424
BUILD_BIN_TEST(findtestserver4)
2525

2626
IF(BUILD_UTILITIES)
27-
add_sh_test(dap4_test test_remote)
27+
# disable for now add_sh_test(dap4_test test_remote)
2828
ENDIF(BUILD_UTILITIES)
2929
ENDIF(ENABLE_DAP_REMOTE_TESTS)
3030
ENDIF(ENABLE_TESTS)

dap4_test/d4test_common.sh

100644100755
File mode changed.

dap4_test/maketests.sh

100644100755
File mode changed.

dap4_test/test_data.sh

100644100755
+1
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,4 @@ fi
8787

8888
finish
8989

90+

dap4_test/test_hyrax.sh

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if test "x${RESET}" = x1 ; then rm -fr ${BASELINEH}/*.dmp ; fi
2929
for f in $F ; do
3030
URL="dap4://test.opendap.org:8080/opendap/nc4_test_files/${f}${FRAG}"
3131
echo "testing: $URL"
32-
if ! ../ncdump/ncdump ${URL} > ./results/${f}.hyrax; then
32+
if ! ${NCDUMP} "${URL}" > ./results/${f}.hyrax; then
3333
failure "${URL}"
3434
fi
3535
if test "x${TEST}" = x1 ; then
@@ -44,3 +44,4 @@ done
4444

4545
echo "*** Pass"
4646
exit 0
47+

dap4_test/test_meta.sh

100644100755
+1
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ fi
5252

5353
finish
5454

55+

dap4_test/test_parse.sh

100644100755
+1
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ finish
4040

4141
exit 0
4242

43+

dap4_test/test_raw.sh

100644100755
+4-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ if test "x$srcdir" = x ; then srcdir=`pwd`; fi
55

66
. ${srcdir}/d4test_common.sh
77

8+
set -x
9+
810
# Compute the set of testfiles
911
PUSHD ${srcdir}/daptestfiles
1012
F=`ls -1d *.dap`
@@ -42,7 +44,7 @@ if test "x${RESET}" = x1 ; then rm -fr ${BASELINERAW}/*.dmp ; fi
4244
for f in $F ; do
4345
echo "testing: $f"
4446
URL="[dap4]file:${DAPTESTFILES}/${f}"
45-
if ! ${VG} ${NCDUMP} ${URL} > ./results/${f}.dmp; then
47+
if ! ${VG} ${NCDUMP} "${URL}" > ./results/${f}.dmp; then
4648
failure "${URL}"
4749
fi
4850
if test "x${TEST}" = x1 ; then
@@ -63,3 +65,4 @@ for f in $F ; do
6365
done
6466

6567
finish
68+

dap4_test/test_remote.sh

100644100755
+2-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ for f in $F ; do
6767
if test "x$NOCSUM" = x1; then
6868
URL="[ucar.checksummode=none]${URL}"
6969
fi
70-
if ! ${VG} ${NCDUMP} ${URL} > ./results/${f}.dmp; then
70+
if ! ${VG} ${NCDUMP} "${URL}" > ./results/${f}.dmp; then
7171
failure "${URL}"
7272
fi
7373
if test "x${TEST}" = x1 ; then
@@ -81,3 +81,4 @@ for f in $F ; do
8181
done
8282

8383
finish
84+

dap4_test/test_test.sh

100644100755
File mode changed.

dap4_test/tst_data.sh

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#!/bin/sh
2+
3+
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
4+
. ../test_common.sh
5+
6+
. ${srcdir}/d4test_common.sh
7+
8+
cd ${DAPTESTFILES}
9+
F=`ls -1 *.dap | sed -e 's/[.]dap//g' | tr '\r\n' ' '`
10+
cd $WD
11+
12+
if test "x${RESET}" = x1 ; then rm -fr ${BASELINE}/*.d4d ; fi
13+
for f in $F ; do
14+
echo "testing: ${f}"
15+
if ! ${VG} ${execdir}/test_data ${DAPTESTFILES}/${f} ./results/${f}.nc ; then
16+
failure "${execdir}/test_data ${DAPTESTFILES}/${f} ./results/${f}.nc"
17+
fi
18+
${NCDUMP} ./results/${f}.nc > ./results/${f}.d4d
19+
if test "x${TEST}" = x1 ; then
20+
if ! diff -wBb ${BASELINE}/${f}.d4d ./results/${f}.d4d ; then
21+
failure "diff -wBb ${BASELINE}/${f}.d4d ./results/${f}.d4d"
22+
fi
23+
elif test "x${RESET}" = x1 ; then
24+
echo "${f}:"
25+
cp ./results/${f}.d4d ${BASELINE}/${f}.d4d
26+
fi
27+
done
28+
29+
# Remove empty lines and trim lines in a cdl file
30+
trim() {
31+
if test $# != 2 ; then
32+
echo "simplify: too few args"
33+
else
34+
rm -f $2
35+
while read -r iline; do
36+
oline=`echo $iline | sed -e 's/^[\t ]*\([^\t ]*\)[\t ]*$/\\1/'`
37+
if test "x$oline" = x ; then continue ; fi
38+
echo "$oline" >> $2
39+
done < $1
40+
fi
41+
}
42+
43+
# Do cleanup on the baseline file
44+
baseclean() {
45+
if test $# != 2 ; then
46+
echo "simplify: too few args"
47+
else
48+
rm -f $2
49+
while read -r iline; do
50+
oline=`echo $iline | tr "'" '"'`
51+
echo "$oline" >> $2
52+
done < $1
53+
fi
54+
}
55+
56+
# Do cleanup on the result file
57+
resultclean() {
58+
if test $# != 2 ; then
59+
echo "simplify: too few args"
60+
else
61+
rm -f $2
62+
while read -r iline; do
63+
oline=`echo $iline | sed -e 's|^\(netcdf.*\)[.]nc\(.*\)$|\\1\\2|'`
64+
echo "$oline" >> $2
65+
done < $1
66+
fi
67+
}
68+
69+
if test "x${CDLDIFF}" = x1 ; then
70+
for f in $F ; do
71+
STEM=`echo $f | cut -d. -f 1`
72+
if ! test -e ${CDLTESTFILES}/${STEM}.cdl ; then
73+
echo "Not found: ${CDLTESTFILES}/${STEM}.cdl"
74+
continue
75+
fi
76+
echo "diff -wBb ${CDLTESTFILES}/${STEM}.cdl ./results/${f}.d4d"
77+
rm -f ./b1 ./b2 ./r1 ./r2
78+
trim ${CDLTESTFILES}/${STEM}.cdl ./b1
79+
trim ./results/${f}.d4d ./r1
80+
baseclean b1 b2
81+
resultclean r1 r2
82+
if ! diff -wBb ./b2 ./r2 ; then
83+
failure "${f}"
84+
fi
85+
done
86+
fi
87+
88+
finish
89+

dap4_test/tst_meta.sh

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#!/bin/sh
2+
3+
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
4+
. ../test_common.sh
5+
6+
. ${srcdir}/d4test_common.sh
7+
8+
cd ${DMRTESTFILES}
9+
F=`ls -1 *.dmr | sed -e 's/[.]dmr//g' | tr '\r\n' ' '`
10+
cd $WD
11+
12+
CDL=
13+
for f in ${F} ; do
14+
STEM=`echo $f | cut -d. -f 1`
15+
if test -e ${CDLTESTFILES}/${STEM}.cdl ; then
16+
CDL="${CDL} ${STEM}"
17+
else
18+
echo "Not found: ${CDLTESTFILES}/${STEM}.cdl"
19+
fi
20+
done
21+
22+
if test "x${RESET}" = x1 ; then rm -fr ${BASELINE}/*.d4m ; fi
23+
24+
for f in ${F} ; do
25+
echo "checking: $f"
26+
if ! ${VG} ${execdir}/test_meta ${DMRTESTFILES}/${f}.dmr ./results/${f} ; then
27+
failure "${execdir}/test_meta ${DMRTESTFILES}/${f}.dmr ./results/${f}"
28+
fi
29+
${NCDUMP} -h ./results/${f} > ./results/${f}.d4m
30+
if test "x${TEST}" = x1 ; then
31+
if ! diff -wBb ${BASELINE}/${f}.d4m ./results/${f}.d4m ; then
32+
failure "diff -wBb ${BASELINE}/${f}.ncdump ./results/${f}.d4m"
33+
fi
34+
elif test "x${RESET}" = x1 ; then
35+
echo "${f}:"
36+
cp ./results/${f}.d4m ${BASELINE}/${f}.d4m
37+
fi
38+
done
39+
40+
if test "x${CDLDIFF}" = x1 ; then
41+
for f in $CDL ; do
42+
echo "diff -wBb ${CDLTESTFILES}/${f}.cdl ./results/${f}.d4m"
43+
rm -f ./tmp
44+
cat ${CDLTESTFILES}/${f}.cdl \
45+
cat >./tmp
46+
echo diff -wBbu ./tmp ./results/${f}.d4m
47+
if ! diff -wBbu ./tmp ./results/${f}.d4m ; then
48+
failure "${f}"
49+
fi
50+
done
51+
fi
52+
53+
finish
54+

dap4_test/tst_parse.sh

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/sh
2+
3+
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
4+
. ../test_common.sh
5+
6+
. ${srcdir}/d4test_common.sh
7+
8+
cd ${DMRTESTFILES}
9+
F=`ls -1 *.dmr | sed -e 's/[.]dmr//' |tr '\r\n' ' '`
10+
cd $WD
11+
12+
if test "x${RESET}" = x1 ; then rm -fr ${BASELINE}/*.d4p ; fi
13+
for f in $F ; do
14+
echo "testing: $f"
15+
if ! ${VG} ${execdir}/test_parse ${DMRTESTFILES}/${f}.dmr > ./results/${f}.d4p ; then
16+
failure "${f}"
17+
fi
18+
if test "x${TEST}" = x1 ; then
19+
if ! diff -wBb ${BASELINE}/${f}.d4p ./results/${f}.d4p ; then
20+
failure "${f}"
21+
fi
22+
elif test "x${DIFF}" = x1 ; then
23+
echo "diff -wBb ${DMRTESTFILES}/${f}.dmr ./results/${f}.d4p"
24+
rm -f ./tmp
25+
cat ./results/${f}.d4p \
26+
| sed -e '/<Dimensions>/d' -e '/<Types>'/d -e '/<Variables>'/d -e '/<Groups>'/d \
27+
| sed -e '/<\/Dimensions>/d' -e '/<\/Types>'/d -e '/<\/Variables>'/d -e '/<\/Groups>'/d \
28+
| sed -e '/_edu.ucar.opaque.size/,+2d' \
29+
| cat > ./tmp
30+
if ! diff -wBb ${DMRTESTFILES}/${f}.dmr ./tmp ; then
31+
failure "${f}"
32+
fi
33+
elif test "x${RESET}" = x1 ; then
34+
echo "${f}:"
35+
cp ./results/${f}.d4p ${BASELINE}/${f}.d4p
36+
fi
37+
done
38+
39+
finish
40+
41+
exit 0
42+

dap4_test/tst_raw.sh

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#!/bin/sh
2+
3+
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
4+
. ../test_common.sh
5+
6+
. ${srcdir}/d4test_common.sh
7+
8+
set -x
9+
10+
# Compute the set of testfiles
11+
PUSHD ${srcdir}/daptestfiles
12+
F=`ls -1d *.dap`
13+
POPD
14+
F=`echo $F | tr '\r\n' ' '`
15+
F=`echo $F | sed -e s/.dap//g`
16+
17+
# Do cleanup on the baseline file
18+
baseclean() {
19+
if test $# != 2 ; then
20+
echo "simplify: too few args"
21+
else
22+
rm -f $2
23+
while read -r iline; do
24+
oline=`echo $iline | tr "'" '"'`
25+
echo "$oline" >> $2
26+
done < $1
27+
fi
28+
}
29+
30+
# Do cleanup on the result file
31+
resultclean() {
32+
if test $# != 2 ; then
33+
echo "simplify: too few args"
34+
else
35+
rm -f $2
36+
while read -r iline; do
37+
oline=`echo $iline | sed -e 's|^\(netcdf.*\)[.]nc\(.*\)$|\\1\\2|'`
38+
echo "$oline" >> $2
39+
done < $1
40+
fi
41+
}
42+
43+
if test "x${RESET}" = x1 ; then rm -fr ${BASELINERAW}/*.dmp ; fi
44+
for f in $F ; do
45+
echo "testing: $f"
46+
URL="[dap4]file:${DAPTESTFILES}/${f}"
47+
if ! ${VG} ${NCDUMP} "${URL}" > ./results/${f}.dmp; then
48+
failure "${URL}"
49+
fi
50+
if test "x${TEST}" = x1 ; then
51+
if ! diff -wBb ${BASELINERAW}/${f}.dmp ./results/${f}.dmp ; then
52+
failure "diff ${f}.dmp"
53+
fi
54+
elif test "x${RESET}" = x1 ; then
55+
echo "${f}:"
56+
cp ./results/${f}.dmp ${BASELINERAW}/${f}.dmp
57+
elif test "x${DIFF}" = x1 ; then
58+
echo "hdrtest: ${f}"
59+
rm -f ./tr1 ./tr2 ./tb1 ./tb2
60+
baseclean
61+
if ! diff -wBb ./${BASELINERAW}/${f}.dmp ./${BASELINE}/${f}.ncdump ; then
62+
failure diff -wBb ./${BASELINERAW}/${f}.dmp ./${BASELINE}/${f}.ncdump
63+
fi
64+
fi
65+
done
66+
67+
finish

docs/Doxyfile.developer

100755100644
File mode changed.

docs/footer.html

100755100644
File mode changed.

docs/install.md

100755100644
File mode changed.

docs/old/netcdf-cxx.texi

100755100644
File mode changed.

docs/old/netcdf-cxx4.texi

100755100644
File mode changed.

docs/old/netcdf-f90.texi

100755100644
File mode changed.

docs/old/netcdf-install.texi

100755100644
File mode changed.

docs/old/netcdf-internal.texi

100755100644
File mode changed.

0 commit comments

Comments
 (0)