Subject: Re: [PATCH 1/1] tests: add LIBCURL prerequisite to tests needing libcurl

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Wed, 15 Jun 2022 22:28:29 +0200

On Wed, Jun 15 2022, Junio C Hamano wrote:

> Ævar Arnfjörð Bjarmason  <[email-masked]> writes:
>
>> The existing "CURL" prerequisite is only used in one place, and we
>> should probably name it "CURL_PROGRAM",
>
> True.  It probably wants to become a lazy prerequisite defined only
> in that program.

Yes, I have that fix, but left it out for the "for v2.37.0" ...

>> then rename "LIBCURL" to
>> "CURL" as a follow-up, but for now (pre-v2.37.0) let's aim for the
>> most minimal fix possible.
>
> OK.
>
>> Signed-off-by: Ævar Arnfjörð Bjarmason <[email-masked]>
>> ---
>>  t/lib-httpd.sh        | 2 +-
>>  t/t5516-fetch-push.sh | 4 ++--
>>  t/t5601-clone.sh      | 4 ++--
>>  t/test-lib.sh         | 1 +
>>  4 files changed, 6 insertions(+), 5 deletions(-)
>>
>> diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
>> index 782891908d7..1f6b9b08d1d 100644
>> --- a/t/lib-httpd.sh
>> +++ b/t/lib-httpd.sh
>> @@ -29,7 +29,7 @@
>>  # Copyright (c) 2008 Clemens Buchacher <[email-masked]>
>>  #
>>  
>> -if test -n "$NO_CURL"
>> +if ! test_have_prereq LIBCURL
>>  then
>>  	skip_all='skipping test, git built without http support'
>>  	test_done
>
> This is not strictly needed in "the most minimal fix possible", is
> it?  Just checking.

I figured if I was adding a $NO_CURL prereq I might as well change the
only existing use of $NO_CURL to use it, which also assures the reader
that our test suite is getting this from somewhere already.

But I'll drop this in a re-roll.