git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH/RFC 4/6] test-lib: add LIBPCRE1 & LIBPCRE2 prerequisites

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 11, 2017, 17:51 UTC
Message-ID
<20170511175115.648-5-avarab@gmail.com>
In-Reply-To
<20170511175115.648-1-avarab@gmail.com>

Add LIBPCRE1 and LIBPCRE2 prerequisites which are true when git is compiled with USE_LIBPCRE1=YesPlease or USE_LIBPCRE2=YesPlease, respectively.

There are various edge cases or version-specific features that need to be tested for.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
 t/README      | 12 ++++++++++++
 t/test-lib.sh |  2 ++
 2 files changed, 14 insertions(+)
diff --git a/t/README b/t/README
index 2f95860369..1ff612ca65 100644
--- a/t/README
+++ b/t/README
@@ -808,6 +808,18 @@ use these, and "test_set_prereq" for how to define your own.
    Git was compiled with support for PCRE. Wrap any tests
    that use git-grep --perl-regexp or git-grep -P in these.
 
+ - LIBPCRE1
+
+   Git was compiled with PCRE v1 support via
+   USE_LIBPCRE1=YesPlease. Wrap any PCRE using tests that for some
+   reason need v1 of the PCRE library instead of v2 in these.
+
+ - LIBPCRE2
+
+   Git was compiled with PCRE v2 support via
+   USE_LIBPCRE2=YesPlease. Wrap any PCRE using tests that for some
+   reason need v2 of the PCRE library instead of v1 in these.
+
  - CASE_INSENSITIVE_FS
 
    Test is run on a case insensitive file system.
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 44d4679384..13ed81dc16 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1012,6 +1012,8 @@ test -z "$NO_PERL" && test_set_prereq PERL
 test -z "$NO_PTHREADS" && test_set_prereq PTHREADS
 test -z "$NO_PYTHON" && test_set_prereq PYTHON
 test -n "$USE_LIBPCRE1$USE_LIBPCRE2" && test_set_prereq PCRE
+test -n "$USE_LIBPCRE1" && test_set_prereq LIBPCRE1
+test -n "$USE_LIBPCRE2" && test_set_prereq LIBPCRE2
 test -z "$NO_GETTEXT" && test_set_prereq GETTEXT
 
 # Can we rely on git's output in the C locale?
-- 
2.11.0
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 4 of 6 in “Speed up git-grep by using PCRE v2 as a backend”
  1. 0/6 Speed up git-grep by using PCRE v2 as a backendÆvar Arnfjörð Bjarmason, May 11, 2017
  2. 1/6 Makefile & compat/pcre2: add ability to build an embedded PCREÆvar Arnfjörð Bjarmason, May 11, 2017
  3. 2/6 Makefile & compat/pcre2: add dependency on pcre2_convert.cÆvar Arnfjörð Bjarmason, May 11, 2017
  4. 4/6 test-lib: add LIBPCRE1 & LIBPCRE2 prerequisitesÆvar Arnfjörð Bjarmason, May 11, 2017
  5. 6/6 grep: use PCRE v2 under the hood for -G & -E for amazing speedupÆvar Arnfjörð Bjarmason, May 11, 2017
  6. 5/6 grep: support regex patterns containing \0 via PCRE v2Ævar Arnfjörð Bjarmason, May 11, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.