Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
debian-packages
Tar
Commits
8d44c6b5
Commit
8d44c6b5
authored
20 years ago
by
Sergey Poznyakoff
Browse files
Options
Downloads
Patches
Plain Diff
Added to the repository
parent
c5757874
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/star/quicktest.sh
+100
-0
100 additions, 0 deletions
tests/star/quicktest.sh
with
100 additions
and
0 deletions
tests/star/quicktest.sh
0 → 100755
+
100
−
0
View file @
8d44c6b5
#! /bin/sh
# This file is part of GNU tar testsuite.
# Copyright (C) 2004 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# Usage: quicktest FILELIST ARCHIVE-NAME
quicktest
()
{
DIR
=
quicktest.
$$
mkdir
$DIR
cd
$DIR
TAR_OPTIONS
=
""
export
TAR_OPTIONS
tar
xf
$2
tar
-cf
../archive
-H
ustar
-T
$1
cd
..
${
TARTEST
:-
tartest
}
-v
<
$2
>
$DIR
/old.out
${
TARTEST
:-
tartest
}
-v
< archive
>
$DIR
/new.out
if
cmp
$DIR
/old.out
$DIR
/new.out
;
then
echo
"PASS"
rm
-r
$DIR
exit
0
else
echo
"FAIL. Examine
$DIR
for details"
exit
1
fi
}
test_access
()
{
if
[
-r
$1
]
;
then
:
else
echo
"
$1
does not exist or is unreadable"
echo
77
fi
}
check_environ
()
{
if
[
"
$STAR_TESTSCRIPTS
"
=
""
]
;
then
echo
"STAR_TESTSCRIPTS not set"
exit
77
fi
if
[
-d
$STAR_TESTSCRIPTS
]
;
then
:
else
echo
"STAR_TESTSCRIPTS is not a directory"
exit
77
fi
ARCHIVE
=
$STAR_TESTSCRIPTS
/ustar-all-quicktest.tar
test_access
$ARCHIVE
FILELIST
=
$STAR_TESTSCRIPTS
/quicktest.filelist
test_access
$FILELIST
${
TARTEST
:-
tartest
}
< /dev/null
>
/dev/null 2>&1
if
[
$?
-eq
127
]
;
then
echo
"tartest not in your path"
exit
77
fi
}
getargs
()
{
for
option
do
case
$option
in
*
=
*
)
eval
$option
;;
*
)
echo
"Unknown option:
$option
"
>
&2
exit
77
;;
esac
done
}
if
[
-w
/
]
;
then
getargs
$*
check_environ
quicktest
$FILELIST
$ARCHIVE
else
echo
"You need to be root to run this test"
exit
77
fi
# End of quicktest.sh
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment