Re: Test failures when Git is built with libpcre and grep is built without it
- From
Jeff King <peff@peff.net>
- Date
- Jan 2, 2017, 06:53 UTC
- Message-ID
- <20170102065351.7ymrm77asjbghgdg@sigill.intra.peff.net>
- In-Reply-To
- <58688C9F.4000605@adelielinux.org>
On Sat, Dec 31, 2016 at 10:59:11PM -0600, A. Wilcox wrote:
Show 12 quoted lines
> I'm attempting to package Git for our new Linux distribution and I > have run in to a failure on our PowerPC builder while running the test > suite. > > The PowerPC builder runs a tiny version of grep(1) that was not built > with PCRE. As such, grep -P returns 2 and prints: > > grep: support for the -P option is not compiled into this > - --disable-perl-regexp binary > > However, our Git build *does* link against libpcre. This causes a > tests numbered 142 and 143 to fail in t7810-grep.sh.
If we are using "grep -P" in our test suite, it should definitely be marked with a prerequisite that is independent of the LIBPCRE one.
But I can't find any such place in our test suite. Grepping for "grep.*-P" doesn't turn up any hits, and dropping this into my PATH as "grep":
#!/bin/sh
case "$*" in
*-P*|*perl-regex*)
echo >&2 "Pretending not to understand -P"
exit 1
esacexec /bin/grep "$@"
doesn't break anything. We do call "git grep -P", of course, but that should be using the internal libpcre (once upon a time we would invoke an external grep, but that feature has been gone for years).
Can you show us the output of "./t7810-grep.sh -v -i"?
-Peff