mirror of
https://https.git.savannah.gnu.org/git/grep.git
synced 2026-01-26 15:39:06 +00:00
tests: port to platforms lacking Perl
* tests/init.cfg (require_perl_): New function. * tests/big-hole, tests/hash-collision-perf, tests/long-pattern-perf: * tests/many-regex-performance, tests/mb-non-UTF8-performance: Use it.
This commit is contained in:
parent
d6276889a0
commit
80bcb074ae
@ -4,6 +4,7 @@
|
||||
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
||||
|
||||
expensive_
|
||||
require_perl_
|
||||
|
||||
# Skip this test if there is no usable SEEK_HOLE support,
|
||||
# as is the case with linux-3.5.0 on ext4 and tmpfs file systems.
|
||||
|
||||
@ -21,6 +21,8 @@
|
||||
|
||||
fail=0
|
||||
|
||||
require_perl_
|
||||
|
||||
: > empty || framework_failure_
|
||||
|
||||
# Construct a test case that consumes enough CPU time that we don't
|
||||
|
||||
@ -138,6 +138,13 @@ require_JP_EUC_locale_()
|
||||
skip_ "$locale locale not found"
|
||||
}
|
||||
|
||||
# Skip the current test if we lack Perl.
|
||||
require_perl_()
|
||||
{
|
||||
test "$PERL" && $PERL -e 'use warnings' > /dev/null 2>&1 \
|
||||
|| skip_ 'configure did not find a usable version of Perl'
|
||||
}
|
||||
|
||||
expensive_()
|
||||
{
|
||||
if test "$RUN_EXPENSIVE_TESTS" != yes; then
|
||||
|
||||
@ -24,6 +24,7 @@ fail=0
|
||||
# system load during the two test runs, so we'll mark it as
|
||||
# "expensive", making it less likely to be run by regular users.
|
||||
expensive_
|
||||
require_perl_
|
||||
|
||||
echo x > in || framework_failure_
|
||||
# Note that we want 10x the byte count (not line count) in the larger file.
|
||||
|
||||
@ -26,6 +26,7 @@ fail=0
|
||||
# system load during the two test runs, so we'll mark it as
|
||||
# "expensive", making it less likely to be run by regular users.
|
||||
expensive_
|
||||
require_perl_
|
||||
|
||||
# Make the quick/small input large enough so that even on high-end
|
||||
# systems this first invocation takes at least 10ms of user time.
|
||||
|
||||
@ -26,6 +26,7 @@ fail=0
|
||||
# system load during the two test runs, so we'll mark it as
|
||||
# "expensive", making it less likely to be run by regular users.
|
||||
expensive_
|
||||
require_perl_
|
||||
|
||||
# Make the input large enough so that even on high-end systems
|
||||
# the unibyte test takes at least 10ms of user time.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user