summaryrefslogtreecommitdiff
path: root/tests/atlocal.in
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2015-08-24 13:04:09 +0300
committerSergey Poznyakoff <gray@gnu.org>2015-08-24 13:05:52 +0300
commitc440a92627b3ec5fb00c7cd2753abbf23be753f9 (patch)
tree332301b36599072913e43db8da2ba84a6adb9266 /tests/atlocal.in
parentaa9676dcadb6c1aed07c3c0d97ccd37ab7f88a10 (diff)
downloadtar-c440a92627b3ec5fb00c7cd2753abbf23be753f9.tar.gz
Improve check-full
* tests/atlocal.in: Download external archives to $abs_builddir/download. (tarball_prereq): Create destination directory if necessary. * tests/.gitignore: Add download
Diffstat (limited to 'tests/atlocal.in')
-rw-r--r--tests/atlocal.in19
1 files changed, 12 insertions, 7 deletions
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 01e0bb8f..e887458c 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -25,7 +25,7 @@ trap "test -r $XFAILFILE && cat $XFAILFILE; exit $?" 1 2 13 15
TEST_DATA_URL=ftp://download.gnu.org.ua/pub/tests/tar
if test -z "$TEST_DATA_DIR"; then
- TEST_DATA_DIR=$abs_builddir
+ TEST_DATA_DIR=$abs_builddir/download
fi
STAR_DATA_URL=$TEST_DATA_URL/star
@@ -35,12 +35,17 @@ fi
# tarball_prereq file sum dir url
tarball_prereq() {
- if test -d "$3"; then
- if test -r $3/$1; then
- :
- elif test -n "$FULL_TEST"; then
- wget -q -O $3/$1 $4/$1
- fi
+ if ! test -d "$3"; then
+ mkdir "$3"
+ cat > "$3/README" <<EOF
+This directory contains test data downloaded during full check.
+You can remove it, if you wish.
+EOF
+ fi
+ if test -r $3/$1; then
+ :
+ elif test -n "$FULL_TEST"; then
+ wget -q -O $3/$1 $4/$1
fi
echo "$2 $3/$1" | md5sum --status --check - >/dev/null 2>&1
}