re-mark 1.29b-2 as not yet uploaded (merge madness!)
[debian/tar] / tests / atlocal.in
1 # @configure_input@                                     -*- shell-script -*-
2 # Configurable variable values for tar test suite.
3 # Copyright 2004, 2006, 2013-2014, 2016 Free Software Foundation, Inc.
4
5 # This file is part of GNU tar.
6
7 # GNU tar is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or
10 # (at your option) any later version.
11
12 # GNU tar is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16
17 # You should have received a copy of the GNU General Public License
18 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
20 PATH=@abs_builddir@:@abs_top_builddir@/src:@abs_top_srcdir@/build-aux:$top_srcdir:$srcdir:$PATH
21
22 XFAILFILE=$abs_builddir/.badversion
23
24 trap "test -r $XFAILFILE && cat $XFAILFILE; exit $?" 1 2 13 15
25
26 TEST_DATA_URL=ftp://download.gnu.org.ua/pub/tests/tar
27 if test -z "$TEST_DATA_DIR"; then
28   TEST_DATA_DIR=$abs_builddir/download
29 fi
30
31 STAR_DATA_URL=$TEST_DATA_URL/star
32 if test -z "$STAR_TESTSCRIPTS"; then
33   STAR_TESTSCRIPTS=$TEST_DATA_DIR
34 fi
35
36 # tarball_prereq file sum dir url
37 tarball_prereq() {
38   if ! test -d "$3"; then
39     mkdir "$3"
40     cat > "$3/README" <<EOF
41 This directory contains test data downloaded during full check.
42 You can remove it, if you wish.
43 EOF
44   fi
45   if test -r $3/$1; then
46     :
47   elif test -n "$FULL_TEST"; then
48     wget -q -O $3/$1 $4/$1
49   fi
50   echo "$2  $3/$1" | md5sum --status --check - >/dev/null 2>&1
51 }
52
53 decho() {
54   echo $*
55   echo >&2 $*
56 }
57
58 mkexcltest() {
59   mkdir $1 $1/subdir
60   genfile --file=$1/top-level-file
61   genfile --file=$1/subdir/excludeme
62   genfile --file=$1/subdir/subdir-file
63 }
64