mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
tests: remove require-perl script; use function instead
* tests/require-perl: Remove file. * tests/Makefile.am (EXTRA_DIST): Remove it from this list. * tests/init.cfg (require_perl_): New function. * tests/misc/pwd-long: Use the new function, not the file. * tests/ls/nameless-uid: Likewise. * tests/misc/sum-sysv: Likewise.
This commit is contained in:
@@ -18,7 +18,6 @@ EXTRA_DIST = \
|
||||
init.sh \
|
||||
lang-default \
|
||||
other-fs-tmpdir \
|
||||
require-perl \
|
||||
sample-test \
|
||||
shell-or-perl \
|
||||
$(pr_data)
|
||||
|
||||
@@ -335,6 +335,14 @@ require_dirent_d_type_()
|
||||
|| skip_ requires d_type support
|
||||
}
|
||||
|
||||
# Skip the current test if we lack Perl.
|
||||
require_perl_()
|
||||
{
|
||||
: ${PERL=perl}
|
||||
$PERL -e 'use warnings' > /dev/null 2>&1 \
|
||||
|| skip_ 'configure did not find a usable version of Perl'
|
||||
}
|
||||
|
||||
# Does the current (working-dir) file system support sparse files?
|
||||
require_sparse_support_()
|
||||
{
|
||||
|
||||
@@ -16,13 +16,11 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
: ${srcdir=.}
|
||||
. $srcdir/require-perl
|
||||
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
print_ver_ ls
|
||||
|
||||
require_root_
|
||||
require_perl_
|
||||
|
||||
nameless_uid=`$PERL -e '
|
||||
foreach my $i (1000..16*1024) { getpwuid $i or (print "$i\n"), exit }
|
||||
|
||||
@@ -17,13 +17,11 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
: ${srcdir=.}
|
||||
. $srcdir/require-perl
|
||||
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
print_ver_ pwd
|
||||
|
||||
require_readable_root_
|
||||
require_perl_
|
||||
|
||||
ARGV_0=$0
|
||||
export ARGV_0
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
: ${srcdir=.}
|
||||
. $srcdir/require-perl
|
||||
|
||||
# Avoid a problem when run in a UTF-8 locale.
|
||||
# Otherwise, Perl would try to (and fail to) interpret
|
||||
# each string below as a sequence of multi-byte characters.
|
||||
@@ -28,6 +25,8 @@ export LC_ALL
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
print_ver_ sum
|
||||
|
||||
require_perl_
|
||||
|
||||
# FYI, 16843009 is floor (2^32 / 255).
|
||||
|
||||
# aka: perl -e 'print chr(255) x 16843009'
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
: ${PERL=perl}
|
||||
$PERL -e 'use warnings' > /dev/null 2>&1 || {
|
||||
echo 1>&2 "$0: configure did not find a usable version of Perl," \
|
||||
"so skipping this test"
|
||||
Exit 77
|
||||
}
|
||||
Reference in New Issue
Block a user