atlocal.in 1.8 KB

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