Version 1.31
[tar.git] / tests / atlocal.in
blob4e3c47d09fe1c971b9206e6e16f43f8900cca8f7
1 # @configure_input@                                     -*- shell-script -*-
2 # Configurable variable values for tar test suite.
3 # Copyright 2004-2019 Free Software Foundation, Inc.
5 # This file is part of GNU tar.
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.
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.
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/>.
20 PATH=@abs_builddir@:@abs_top_builddir@/src:@abs_top_srcdir@/build-aux:$top_srcdir:$srcdir:$PATH
22 XFAILFILE=$abs_builddir/.badversion
24 trap "test -r $XFAILFILE && cat $XFAILFILE; exit $?" 1 2 13 15
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
31 STAR_DATA_URL=$TEST_DATA_URL/star
32 if test -z "$STAR_TESTSCRIPTS"; then
33   STAR_TESTSCRIPTS=$TEST_DATA_DIR
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
53 decho() {
54   echo $*
55   echo >&2 $*
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
64