2 # This file is part of GNU tar testsuite.
3 # Copyright 2004-2005, 2007, 2013-2014 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/>.
21 P=`expr $0 : '\(.*\)/.*'`
22 DIR=`cd $P; pwd`/../../src
24 PATH=`cd $DIR;pwd`:$PATH
27 # Usage: quicktest FILELIST ARCHIVE-NAME
37 tar -cf ../archive -H ustar -T $1
40 ${TARTEST:-tartest} -v < $2 > $DIR/old.out
41 ${TARTEST:-tartest} -v < archive > $DIR/new.out
43 if cmp $DIR/old.out $DIR/new.out; then
48 echo "FAIL. Examine $DIR for details"
57 echo "$1 does not exist or is unreadable"
63 if [ "$STAR_TESTSCRIPTS" = "" ]; then
64 echo "STAR_TESTSCRIPTS not set"
68 if [ -d $STAR_TESTSCRIPTS ]; then
71 echo "STAR_TESTSCRIPTS is not a directory"
75 ARCHIVE=$STAR_TESTSCRIPTS/ustar-all-quicktest.tar
77 FILELIST=$STAR_TESTSCRIPTS/quicktest.filelist
80 ${TARTEST:-tartest} < /dev/null > /dev/null 2>&1
81 if [ $? -eq 127 ]; then
82 echo "tartest not in your path"
93 *) echo "Unknown option: $option" >&2
102 quicktest $FILELIST $ARCHIVE
104 echo "You need to be root to run this test"
108 # End of quicktest.sh