summaryrefslogtreecommitdiff
path: root/tests/init.cfg
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-02-29 00:36:26 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2012-03-01 07:46:03 -0800
commit235aad711285fc6978f6ff26397743930b23f79a (patch)
tree06c27072a115e58d1373382a4c3c8989d921e118 /tests/init.cfg
parent3732fd2b98692a1e58fa7254fc0cacab8136fb11 (diff)
downloadgrep-235aad711285fc6978f6ff26397743930b23f79a.tar.gz
tests: test for problems with long matches
The new test is expensive, so add a category of expensive tests, which are normally not run, and put the new test in this new category. The idea of having expensive tests is taken from coreutils. * HACKING: Mention RUN_EXPENSIVE_TESTS and similar env vars. * Makefile.am (check-expensive): New rule. * tests/Makefile.am (TESTS): Add big-match. * tests/init.cfg (expensive_): New function, from coreutils. * tests/big-match: New file.
Diffstat (limited to 'tests/init.cfg')
-rw-r--r--tests/init.cfg17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/init.cfg b/tests/init.cfg
index 772e1192..408400ca 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -77,3 +77,20 @@ require_compiled_in_MB_support()
printf 'é' | LC_ALL=en_US.UTF-8 grep '[[:lower:]]' \
|| skip_ this test requires MBS support
}
+
+expensive_()
+{
+ if test "$RUN_EXPENSIVE_TESTS" != yes; then
+ skip_ 'expensive: disabled by default
+This test is relatively expensive, so it is disabled by default.
+To run it anyway, rerun make check with the RUN_EXPENSIVE_TESTS
+environment variable set to yes. E.g.,
+
+ env RUN_EXPENSIVE_TESTS=yes make check
+
+or use the shortcut target of the toplevel Makefile,
+
+ make check-expensive
+'
+ fi
+}