2 # This file is part of GNU tar testsuite.
3 # Copyright 2004-2005, 2007, 2013-2014, 2016 Free Software Foundation,
6 # This file is part of GNU tar.
8 # GNU tar is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or
11 # (at your option) any later version.
13 # GNU tar is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 P=`expr $0 : '\(.*\)/.*'`
23 DIR=`cd $P; pwd`/../../src
25 PATH=`cd $DIR;pwd`:$PATH
28 # Usage: quicktest FILELIST ARCHIVE-NAME
38 tar -cf ../archive -H ustar -T $1
41 ${TARTEST:-tartest} -v < $2 > $DIR/old.out
42 ${TARTEST:-tartest} -v < archive > $DIR/new.out
44 if cmp $DIR/old.out $DIR/new.out; then
49 echo "FAIL. Examine $DIR for details"
58 echo "$1 does not exist or is unreadable"
64 if [ "$STAR_TESTSCRIPTS" = "" ]; then
65 echo "STAR_TESTSCRIPTS not set"
69 if [ -d $STAR_TESTSCRIPTS ]; then
72 echo "STAR_TESTSCRIPTS is not a directory"
76 ARCHIVE=$STAR_TESTSCRIPTS/ustar-all-quicktest.tar
78 FILELIST=$STAR_TESTSCRIPTS/quicktest.filelist
81 ${TARTEST:-tartest} < /dev/null > /dev/null 2>&1
82 if [ $? -eq 127 ]; then
83 echo "tartest not in your path"
94 *) echo "Unknown option: $option" >&2
103 quicktest $FILELIST $ARCHIVE
105 echo "You need to be root to run this test"
109 # End of quicktest.sh