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

Re: [PATCH] t5703: replace "grep -a" usage by perl

From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Date
May 19, 2020, 11:39 UTC
Message-ID
<20200519113920.GA2051@danh.dev>
In-Reply-To
<CAP8UFD2vYwnwgNWX3tg5w-7kCg3kzNscVbnk0DJfSD4UV-D0hg@mail.gmail.com>
On 2020-05-19 09:13:19+0200, Christian Couder <christian.couder@gmail.com> wrote:
> On Tue, May 19, 2020 at 3:00 AM Đoàn Trần Công Danh
> <congdanhqx@gmail.com> wrote:
Show 5 quoted lines
> 
> >     We can also copy-and-paste code from t4019,
> >     to avoid introduce perl to this test.
> 
> This might be a good idea.

Probably we need 2 patches, one to libify the current usage in t4019, one to replace "grep -a" usage in t5703.

Consider this is floating for a long time, I think we can hold this for the time being, until after 2.27.0 released.

Show 14 quoted lines
> >  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' '
Well, that's is not t/README says:
 - PERL
   Git wasn't compiled with NO_PERL=YesPlease.
   Even without the PERL prerequisite, tests can assume there is a
   usable perl interpreter at $PERL_PATH, though it need not be
   particularly modern.
And, there're a lot of tests using perl without PERL prereq:
	$ git grep -l '[        ]perl ' 't/t????-*.sh' | wc -l
	55
	$ git grep -l PERL 't/t????-*.sh' | wc -l
	35
-- 
Danh
Previous: Christian CouderNext: Christian Couder
Message 21 of 24 in “Redirect grep's stderr top null too.”
  1. 1/7 Redirect grep's stderr top null too.Darren Tucker, May 18, 2020
  2. 4/7 Use strtoumax instead of strtoull.Darren Tucker, May 18, 2020
  3. Junio C HamanoMay 18, 2020
  4. 5/7 Define LLONG_MAX/MIN etc if not already defined.Darren Tucker, May 18, 2020
  5. Andreas SchwabMay 18, 2020
  6. Darren TuckerMay 18, 2020
  7. 6/7 Check if strtoumax is a macro (eg HP-UX 11.11).Darren Tucker, May 18, 2020
  8. Junio C HamanoMay 18, 2020
  9. Darren TuckerMay 20, 2020
  10. Junio C HamanoMay 20, 2020
  11. 2/7 Define NO_PREAD for HPUX 11.11 and 11.00.Darren Tucker, May 18, 2020
  12. 3/7 Test for strtoull in configure.Darren Tucker, May 18, 2020
  13. 7/7 Define SCNuMAX if not already defined.Darren Tucker, May 18, 2020
  14. Đoàn Trần Công DanhMay 18, 2020
  15. Darren TuckerMay 18, 2020
  16. Đoàn Trần Công DanhMay 18, 2020
  17. Darren TuckerMay 18, 2020
  18. t5703: replace "grep -a" usage by perlĐoàn Trần Công Danh, May 19, 2020
  19. Darren TuckerMay 19, 2020
  20. Christian CouderMay 19, 2020
  21. Đoàn Trần Công DanhMay 19, 2020
  22. Christian CouderMay 19, 2020
  23. Eric SunshineMay 19, 2020
  24. Junio C HamanoMay 18, 2020

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.