atlocal.in 1.8 KB

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