]> git.gag.com Git - debian/tar/commitdiff
Improve check-full
authorSergey Poznyakoff <gray@gnu.org>
Mon, 24 Aug 2015 10:04:09 +0000 (13:04 +0300)
committerSergey Poznyakoff <gray@gnu.org>
Mon, 24 Aug 2015 10:05:52 +0000 (13:05 +0300)
* tests/atlocal.in: Download external archives to $abs_builddir/download.
(tarball_prereq): Create destination directory if necessary.
* tests/.gitignore: Add download

tests/.gitignore
tests/atlocal.in

index c5382d043740f643d9e11233a4c266afc8b2cf7b..9d836a81531cfe46529d53bf37de494f3fdc19b5 100644 (file)
@@ -8,3 +8,4 @@ argcv.c
 argcv.h
 genfile.c
 genfile
+download
index 01e0bb8f31197ded892029432310cb774c14b25a..e887458c271360635fbe5a4afaddb5fb5284d4ec 100644 (file)
@@ -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
 }