From: Christian Couder <christian.couder@gmail.com>
To: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
Cc: Darren Tucker <dtucker@dtucker.net>, git <git@vger.kernel.org>,
Eric Sunshine <sunshine@sunshineco.com>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] t5703: replace "grep -a" usage by perl
Date: Tue, 19 May 2020 09:13:19 +0200 [thread overview]
Message-ID: <CAP8UFD2vYwnwgNWX3tg5w-7kCg3kzNscVbnk0DJfSD4UV-D0hg@mail.gmail.com> (raw)
In-Reply-To: <20200519005645.GD1999@danh.dev>
On Tue, May 19, 2020 at 3:00 AM Đoàn Trần Công Danh
<congdanhqx@gmail.com> wrote:
> On some platforms likes HP-UX, grep(1) doesn't understand "-a".
>
> Let's switch to perl.
There are some other platforms where Perl is difficult to install.
That's why we have the 'NO_PERL' Makefile knob, and the 'PERL' test
prereq which is used in some test scripts like t0021-conversion.sh,
t2016-checkout-patch.sh, t2071-restore-patch.sh, ...
> We can also copy-and-paste code from t4019,
> to avoid introduce perl to this test.
This might be a good idea.
> t/t5703-upload-pack-ref-in-want.sh | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh
> index a34460f7d8..92ad5eeec0 100755
> --- a/t/t5703-upload-pack-ref-in-want.sh
> +++ b/t/t5703-upload-pack-ref-in-want.sh
> @@ -49,15 +49,18 @@ test_expect_success 'setup repository' '
>
> test_expect_success 'config controls ref-in-want advertisement' '
At least you should add the PERL prereq to the test with something like:
test_expect_success PERL 'config controls ref-in-want advertisement' '
> test-tool serve-v2 --advertise-capabilities >out &&
> - ! grep -a ref-in-want out &&
> + perl -ne "/ref-in-want/ and print" out >out.filter &&
> + test_must_be_empty out.filter &&
Thanks,
Christian.
next prev parent reply other threads:[~2020-05-19 7:13 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-18 10:03 [PATCH 1/7] Redirect grep's stderr top null too Darren Tucker
2020-05-18 10:03 ` [PATCH 2/7] Define NO_PREAD for HPUX 11.11 and 11.00 Darren Tucker
2020-05-18 10:03 ` [PATCH 3/7] Test for strtoull in configure Darren Tucker
2020-05-18 10:03 ` [PATCH 4/7] Use strtoumax instead of strtoull Darren Tucker
2020-05-18 18:29 ` Junio C Hamano
2020-05-18 10:03 ` [PATCH 5/7] Define LLONG_MAX/MIN etc if not already defined Darren Tucker
2020-05-18 10:24 ` Andreas Schwab
2020-05-18 14:41 ` Darren Tucker
2020-05-18 10:03 ` [PATCH 6/7] Check if strtoumax is a macro (eg HP-UX 11.11) Darren Tucker
2020-05-18 17:17 ` Junio C Hamano
2020-05-20 1:49 ` Darren Tucker
2020-05-20 3:19 ` Junio C Hamano
2020-05-18 10:03 ` [PATCH 7/7] Define SCNuMAX if not already defined Darren Tucker
2020-05-18 14:13 ` [PATCH 1/7] Redirect grep's stderr top null too Đoàn Trần Công Danh
2020-05-18 14:29 ` Darren Tucker
2020-05-18 15:30 ` Đoàn Trần Công Danh
2020-05-18 23:22 ` Darren Tucker
2020-05-19 0:56 ` [PATCH] t5703: replace "grep -a" usage by perl Đoàn Trần Công Danh
2020-05-19 2:22 ` Darren Tucker
2020-05-19 7:13 ` Christian Couder [this message]
2020-05-19 11:39 ` Đoàn Trần Công Danh
2020-05-19 14:13 ` Christian Couder
2020-05-19 16:09 ` [PATCH 1/7] Redirect grep's stderr top null too Eric Sunshine
2020-05-18 18:20 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAP8UFD2vYwnwgNWX3tg5w-7kCg3kzNscVbnk0DJfSD4UV-D0hg@mail.gmail.com \
--to=christian.couder@gmail.com \
--cc=congdanhqx@gmail.com \
--cc=dtucker@dtucker.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=sunshine@sunshineco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).