GRIB-677: better handling of data downloads

This commit is contained in:
Shahram Najm 2015-02-02 17:05:51 +00:00
parent 84f1a4ebe9
commit a3f4ae3b6b
3 changed files with 9 additions and 4 deletions

View File

@ -826,7 +826,9 @@ for f in $files; do
fi
$DNLD_PROG $f ${download_URL}/test-data/grib_api/data/$f
if [ $? -ne 0 ]; then
echo "Failed to download file: $f"
echo
echo "Failed to download file \"$f\" from \"${download_URL}\"" 2>&1
echo "Aborting" 2>&1
exit 1
fi

View File

@ -14,6 +14,12 @@ TESTS = definitions.sh calendar.sh \
read_any.sh padding.sh lamb_az_eq_area.sh grib_to_netcdf.sh debug.sh \
jpeg.sh ccsds.sh
# First download all the necessary data for testing
# Note: if download fails, no tests will be done
$(TESTS): download_data
download_data:
@$(top_srcdir)/data/download.sh $(top_srcdir)/data
noinst_PROGRAMS = packing_check gauss_sub read_any double_cmp packing pack_unpack \
multi_from_message julian read_index index gribex_perf\
jpeg_perf ccsds_perf so_perf png_perf bpv_limit laplacian \

View File

@ -57,9 +57,6 @@ else
GRIB_API_LIB=`pwd`/src
fi
# Download the data needed for tests
${data_dir}/download.sh "${data_dir}"
# go back to current working dir
cd $save
set -u