From: Ruud van Asseldonk <dev@veniogames.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] t5150: skip request-pull test if Perl is disabled
Date: Wed, 27 Nov 2019 23:42:21 +0100 [thread overview]
Message-ID: <a5fb708d-e7b6-b149-7b21-07649487fb65@veniogames.com> (raw)
In-Reply-To: <20191126004647.GD14157@google.com>
Thanks for having a look Jonathan.
Jonathan Nieder wrote:
> Ruud van Asseldonk wrote:
>
>> The git-request-pull.sh script invokes Perl,
>
> Okay, on second glance I found it:
>
> set fnord $(git ls-remote "$url" | @@PERL@@ -e "$find_matching_ref" "${remote:-HEAD}" "$headrev")
>
> This does seem pretty inherently to require perl, so makes sense.
>
> I wonder if we can generalize this. For example, would it make sense to
> have a helper that looks for @@PERL@@ in a file, so we could say
>
> if uses_perl git-request-pull.sh && ! test_have_prereq PERL
> then
> ...
> fi
>
> That way, this would be more futureproof in case someone eliminates
> the perl dependency (either by improving that particular parsing step
> or by rewriting the whole program in C).
That sounds like a good idea. How about turning that into a test itself?
The test would check that the script mentions @@PERL@@, as the first
subtest. That way, if somebody removes the Perl dependency in the
future, that will make the test fail, and that will be a reminder to
remove the check from the test, so the test runs unconditionally.
> In any event,
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
>
> Do the request-pull tests in t7006-pager.sh need the same treatment?
I think these tests are fine, they run "git -p request-pull", not enough
arguments to make request-pull do something, so it prints its usage and
exits with 1. The tests use test_must_fail to verify the exit code, and
printing usage does go through the pager. request-pull does not call
Perl when it only prints its usage.
next prev parent reply other threads:[~2019-11-27 22:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-26 0:02 [PATCH] t5150: skip request-pull test if Perl is disabled Ruud van Asseldonk
2019-11-26 0:43 ` Jonathan Nieder
2019-11-26 0:46 ` Jonathan Nieder
2019-11-27 22:42 ` Ruud van Asseldonk [this message]
2019-11-27 11:21 ` Jeff King
2019-11-27 23:45 ` Ruud van Asseldonk
2019-11-28 1:35 ` Jonathan Nieder
2019-11-28 1:31 ` Jonathan Nieder
2019-12-02 6:19 ` Junio C Hamano
2019-12-13 7:46 ` Jeff King
2019-12-16 18:32 ` 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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a5fb708d-e7b6-b149-7b21-07649487fb65@veniogames.com \
--to=dev@veniogames.com \
--cc=git@vger.kernel.org \
--cc=jrnieder@gmail.com \
--cc=pbonzini@redhat.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).