mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Merge branch 'master' into ejh_fill_test
This commit is contained in:
commit
caea514ec7
@ -10,7 +10,10 @@ TARGETS = ${PLUGINSRC} ${BZIP2SRC}
|
||||
BUILT_SOURCES = ${TARGETS}
|
||||
|
||||
${TARGETS}:
|
||||
for x in ${TARGETS} ; do 'cp' -f ${top_srcdir}/nc_test4/hdf5plugins/$$x . ; done
|
||||
for x in ${TARGETS} ; do \
|
||||
rm -f ./$$x; \
|
||||
'cp' -f ${top_srcdir}/nc_test4/hdf5plugins/$$x . ; \
|
||||
done
|
||||
|
||||
CLEANFILES = ${TARGETS}
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#Q=-q
|
||||
|
||||
# This shell gets some sample HDF4 files from the netCDF ftp site for
|
||||
# testing. Then it runs program tst_interops3 on the test file to
|
||||
# check that HDF4 reading works.
|
||||
@ -9,6 +11,20 @@
|
||||
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
||||
. ../test_common.sh
|
||||
|
||||
# Get a file from the ftp site; retry several times
|
||||
getfile() {
|
||||
FTPFILE="ftp://ftp.unidata.ucar.edu/pub/netcdf/sample_data/hdf4/$1.gz"
|
||||
for try in 1 2 3 4 ; do # try 4 times
|
||||
# signal sucess/failure
|
||||
if wget -c $Q --passive-ftp $FTPFILE ; then
|
||||
return 0 # got it
|
||||
fi
|
||||
echo "wget failed: try $try"
|
||||
sleep 5 # seconds
|
||||
done
|
||||
return 1 # did not get it
|
||||
}
|
||||
|
||||
set -e
|
||||
echo ""
|
||||
echo "Getting HDF4 sample files from Unidata FTP site..."
|
||||
@ -21,8 +37,12 @@ echo "Getting HDF4 test files $file_list"
|
||||
for f1 in $file_list
|
||||
do
|
||||
if ! test -f $f1; then
|
||||
wget "ftp://ftp.unidata.ucar.edu/pub/netcdf/sample_data/hdf4/$f1.gz"
|
||||
gunzip $f1.gz
|
||||
if getfile $f1 ; then
|
||||
gunzip $f1.gz
|
||||
else
|
||||
echo Could not ftp $f1.gz
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
if test "x$SETX" = x1 ; then set -x ; fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user