* 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.
init.sh \
lang-default \
other-fs-tmpdir \
- require-perl \
sample-test \
shell-or-perl \
$(pr_data)
|| 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_()
{
# 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 }
# 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
# 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.
. "${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'
+++ /dev/null
-: ${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
-}