forked from Unidata/netcdf-c
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
f73efea
commit 6d88091
Showing
116 changed files
with
458 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,3 +87,4 @@ fi | |
|
||
finish | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,3 +52,4 @@ fi | |
|
||
finish | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,3 +40,4 @@ finish | |
|
||
exit 0 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#!/bin/sh | ||
|
||
if test "x$srcdir" = x ; then srcdir=`pwd`; fi | ||
. ../test_common.sh | ||
|
||
. ${srcdir}/d4test_common.sh | ||
|
||
cd ${DAPTESTFILES} | ||
F=`ls -1 *.dap | sed -e 's/[.]dap//g' | tr '\r\n' ' '` | ||
cd $WD | ||
|
||
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" | ||
fi | ||
${NCDUMP} ./results/${f}.nc > ./results/${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" | ||
fi | ||
elif test "x${RESET}" = x1 ; then | ||
echo "${f}:" | ||
cp ./results/${f}.d4d ${BASELINE}/${f}.d4d | ||
fi | ||
done | ||
|
||
# Remove empty lines and trim lines in a cdl file | ||
trim() { | ||
if test $# != 2 ; then | ||
echo "simplify: too few args" | ||
else | ||
rm -f $2 | ||
while read -r iline; do | ||
oline=`echo $iline | sed -e 's/^[\t ]*\([^\t ]*\)[\t ]*$/\\1/'` | ||
if test "x$oline" = x ; then continue ; fi | ||
echo "$oline" >> $2 | ||
done < $1 | ||
fi | ||
} | ||
|
||
# Do cleanup on the baseline file | ||
baseclean() { | ||
if test $# != 2 ; then | ||
echo "simplify: too few args" | ||
else | ||
rm -f $2 | ||
while read -r iline; do | ||
oline=`echo $iline | tr "'" '"'` | ||
echo "$oline" >> $2 | ||
done < $1 | ||
fi | ||
} | ||
|
||
# Do cleanup on the result file | ||
resultclean() { | ||
if test $# != 2 ; then | ||
echo "simplify: too few args" | ||
else | ||
rm -f $2 | ||
while read -r iline; do | ||
oline=`echo $iline | sed -e 's|^\(netcdf.*\)[.]nc\(.*\)$|\\1\\2|'` | ||
echo "$oline" >> $2 | ||
done < $1 | ||
fi | ||
} | ||
|
||
if test "x${CDLDIFF}" = x1 ; then | ||
for f in $F ; do | ||
STEM=`echo $f | cut -d. -f 1` | ||
if ! test -e ${CDLTESTFILES}/${STEM}.cdl ; then | ||
echo "Not found: ${CDLTESTFILES}/${STEM}.cdl" | ||
continue | ||
fi | ||
echo "diff -wBb ${CDLTESTFILES}/${STEM}.cdl ./results/${f}.d4d" | ||
rm -f ./b1 ./b2 ./r1 ./r2 | ||
trim ${CDLTESTFILES}/${STEM}.cdl ./b1 | ||
trim ./results/${f}.d4d ./r1 | ||
baseclean b1 b2 | ||
resultclean r1 r2 | ||
if ! diff -wBb ./b2 ./r2 ; then | ||
failure "${f}" | ||
fi | ||
done | ||
fi | ||
|
||
finish | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/bin/sh | ||
|
||
if test "x$srcdir" = x ; then srcdir=`pwd`; fi | ||
. ../test_common.sh | ||
|
||
. ${srcdir}/d4test_common.sh | ||
|
||
cd ${DMRTESTFILES} | ||
F=`ls -1 *.dmr | sed -e 's/[.]dmr//g' | tr '\r\n' ' '` | ||
cd $WD | ||
|
||
CDL= | ||
for f in ${F} ; do | ||
STEM=`echo $f | cut -d. -f 1` | ||
if test -e ${CDLTESTFILES}/${STEM}.cdl ; then | ||
CDL="${CDL} ${STEM}" | ||
else | ||
echo "Not found: ${CDLTESTFILES}/${STEM}.cdl" | ||
fi | ||
done | ||
|
||
if test "x${RESET}" = x1 ; then rm -fr ${BASELINE}/*.d4m ; fi | ||
|
||
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}" | ||
fi | ||
${NCDUMP} -h ./results/${f} > ./results/${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" | ||
fi | ||
elif test "x${RESET}" = x1 ; then | ||
echo "${f}:" | ||
cp ./results/${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" | ||
rm -f ./tmp | ||
cat ${CDLTESTFILES}/${f}.cdl \ | ||
cat >./tmp | ||
echo diff -wBbu ./tmp ./results/${f}.d4m | ||
if ! diff -wBbu ./tmp ./results/${f}.d4m ; then | ||
failure "${f}" | ||
fi | ||
done | ||
fi | ||
|
||
finish | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
|
||
if test "x$srcdir" = x ; then srcdir=`pwd`; fi | ||
. ../test_common.sh | ||
|
||
. ${srcdir}/d4test_common.sh | ||
|
||
cd ${DMRTESTFILES} | ||
F=`ls -1 *.dmr | sed -e 's/[.]dmr//' |tr '\r\n' ' '` | ||
cd $WD | ||
|
||
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 | ||
failure "${f}" | ||
fi | ||
if test "x${TEST}" = x1 ; then | ||
if ! diff -wBb ${BASELINE}/${f}.d4p ./results/${f}.d4p ; then | ||
failure "${f}" | ||
fi | ||
elif test "x${DIFF}" = x1 ; then | ||
echo "diff -wBb ${DMRTESTFILES}/${f}.dmr ./results/${f}.d4p" | ||
rm -f ./tmp | ||
cat ./results/${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' \ | ||
| cat > ./tmp | ||
if ! diff -wBb ${DMRTESTFILES}/${f}.dmr ./tmp ; then | ||
failure "${f}" | ||
fi | ||
elif test "x${RESET}" = x1 ; then | ||
echo "${f}:" | ||
cp ./results/${f}.d4p ${BASELINE}/${f}.d4p | ||
fi | ||
done | ||
|
||
finish | ||
|
||
exit 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/bin/sh | ||
|
||
if test "x$srcdir" = x ; then srcdir=`pwd`; fi | ||
. ../test_common.sh | ||
|
||
. ${srcdir}/d4test_common.sh | ||
|
||
set -x | ||
|
||
# Compute the set of testfiles | ||
PUSHD ${srcdir}/daptestfiles | ||
F=`ls -1d *.dap` | ||
POPD | ||
F=`echo $F | tr '\r\n' ' '` | ||
F=`echo $F | sed -e s/.dap//g` | ||
|
||
# Do cleanup on the baseline file | ||
baseclean() { | ||
if test $# != 2 ; then | ||
echo "simplify: too few args" | ||
else | ||
rm -f $2 | ||
while read -r iline; do | ||
oline=`echo $iline | tr "'" '"'` | ||
echo "$oline" >> $2 | ||
done < $1 | ||
fi | ||
} | ||
|
||
# Do cleanup on the result file | ||
resultclean() { | ||
if test $# != 2 ; then | ||
echo "simplify: too few args" | ||
else | ||
rm -f $2 | ||
while read -r iline; do | ||
oline=`echo $iline | sed -e 's|^\(netcdf.*\)[.]nc\(.*\)$|\\1\\2|'` | ||
echo "$oline" >> $2 | ||
done < $1 | ||
fi | ||
} | ||
|
||
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 | ||
failure "${URL}" | ||
fi | ||
if test "x${TEST}" = x1 ; then | ||
if ! diff -wBb ${BASELINERAW}/${f}.dmp ./results/${f}.dmp ; then | ||
failure "diff ${f}.dmp" | ||
fi | ||
elif test "x${RESET}" = x1 ; then | ||
echo "${f}:" | ||
cp ./results/${f}.dmp ${BASELINERAW}/${f}.dmp | ||
elif test "x${DIFF}" = x1 ; then | ||
echo "hdrtest: ${f}" | ||
rm -f ./tr1 ./tr2 ./tb1 ./tb2 | ||
baseclean | ||
if ! diff -wBb ./${BASELINERAW}/${f}.dmp ./${BASELINE}/${f}.ncdump ; then | ||
failure diff -wBb ./${BASELINERAW}/${f}.dmp ./${BASELINE}/${f}.ncdump | ||
fi | ||
fi | ||
done | ||
|
||
finish |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Oops, something went wrong.